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