style: replace BUILDROOT with DESTDIR
This commit is contained in:
parent
2dbd001d3c
commit
2fc72e98da
@ -21,24 +21,24 @@ NAME := kf2-srv
|
|||||||
|
|
||||||
SOURCEDIR := .
|
SOURCEDIR := .
|
||||||
RELEASEDIR := $(SOURCEDIR)/release
|
RELEASEDIR := $(SOURCEDIR)/release
|
||||||
BUILDROOT =
|
DESTDIR =
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
|
||||||
MAINLOGDIR = $(BUILDROOT)/var/log/$(NAME)
|
MAINLOGDIR = $(DESTDIR)/var/log/$(NAME)
|
||||||
BETALOGDIR = $(BUILDROOT)/var/log/$(NAME)-beta
|
BETALOGDIR = $(DESTDIR)/var/log/$(NAME)-beta
|
||||||
CONFDIR = $(BUILDROOT)/etc/$(NAME)
|
CONFDIR = $(DESTDIR)/etc/$(NAME)
|
||||||
INSTMAINDIR = $(CONFDIR)/instances
|
INSTMAINDIR = $(CONFDIR)/instances
|
||||||
INSTBETADIR = $(CONFDIR)/instances-beta
|
INSTBETADIR = $(CONFDIR)/instances-beta
|
||||||
MAPCYCLEDIR = $(CONFDIR)/mapcycles
|
MAPCYCLEDIR = $(CONFDIR)/mapcycles
|
||||||
CACHEDIR = $(BUILDROOT)/var/cache/$(NAME)
|
CACHEDIR = $(DESTDIR)/var/cache/$(NAME)
|
||||||
LOGROTATEDIR = $(BUILDROOT)/etc/logrotate.d
|
LOGROTATEDIR = $(DESTDIR)/etc/logrotate.d
|
||||||
RSYSLOGDIR = $(BUILDROOT)/etc/rsyslog.d
|
RSYSLOGDIR = $(DESTDIR)/etc/rsyslog.d
|
||||||
UNITDIR = $(if $(BUILDROOT),$(BUILDROOT)/usr/lib/systemd/system,/etc/systemd/system)
|
UNITDIR = $(if $(DESTDIR),$(DESTDIR)/usr/lib/systemd/system,/etc/systemd/system)
|
||||||
FIREWALLDDIR = $(if $(BUILDROOT),$(BUILDROOT)/usr/lib/firewalld/services,/etc/firewalld/services)
|
FIREWALLDDIR = $(if $(DESTDIR),$(DESTDIR)/usr/lib/firewalld/services,/etc/firewalld/services)
|
||||||
BINDIR = $(BUILDROOT)$(PREFIX)/bin
|
BINDIR = $(DESTDIR)$(PREFIX)/bin
|
||||||
SBINDIR = $(BUILDROOT)$(PREFIX)/sbin
|
SBINDIR = $(DESTDIR)$(PREFIX)/sbin
|
||||||
GAMEDIR = $(BUILDROOT)$(PREFIX)/games
|
GAMEDIR = $(DESTDIR)$(PREFIX)/games
|
||||||
DATADIR = $(BUILDROOT)$(PREFIX)/share
|
DATADIR = $(DESTDIR)$(PREFIX)/share
|
||||||
SCRIPTDIR = $(DATADIR)/$(NAME)
|
SCRIPTDIR = $(DATADIR)/$(NAME)
|
||||||
SCRIPTGRPDIR = $(SCRIPTDIR)/cmdgrp
|
SCRIPTGRPDIR = $(SCRIPTDIR)/cmdgrp
|
||||||
SCRIPTLIBDIR = $(SCRIPTDIR)/lib
|
SCRIPTLIBDIR = $(SCRIPTDIR)/lib
|
||||||
@ -66,7 +66,7 @@ build:
|
|||||||
fake-systemd-build:
|
fake-systemd-build:
|
||||||
find $(SOURCEDIR)/main -type f -name '*.service' -exec cp -f {} $(RELEASEDIR)/{} \;
|
find $(SOURCEDIR)/main -type f -name '*.service' -exec cp -f {} $(RELEASEDIR)/{} \;
|
||||||
find $(SOURCEDIR)/force-attr -type f -name '*.service' -exec cp -f {} $(RELEASEDIR)/{} \;
|
find $(SOURCEDIR)/force-attr -type f -name '*.service' -exec cp -f {} $(RELEASEDIR)/{} \;
|
||||||
find $(RELEASEDIR) -type f -exec sed -i 's|:DEFINE_PREFIX:|$(BUILDROOT)$(PREFIX)|g;' {} \;
|
find $(RELEASEDIR) -type f -exec sed -i 's|:DEFINE_PREFIX:|$(DESTDIR)$(PREFIX)|g;' {} \;
|
||||||
find $(RELEASEDIR) -type f -exec sed -i -r 's|ExecStart=.+KFGameSteamServer.bin.x86_64|ExecStart=/bin/bash|g;' {} \;
|
find $(RELEASEDIR) -type f -exec sed -i -r 's|ExecStart=.+KFGameSteamServer.bin.x86_64|ExecStart=/bin/bash|g;' {} \;
|
||||||
|
|
||||||
filesystem:
|
filesystem:
|
||||||
@ -202,7 +202,6 @@ test: fake-systemd-build
|
|||||||
$(BASHCHECK) $(RELEASEDIR)/main/lib/webadmin.lib
|
$(BASHCHECK) $(RELEASEDIR)/main/lib/webadmin.lib
|
||||||
$(BASHCHECK) $(RELEASEDIR)/main/lib/workshop.lib
|
$(BASHCHECK) $(RELEASEDIR)/main/lib/workshop.lib
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(RELEASEDIR)
|
rm -rf $(RELEASEDIR)
|
||||||
|
|
||||||
|
@ -45,10 +45,10 @@ Command line tool for managing a set of Killing Floor 2 servers.
|
|||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
make install BUILDROOT=%{buildroot} PREFIX=%{_prefix}
|
make install DESTDIR=%{buildroot} PREFIX=%{_prefix}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make test BUILDROOT=%{buildroot} PREFIX=%{_prefix}
|
make test DESTDIR=%{buildroot} PREFIX=%{_prefix}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
Loading…
Reference in New Issue
Block a user