]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/nslu2-binary-only/unslung-rootfs_2.3r63.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.3r63.bb
1 SECTION = "base"
2
3 PR = "r3"
4
5 DEPENDS = "nslu2-linksys-libs"
6
7 SRC_URI = "http://nslu.sf.net/downloads/nslu2-linksys-ramdisk-2.3r63.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.3r63"
46
47 python () {
48         # Don't build unslung images unless we're targeting an nslu2
49         mach = bb.data.getVar("MACHINE", d, 1)
50         if mach != 'nslu2':
51                 raise bb.parse.SkipPackage("Unslung only builds for the Linksys NSLU2")
52 }
53
54 do_compile () {
55         echo "V2.3R63-uNSLUng-${DISTRO_VERSION}" > ${S}/.unslung
56
57         sed -i -e s/@version#/@version#-uNSLUng-${DISTRO_VERSION}/ ${S}/home/httpd/html/home.htm
58         sed -i -e 's|>&nbsp;<|><a href="Unslung" class="mainmenu" target="_top">Unslung Doco</a><|' \
59                 ${S}/home/httpd/html/manhead.htm
60
61         install -m 755 ${WORKDIR}/linuxrc ${S}/linuxrc
62
63         # Allow rc.bootbin to be diverted.
64         mv ${S}/etc/rc.d/rc.bootbin ${S}/sbin/rc.bootbin
65         install -m 755 ${WORKDIR}/rc.bootbin ${S}/etc/rc.d/rc.bootbin
66
67         install -d ${S}/initrd
68
69         install -m 755 ${WORKDIR}/unsling ${S}/sbin/unsling
70         install -m 755 ${WORKDIR}/resling ${S}/sbin/resling
71         install -m 755 ${WORKDIR}/slingover ${S}/sbin/slingover
72         install -m 755 ${WORKDIR}/rc.unslung-start ${S}/etc/rc.d/rc.unslung-start
73         install -m 755 ${WORKDIR}/rc.unslung-stop ${S}/etc/rc.d/rc.unslung-stop
74
75         install -m 644 ${WORKDIR}/nsswitch.conf ${S}/etc/nsswitch.conf
76
77         install -d ${S}/opt/doc
78         install -m 755 ${WORKDIR}/README ${S}/opt/doc/README
79         install -m 755 ${WORKDIR}/NOTES ${S}/opt/doc/NOTES
80         ln -s /opt/doc ${S}/home/httpd/html/Unslung
81
82         # Add the diversion script directory
83         install -d ${S}/unslung
84
85         # Remove the libraries, because they are in nslu2-linksys-libs now
86         rm -rf ${S}/lib
87
88         # Install upgrade mode files
89 #       mv ${S}/home/httpd/html/Management/upgrade.htm ${S}/home/httpd/html/Management/upgrade-old.htm 
90 #       mv ${S}/home/httpd/html/Management/upgrade.cgi ${S}/home/httpd/html/Management/upgrade-old.cgi 
91 #       install -m 644 ${WORKDIR}/upgrade.htm ${S}/home/httpd/html/Management
92 #       install -m 755 ${WORKDIR}/upgrade.cgi ${S}/home/httpd/html/Management
93         sed -i -e s/@ds_sw_version#/@ds_sw_version#-uNSLUng-${DISTRO_VERSION}/ \
94                 ${S}/home/httpd/html/Management/upgrade.htm
95 }
96
97 do_install () {
98         ( cd ${S} ; tar -c -v -f - --exclude '.pc' . ) | ( cd ${D} ; tar xvf - )
99 }
100
101 PACKAGES = "${PN}"
102 FILES_${PN} = "/"
103 RDEPENDS_${PN} = "nslu2-linksys-libs"