]> pd.if.org Git - startuptools/commitdiff
created install target for startup scripts
authorNathan Wagner <nw@hydaspes.if.org>
Wed, 27 Feb 2013 21:44:22 +0000 (21:44 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Wed, 27 Feb 2013 21:44:22 +0000 (21:44 +0000)
Makefile

index f57d26bb2093514543b21acca55a85bbae885671..3361e35af164dd4dbb8fa12ebf324310841727d4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,24 @@
 PRG=daemon chdir chids
 CFLAGS=-Wall -Wno-parentheses
+RCSCRIPTS=example.rc functions.rc network
+ETC=rc.conf rc.local rc.multi rc.shutdown rc.single rc.sysinit
 
 all:   $(PRG)
 
 clean:
        rm -f *.o $(PRG)
+
+install: install-scripts
+
+install-scripts:
+        install -d -m755 $(DESTDIR)/etc/rc.d
+        install -d -m755 $(DESTDIR)/sbin
+        cd scripts
+        install -m755 $(addprefix scripts/,$(ETC)) $(DESTDIR)/etc
+        install -m644 scripts/inittab $(DESTDIR)/etc
+        install -m755 $(addprefix scripts/,$(RCSCRIPTS)) $(DESTDIR)/etc/rc.d
+        install -m755 $(addprefix scripts/,ifup ifdown) $(DESTDIR)/sbin
+
+tarball:
+       rm startuptools.tar.gz ; cd ..; tar -czf startuptools.tar.gz startuptools; mv startuptools.tar.gz startuptools
+