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