1 | VERSION := 1.0-pre4 |
---|
2 | |
---|
3 | ETCDIR := /etc |
---|
4 | EXTDIR := ${DESTDIR}${ETCDIR} |
---|
5 | MODE := 754 |
---|
6 | DIRMODE := 755 |
---|
7 | CONFMODE := 644 |
---|
8 | |
---|
9 | all: |
---|
10 | @grep "^install" Makefile | cut -d ":" -f 1 |
---|
11 | @echo dist |
---|
12 | @echo "Select an appropriate install target from the above list" ; exit 1 |
---|
13 | |
---|
14 | .PHONY: dist |
---|
15 | dist: |
---|
16 | rm -rf "dist/bootscripts-clfs-embedded-$(VERSION)" |
---|
17 | mkdir -p "dist/bootscripts-clfs-embedded-$(VERSION)" |
---|
18 | tar --exclude dist -c * | tar -x -C "dist/bootscripts-clfs-embedded-$(VERSION)" |
---|
19 | (cd dist; tar -cjf "bootscripts-clfs-embedded-$(VERSION).tar.bz2" "bootscripts-clfs-embedded-$(VERSION)") |
---|
20 | rm -rf "dist/bootscripts-clfs-embedded-$(VERSION)" |
---|
21 | |
---|
22 | create-dirs: |
---|
23 | install -d -m ${DIRMODE} ${EXTDIR}/rc.d/{init.d,start,stop} |
---|
24 | |
---|
25 | install-bootscripts: create-dirs |
---|
26 | install -m ${CONFMODE} clfs/rc.d/init.d/functions ${EXTDIR}/rc.d/init.d/ |
---|
27 | install -m ${MODE} clfs/rc.d/startup ${EXTDIR}/rc.d/ |
---|
28 | install -m ${MODE} clfs/rc.d/shutdown ${EXTDIR}/rc.d/ |
---|
29 | install -m ${MODE} clfs/rc.d/init.d/network ${EXTDIR}/rc.d/init.d/ |
---|
30 | install -m ${MODE} clfs/rc.d/init.d/syslog ${EXTDIR}/rc.d/init.d/ |
---|
31 | ln -sf ../init.d/syslog ${EXTDIR}/rc.d/start/S05syslog |
---|
32 | ln -sf ../init.d/syslog ${EXTDIR}/rc.d/stop/K99syslog |
---|
33 | ln -sf ../init.d/network ${EXTDIR}/rc.d/start/S10network |
---|
34 | ln -sf ../init.d/network ${EXTDIR}/rc.d/stop/K80network |
---|
35 | |
---|
36 | install-dropbear: create-dirs |
---|
37 | install -m ${MODE} clfs/rc.d/init.d/sshd ${EXTDIR}/rc.d/init.d/ |
---|
38 | ln -sf ../init.d/sshd ${EXTDIR}/rc.d/start/S30sshd |
---|
39 | ln -sf ../init.d/sshd ${EXTDIR}/rc.d/stop/K30sshd |
---|
40 | |
---|
41 | .PHONY: all create-dirs install install-dropbear |
---|