]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
server: Use Makefile to install the server
authorMichal Sojka <michal.sojka@cvut.cz>
Thu, 21 Nov 2019 11:17:53 +0000 (12:17 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Thu, 21 Nov 2019 11:17:53 +0000 (12:17 +0100)
This will become handy in the next commit.

Makefile
debian/novaboot-server.install
debian/rules
server/Makefile

index 47e6c2332a6b7a5acb7e7531bffab16d44dd5974..a84a1b3bf3f4f0b824d6d187b9ad9543629edda3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,9 @@ install:
        install -m 440 sudoers.novaboot $(DESTDIR)/etc/sudoers.d/novaboot
        install -d $(DESTDIR)/etc/novaboot.d
        install -m 644 etc.novaboot.txt $(DESTDIR)/etc/novaboot.d/README.txt
+ifneq ($(INSTALL_SERVER),)
+       $(MAKE) -C server install PREFIX=$(PREFIX)
+endif
 
 test:
        $(MAKE) -C tests
index 15050f649bf4d8665df131c64273436115a7fd1d..5e1fdda3c07eecfbdaae552507d30c9631f26a38 100644 (file)
@@ -1,9 +1,9 @@
-server/novaboot-shell /usr/bin
-server/novaboot-shell.1 /usr/share/man/man1
-server/adduser-novaboot /usr/sbin
-server/adduser-novaboot.8 /usr/share/man/man8
-server/systemd/novaboot-server-session@.service /lib/systemd/system
-server/systemd/novaboot-target-off@.target /lib/systemd/system
-server/systemd/novaboot-target-off@.timer /lib/systemd/system
-server/systemd/novaboot-target-on@.service /lib/systemd/system
-server/sysusers.d/novaboot-server.conf /usr/lib/sysusers.d
+/lib/systemd/system/novaboot-target-off@.target
+/lib/systemd/system/novaboot-target-off@.timer
+/lib/systemd/system/novaboot-target-on@.service
+/lib/systemd/system/novaboot-server-session@.service
+/usr/bin/novaboot-shell
+/usr/lib/sysusers.d/novaboot-server.conf
+/usr/sbin/adduser-novaboot
+/usr/share/man/man1/novaboot-shell.1
+/usr/share/man/man8/adduser-novaboot.8
index 79fd842dcae287cdb7cacf4858653cf1ff07dd25..80fe6b632af427dce38087dc485280d3c13e9bc1 100755 (executable)
@@ -6,3 +6,6 @@
 
 %:
        dh $@ 
+
+override_dh_auto_install:
+       dh_auto_install -- INSTALL_SERVER=yes
index 8582009a14318cdb7711455aa4529732b13cd477..44d31110930df32b116c15967448436b77d8e8bf 100644 (file)
@@ -1,3 +1,5 @@
+PREFIX=/usr
+
 all: adduser-novaboot.8 novaboot-shell.1
 
 adduser-novaboot.8: adduser-novaboot
@@ -5,3 +7,14 @@ adduser-novaboot.8: adduser-novaboot
 
 novaboot-shell.1: novaboot-shell
        pod2man --center="User commands" $< $@
+
+install: all
+       install -D -m 755 -t $(DESTDIR)$(PREFIX)/bin novaboot-shell
+       install -D -m 644 -t $(DESTDIR)$(PREFIX)/share/man/man1 novaboot-shell.1
+       install -D -m 755 -t $(DESTDIR)$(PREFIX)/sbin adduser-novaboot
+       install -D -m 644 -t $(DESTDIR)$(PREFIX)/share/man/man8 adduser-novaboot.8
+       install -D -m 644 -t $(DESTDIR)$(PREFIX)/lib/sysusers.d sysusers.d/novaboot-server.conf
+       install -D -m 644 -t $(DESTDIR)/lib/systemd/system systemd/novaboot-target-off@.target
+       install -D -m 644 -t $(DESTDIR)/lib/systemd/system systemd/novaboot-target-off@.timer
+       install -D -m 644 -t $(DESTDIR)/lib/systemd/system systemd/novaboot-target-on@.service
+       install -D -m 644 -t $(DESTDIR)/lib/systemd/system systemd/novaboot-server-session@.service