# Description: Linux USB/PCI Hotplug scripts
# URL: http://linux-hotplug.sourceforge.net/
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: pciutils, usbutils

name=hotplug
version=2004_09_23
release=7
source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$name-$version.tar.bz2 \
	$name-$version-default.patch)

build() {
	cd $name-$version
	patch -p0 etc/hotplug.d/default/default.hotplug \
		< $SRC/$name-$version-default.patch
	install -D sbin/hotplug $PKG/sbin/hotplug
	mkdir -p $PKG/etc/hotplug/{pci,usb} $PKG/lib/firmware
	install -D etc/hotplug.d/default/default.hotplug \
		$PKG/etc/hotplug.d/default/default.hotplug
	for i in etc/hotplug/{*.{agent,rc},hotplug.functions}
	do
		install $i $PKG/etc/hotplug/
	done
	for i in etc/hotplug/{blacklist,usb.{user,hand,dist}map}
	do
		install -m 0644 $i $PKG/etc/hotplug/
	done
	install -D $name.8 $PKG/usr/man/man8/$name.8
	mkdir -p $PKG/var/log/hotplug $PKG/var/run
	install -d -m 0700 $PKG/var/run/usb
}
