]> arthur.barton.de Git - netatalk.git/blobdiff - distrib/initscripts/Makefile.am
Modify directory where SuSE initscript is. It was going to /sbin/init.d/ but should
[netatalk.git] / distrib / initscripts / Makefile.am
index 92080b3202a552b01dbea09edb8bf0e573b196ab..beb5d1ab0c3061feb85742e154e671bca9d87cb0 100644 (file)
@@ -2,15 +2,29 @@
 
 SUFFIXES = .tmpl .
 
+pkgconfdir = @PKGCONFDIR@
+
+#
+# Template Generation
+#
+
 .tmpl:
        sed -e s@:BINDIR:@${bindir}@ \
            -e s@:SBINDIR:@${sbindir}@ \
-           -e s@:ETCDIR:@${CONFIG_DIR}@ \
-           <$^ >$@
+           -e s@:ETCDIR:@${pkgconfdir}@ \
+           <$< >$@
 
-sysvdir        = /etc/rc.d/init.d
+GENERATED_FILES = \
+       rc.atalk.redhat         \
+       rc.atalk.tru64          \
+       rc.atalk.bsd            \
+       rc.atalk.suse
+TEMPLATES = $(foreach f,$(GENERATED_FILES),$(f).tmpl)
 
-CLEANFILES = rc.atalk.redhat atalk
+CLEANFILES = $(GENERATED_FILES)
+EXTRA_DIST = $(TEMPLATES) rc.atalk.cobalt rc.atalk.sysv
+
+install-data-hook: $(GENERATED_FILES)
 
 #
 # checking for "redhat" style sysv scripts:
@@ -18,6 +32,7 @@ CLEANFILES = rc.atalk.redhat atalk
 
 if USE_REDHAT
 
+sysvdir        = /etc/rc.d/init.d
 sysv_SCRIPTS = atalk
 
 atalk: rc.atalk.redhat
@@ -26,12 +41,29 @@ atalk: rc.atalk.redhat
 
 endif
 
+#
+# checking for "SuSE" style sysv scripts:
+#
+
+if USE_SUSE
+
+sysvdir        = /etc/rc.d/
+sysv_SCRIPTS = atalk
+
+atalk: rc.atalk.suse
+       cp -f rc.atalk.suse atalk
+       chmod a+x atalk
+
+endif
+
+#
 #
 # checking for "cobalt" style sysv scripts:
 #
 
 if USE_COBALT
 
+sysvdir        = /etc/rc.d/init.d
 sysv_SCRIPTS = atalk
 
 atalk: rc.atalk.cobalt
@@ -46,6 +78,7 @@ endif
 
 if USE_TRU64
 
+sysvdir        = /sbin/init.d
 sysv_SCRIPTS = atalk
 
 atalk: rc.atalk.tru64