# $Header: /magellan-cvs/smage/hotplug/hotplug-20040923-r11.smage2,v 1.1 2008/02/10 21:56:38 niro Exp $ PNAME="hotplug" PVER="20040923" PBUILD="r12" PCATEGORIE="sys-apps" STATE="unstable" DESCRIPTION="hotplug contains scripts that react upon hotplug events generated by the kernel." HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/" DEPEND=">= sys-apps/pciutils-2.1.9 >= sys-apps/usbutils-0.9 >= sys-apps/initscripts-0.2" SRCFILE="${PNAME}-2004_09_23.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-2004_09_23" sminclude mtools SRC_URI=( http://www.kernel.org/pub/linux/utils/kernel/${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd ${HOMEPAGE} | grep ${PNAME}-[0-9].* | lasttarball gz | sed s/_//g" src_prepare() { munpack ${SRCFILE} || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /sbin || die # install sbin minstallexec sbin/hotplug /sbin || die # mark non deletable mkeepdir /lib/firmware || die mkeepdir /etc/hotplug.d || die mkeepdir /var/run/usb || die # install man-pages minstallman *.8 || die # docs minstalldocs ChangeLog README* || die } preinstall() { # remove hotplug script from rc-init if [ -x ${MROOT}/sbin/rc-config ] then if [[ -n $(${MROOT}/sbin/rc-config show hotplug | grep hotplug: | cut -d: -f2) ]] then ${MROOT}/sbin/rc-config del hotplug fi fi } postinstall() { # delete old cruft [[ -d ${MROOT}/etc/hotplug.d/default ]] && rm -rf ${MROOT}/etc/hotplug.d/default [[ -f ${MROOT}/etc/rc.d/init.d/hotplug ]] && rm ${MROOT}/etc/rc.d/init.d/hotplug if [[ -d ${MROOT}/etc/hotplug ]] then rm -rf ${MROOT}/etc/hotplug fi }