From: Michal Sojka Date: Thu, 21 Nov 2019 11:17:53 +0000 (+0100) Subject: server: Use Makefile to install the server X-Git-Tag: 20201217~13 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/novaboot.git/commitdiff_plain/fc0aabc18aaab916b0b06ceea26b30ab28986218 server: Use Makefile to install the server This will become handy in the next commit. --- diff --git a/Makefile b/Makefile index 47e6c23..a84a1b3 100644 --- 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 diff --git a/debian/novaboot-server.install b/debian/novaboot-server.install index 15050f6..5e1fdda 100644 --- a/debian/novaboot-server.install +++ b/debian/novaboot-server.install @@ -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 diff --git a/debian/rules b/debian/rules index 79fd842..80fe6b6 100755 --- a/debian/rules +++ b/debian/rules @@ -6,3 +6,6 @@ %: dh $@ + +override_dh_auto_install: + dh_auto_install -- INSTALL_SERVER=yes diff --git a/server/Makefile b/server/Makefile index 8582009..44d3111 100644 --- a/server/Makefile +++ b/server/Makefile @@ -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