56 lines
1.8 KiB
Plaintext
56 lines
1.8 KiB
Plaintext
# Description: Userspace device management daemon
|
|
# URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
|
|
|
name=udev
|
|
version=128
|
|
release=1
|
|
source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$name-$version.tar.bz2 \
|
|
http://crux.nu/files/distfiles/udev-config-20080217.tar.bz2 \
|
|
start_udev cdrom.rules cdsymlinks)
|
|
|
|
build() {
|
|
local extras="extras/ata_id \
|
|
extras/cdrom_id \
|
|
extras/edd_id \
|
|
extras/firmware \
|
|
extras/floppy \
|
|
extras/path_id \
|
|
extras/scsi_id \
|
|
extras/usb_id \
|
|
extras/volume_id"
|
|
|
|
cd udev-$version
|
|
|
|
./configure --prefix=/usr --exec-prefix= --sysconfdir=/etc
|
|
|
|
make EXTRAS="$extras"
|
|
make install DESTDIR=$PKG mandir="/usr/man" EXTRAS="$extras"
|
|
|
|
pushd $SRC/udev-config-20080217
|
|
make DESTDIR=$PKG RULES_DIR=/lib/udev/rules.d install
|
|
popd
|
|
|
|
mkdir -p $PKG/lib/{firmware,udev/devices/{pts,shm}}
|
|
mknod -m 600 $PKG/lib/udev/devices/console c 5 1
|
|
mknod -m 666 $PKG/lib/udev/devices/null c 1 3
|
|
mknod -m 666 $PKG/lib/udev/devices/zero c 1 5
|
|
ln -s /proc/self/fd $PKG/lib/udev/devices/fd
|
|
ln -s /proc/self/fd/0 $PKG/lib/udev/devices/stdin
|
|
ln -s /proc/self/fd/1 $PKG/lib/udev/devices/stdout
|
|
ln -s /proc/self/fd/2 $PKG/lib/udev/devices/stderr
|
|
ln -s /proc/kcore $PKG/lib/udev/devices/core
|
|
install -m 0755 $SRC/start_udev $PKG/sbin
|
|
install -m 0755 $SRC/cdsymlinks $PKG/lib/udev/
|
|
install -m 644 rules/rules.d/[0-9]* $PKG/lib/udev/rules.d/
|
|
install -m 644 $SRC/cdrom.rules $PKG/lib/udev/rules.d/61-cdrom.rules
|
|
|
|
# Comment uucp lines in default rules
|
|
sed -i 's|.*uucp.*|#&|g' $PKG/lib/udev/rules.d/50-udev-default.rules
|
|
sed -i 's|.*uucp.*|#&|g' $PKG/lib/udev/rules.d/55-lfs.rules
|
|
|
|
# Keep udevinfo for legacy support
|
|
mkdir -p $PKG/usr/bin
|
|
ln -s /sbin/udevadm $PKG/usr/bin/udevinfo
|
|
}
|