DESCRIPTION = "Itsy Package Manager"
LICENSE = "GPL"
PROVIDES = "virtual/ipkg"
DEPENDS = "virtual/libc"

SRC_URI = "cvs://anoncvs:anoncvs@192.58.209.91/cvs;module=familiar/dist/ipkg;tag=${@'V' + oe.data.getVar('PV',d,1).replace('.', '-')}"
S = "${WORKDIR}/ipkg/C"

inherit autotools libtool

pkg_postinst () {
#!/bin/sh
if [ "x$D" != "x" ]; then
	install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
	# this needs to happen after S35mountall so that /tmp is available
	echo -e "#!/bin/sh\nipkg-cl configure\nrm -f \$0" > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S36configure
	chmod 755 ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S36configure
fi

update-alternatives --install /usr/bin/ipkg ipkg /usr/bin/ipkg-cl 100
}

pkg_postrm () {
#!/bin/sh
update-alternatives --remove ipkg /usr/bin/ipkg-cl
}