]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/nslu2-binary-only/unslung-rootfs_2.3r29.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / nslu2-binary-only / unslung-rootfs_2.3r29.bb
1 SECTION = "base"
2
3 PR = "r9"
4
5 DEPENDS = "nslu2-linksys-libs"
6
7 SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r29.tar.bz2 \
8            file://README \
9            file://NOTES \
10            file://unsling \
11            file://resling \
12            file://slingover \
13            file://linuxrc \
14            file://nsswitch.conf \
15            file://rc.unslung-start \
16            file://rc.unslung-stop \
17            file://rc-diversion.patch;patch=1 \
18            file://rc.1-diversion.patch;patch=1 \
19            file://rc.crond-diversion.patch;patch=1 \
20            file://rc.halt-diversion.patch;patch=1 \
21            file://rc.local-diversion.patch;patch=1 \
22            file://rc.modules-diversion.patch;patch=1 \
23            file://rc.network-diversion.patch;patch=1 \
24            file://rc.quickset-diversion.patch;patch=1 \
25            file://rc.quota-diversion.patch;patch=1 \
26            file://rc.reboot-diversion.patch;patch=1 \
27            file://rc.reset_usrgrpshare-diversion.patch;patch=1 \
28            file://rc.rstimezone-diversion.patch;patch=1 \
29            file://rc.samba-diversion.patch;patch=1 \
30            file://rc.sysinit-diversion.patch;patch=1 \
31            file://rc.thttpd-diversion.patch;patch=1 \
32            file://rc.xinetd-diversion.patch;patch=1 \
33            file://root-passwd.patch;patch=1 \
34            file://tmp-handling.patch;patch=1 \
35            file://create-ramdisks.patch;patch=1 \
36            file://remount-noatime.patch;patch=1 \
37            file://initialise-mtab.patch;patch=1 \
38            file://wait-for-quotacheck.patch;patch=1 \
39            file://mount_usbdevfs.patch;patch=1 \
40            file://security-fixes.patch;patch=1 \
41            file://upgrade.htm file://upgrade.cgi \
42            file://rc.bootbin \
43            "
44
45 S = "${WORKDIR}/nslu2-linksys-ramdisk-2.3r29"
46
47 python () {
48         # Don't build unslung images unless we're targeting an nslu2
49         mach = bb.data.getVar("MACHINE", d, 1)
50         dist = bb.data.getVar("DISTRO", d, 1)
51         if mach != 'nslu2' or dist != 'unslung':
52                 raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2")
53 }
54
55 do_compile () {
56         echo "V2.3R29-uNSLUng-${DISTRO_VERSION}" > ${S}/.unslung
57
58         sed -i -e s/@version#/@version#-uNSLUng-${DISTRO_VERSION}/ ${S}/home/httpd/html/home.htm
59         sed -i -e 's|>&nbsp;<|><a href="Unslung" class="mainmenu" target="_top">Unslung Doco</a><|' \
60                 ${S}/home/httpd/html/manhead.htm
61
62         install -m 755 ${WORKDIR}/linuxrc ${S}/linuxrc
63
64         # Allow rc.bootbin to be diverted.
65         mv ${S}/etc/rc.d/rc.bootbin ${S}/sbin/rc.bootbin
66         install -m 755 ${WORKDIR}/rc.bootbin ${S}/etc/rc.d/rc.bootbin
67
68         install -d ${S}/initrd
69
70         install -m 755 ${WORKDIR}/unsling ${S}/sbin/unsling
71         install -m 755 ${WORKDIR}/resling ${S}/sbin/resling
72         install -m 755 ${WORKDIR}/slingover ${S}/sbin/slingover
73         install -m 755 ${WORKDIR}/rc.unslung-start ${S}/etc/rc.d/rc.unslung-start
74         install -m 755 ${WORKDIR}/rc.unslung-stop ${S}/etc/rc.d/rc.unslung-stop
75
76         install -m 644 ${WORKDIR}/nsswitch.conf ${S}/etc/nsswitch.conf
77
78         install -d ${S}/opt/doc
79         install -m 755 ${WORKDIR}/README ${S}/opt/doc/README
80         install -m 755 ${WORKDIR}/NOTES ${S}/opt/doc/NOTES
81         ln -s /opt/doc ${S}/home/httpd/html/Unslung
82
83         # Add the diversion script directory
84         install -d ${S}/unslung
85
86         # Remove the libraries, because they are in nslu2-linksys-libs now
87         rm -rf ${S}/lib
88
89         # Install upgrade mode files
90         mv ${S}/home/httpd/html/Management/upgrade.htm ${S}/home/httpd/html/Management/upgrade-old.htm 
91         mv ${S}/home/httpd/html/Management/upgrade.cgi ${S}/home/httpd/html/Management/upgrade-old.cgi 
92         install -m 644 ${WORKDIR}/upgrade.htm ${S}/home/httpd/html/Management
93         install -m 755 ${WORKDIR}/upgrade.cgi ${S}/home/httpd/html/Management
94         sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${DISTRO_VERSION}/ \
95                 ${S}/home/httpd/html/Management/upgrade.htm
96 }
97
98 do_install () {
99         ( cd ${S} ; tar -c -v -f - --exclude '.pc' . ) | ( cd ${D} ; tar xvf - )
100 }
101
102 PACKAGES = "${PN}"
103 FILES_${PN} = "/"
104 RDEPENDS_${PN} = "nslu2-linksys-libs"