]> git.pld-linux.org Git - projects/rc-scripts.git/blob - Makefile
3de186fe27941c40ccaa363e57b6353c1f3cf2e5
[projects/rc-scripts.git] / Makefile
1 ROOT=/
2
3 VERSION=$(shell awk '/define version/ { print $$3 }' rc-scripts.spec)
4 CVSTAG = r$(subst .,-,$(VERSION))
5
6 all:
7         (cd src; make CFLAGS="$(CFLAGS)")
8
9 install:
10         mkdir -p $(ROOT)/etc/profile.d $(ROOT)/sbin/network-scripts $(ROOT)/etc/sysconfig/interfaces
11         install -m644 inittab $(ROOT)/etc
12         install -m644 adjtime $(ROOT)/etc
13         install -m644 inputrc $(ROOT)/etc
14         install -m644 sysconfig/network $(ROOT)/etc/sysconfig
15         install -m644 sysconfig/system $(ROOT)/etc/sysconfig
16         install -m644 sysconfig/static-routes $(ROOT)/etc/sysconfig
17         install -m755 network-scripts/if* $(ROOT)/sbin/network-scripts
18         install -m644 network-scripts/network-functions $(ROOT)/sbin/network-scripts
19         install -m755 setsysfont $(ROOT)/sbin
20         install -m755 lang.sh $(ROOT)/etc/profile.d
21         cp -af sysconfig/interfaces $(ROOT)/etc/sysconfig
22         cp -af rc.d ppp $(ROOT)/etc
23         install -m755 $(ROOT)/sbin/network-scripts/ifup $(ROOT)/sbin
24         install -m755 $(ROOT)/sbin/network-scripts/ifdown $(ROOT)/sbin
25         (cd $(ROOT)/sbin/network-scripts; \
26           ln -sf ../ifup . ; \
27           ln -sf ../ifdown . )
28         (cd src; make install ROOT=$(ROOT))
29         mkdir -p $(ROOT)/var/run/netreport
30         chmod og=rwx,o=rx $(ROOT)/var/run/netreport
31
32 tag-archive:
33         @cvs -Q tag -F $(CVSTAG)
34
35 create-archive: tag-archive
36         @rm -rf /tmp/rc-scripts
37         @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) rc-scripts || echo GRRRrrrrr -- ignore [export aborted]
38         @mv /tmp/rc-scripts /tmp/rc-scripts-$(VERSION)
39         @cd /tmp; tar czSpf rc-scripts-$(VERSION).tar.gz rc-scripts-$(VERSION)
40         @rm -rf /tmp/rc-scripts-$(VERSION)
41         @cp /tmp/rc-scripts-$(VERSION).tar.gz .
42         @rm -f /tmp/rc-scripts-$(VERSION).tar.gz 
43         @echo " "
44         @echo "The final archive is ./rc-scripts-$(VERSION).tar.gz."
45
46 archive: tag-archive create-archive
This page took 0.01769 seconds and 2 git commands to generate.