change service name
[rrq/overlay-boot.git] / Makefile
index b12ee7038b1dc179de338f9ac918ff2acaaf6cc4..1e9556db27b58ebbd6fd9591993819412b5fb7b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,19 @@
 ETCDIR = $(DESTDIR)/etc
 INITDIR = $(DESTDIR)/etc/init.d
+SRVDIR =  $(DESTDIR)/usr/lib/systemd/system
 MAN8DIR = $(DESTDIR)/usr/share/man/man8
 SBINDIR = $(DESTDIR)/usr/sbin
 VARLIBDIR = $(DESTDIR)/var/lib/overlay-boot
 
 MAN8FILES = overlay-boot.8 overlay-go.8 overlay-stop.8 overlay-diskfile.8
+MAN8FILES += overlay-share.8
 VARLIBFILES = overlay-boot overlay-go overlay-stop functions reaper
 VARLIBFILES += overlay-init overlay-postmount overlay-premount
 VARLIBFILES += overlay-diskfile
+VARLIBFILES += overlay-share
 INITFILES = subhosts
 ETCFILES = subhosts.conf
+SRVFILES = overlay-boot@.service
 
 # The default is to build asm/reaper
 REAPER = src/reaper
@@ -37,7 +41,7 @@ $(ETCDIR)/subhosts.conf: subhosts.conf | $(ETCDIR)/
 
 # Generic rule: a local .8 file depends on the same .8.adoc file, if any
 $(MAN8FILES): %: %.adoc
-       a2x -d manpage -f manpage $^
+       asciidoctor -b manpage $^
 
 # Generic rule: an installed MAN8FILE file depends on a local the
 # same, and that the installation directory exists
@@ -49,6 +53,10 @@ $(addprefix $(MAN8DIR)/,$(MAN8FILES)): $(MAN8DIR)/%: % | $(MAN8DIR)/
 $(addprefix $(VARLIBDIR)/,$(VARLIBFILES)): $(VARLIBDIR)/%: % | $(VARLIBDIR)/
        cp -p $< $@
 
+# Generic rule: copy service files
+$(addprefix $(SRVDIR)/,$(SRVFILES)): $(SRVDIR)/%: % | $(SRVDIR)/
+       cp $< $@
+
 # Make target: to clean up this workspace
 clean:
        rm -f reaper *.8
@@ -60,6 +68,8 @@ clean:
 INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES))
 INSTALLTARGETS += $(addprefix $(VARLIBDIR)/,$(VARLIBFILES))
 INSTALLTARGETS += $(addprefix $(INITDIR)/,$(INITFILES))
+INSTALLTARGETS += $(addprefix $(SRVDIR)/,$(SRVFILES))
+INSTALLTARGETS += $(addprefix $(ETCDIR)/,$(ETCFILES))
 
 install: $(INSTALLTARGETS)