python-pyrex: Rework DEPENDS updates
[openembedded.git] / recipes / unionfs / unionroot-utils_0.1.1.bb
blob8b170200837a20ac2722f6ac3e853b9059a20e4a
1 LICENSE = "GPL"
3 DESCRIPTION = "Tools for administering a system that utilises unionroot."
4 DEPENDS = "ipkg-collateral unionroot busybox"
5 RDEPENDS_${PN} = "ipkg-collateral unionroot busybox"
6 SECTION = "base"
7 PRIORITY = "optional"
9 PR = "3"
11 SRC_URI = "file://mount.unionroot \
12 file://umount.unionroot"
14 do_install () {
15 install -d ${D}${base_bindir}
16 install -m 0755 ${WORKDIR}/mount.unionroot ${D}${base_bindir}/
17 install -m 0755 ${WORKDIR}/umount.unionroot ${D}${base_bindir}/
20 pkg_postinst () {
21 update-alternatives --install /bin/mount mount /bin/mount.unionroot 100
22 update-alternatives --install /bin/umount umount /bin/umount.unionroot 100
24 # Alter /etc/ipkg.conf
25 mv $D/${sysconfdir}/ipkg.conf $D/${sysconfdir}/ipkg.conf.old
26 awk 'BEGIN { print "# Altered by unionroot" }
27 { if ( $3 == "/" )
29 print $1 " " $2 " /media/realroot"
31 else
33 print $0
35 }' $D/${sysconfdir}/ipkg.conf.old > $D/${sysconfdir}/ipkg.conf
38 pkg_prerm () {
39 update-alternatives --remove mount /bin/mount.unionroot
40 update-alternatives --remove umount /bin/umount.unionroot