[18bce0c] | 1 | VERSION := 1.0-pre5
|
---|
[003388c] | 2 |
|
---|
[18bce0c] | 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 | dist:
|
---|
| 15 | rm -rf "dist/bootscripts-clfs-embedded-$(VERSION)"
|
---|
| 16 | mkdir -p "dist/bootscripts-clfs-embedded-$(VERSION)"
|
---|
| 17 | tar --exclude dist -c * | tar -x -C "dist/bootscripts-clfs-embedded-$(VERSION)"
|
---|
| 18 | (cd dist; tar -cjf "bootscripts-clfs-embedded-$(VERSION).tar.bz2" "bootscripts-clfs-embedded-$(VERSION)")
|
---|
| 19 | rm -rf "dist/bootscripts-clfs-embedded-$(VERSION)"
|
---|
[003388c] | 20 |
|
---|
| 21 | create-dirs:
|
---|
[18bce0c] | 22 | install -d -m ${DIRMODE} ${EXTDIR}/rc.d/{init.d,start,stop}
|
---|
[003388c] | 23 |
|
---|
[18bce0c] | 24 | install-bootscripts: create-dirs
|
---|
[003388c] | 25 | install -m ${CONFMODE} clfs/rc.d/init.d/functions ${EXTDIR}/rc.d/init.d/
|
---|
| 26 | install -m ${MODE} clfs/rc.d/startup ${EXTDIR}/rc.d/
|
---|
| 27 | install -m ${MODE} clfs/rc.d/shutdown ${EXTDIR}/rc.d/
|
---|
| 28 | install -m ${MODE} clfs/rc.d/init.d/network ${EXTDIR}/rc.d/init.d/
|
---|
| 29 | install -m ${MODE} clfs/rc.d/init.d/syslog ${EXTDIR}/rc.d/init.d/
|
---|
[719faf6] | 30 | install -m ${MODE} clfs/rc.d/init.d/bridge ${EXTDIR}/rc.d/init.d/
|
---|
[79f7100] | 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
|
---|
[719faf6] | 35 | ln -sf ../init.d/bridge ${EXTDIR}/rc.d/start/S09bridge
|
---|
| 36 | ln -sf ../init.d/bridge ${EXTDIR}/rc.d/stop/K81bridge
|
---|
[003388c] | 37 |
|
---|
[18bce0c] | 38 | install-bcm47xx: create-dirs
|
---|
[bbf155c] | 39 | install -m ${MODE} clfs/rc.d/init.d/bcm47xx-switch ${EXTDIR}/rc.d/init.d/
|
---|
| 40 | ln -sf ../init.d/bcm47xx-switch ${EXTDIR}/rc.d/start/S08bcm47xx-switch
|
---|
| 41 | ln -sf ../init.d/bcm47xx-switch ${EXTDIR}/rc.d/stop/K82bcm47xx-switch
|
---|
[18bce0c] | 42 |
|
---|
[003388c] | 43 | install-dropbear: create-dirs
|
---|
[bbf155c] | 44 | install -m ${MODE} clfs/rc.d/init.d/sshd ${EXTDIR}/rc.d/init.d/
|
---|
| 45 | ln -sf ../init.d/sshd ${EXTDIR}/rc.d/start/S30sshd
|
---|
| 46 | ln -sf ../init.d/sshd ${EXTDIR}/rc.d/stop/K30sshd
|
---|
[003388c] | 47 |
|
---|
[884672b] | 48 | install-hostapd: create-dirs
|
---|
[bbf155c] | 49 | install -m ${MODE} clfs/rc.d/init.d/hostapd ${EXTDIR}/rc.d/init.d
|
---|
| 50 | ln -sf ../init.d/hostapd ${EXTDIR}/rc.d/start/S08hostapd
|
---|
| 51 | ln -sf ../init.d/hostapd ${EXTDIR}/rc.d/stop/K82hostapd
|
---|
[c05b9cf] | 52 |
|
---|
[18bce0c] | 53 | .PHONY: dist all create-dirs install install-bcm47xx install-dropbear \
|
---|
| 54 | install-hostapd
|
---|