2010-05-03 14:58:09 +00:00
|
|
|
# Maintainer: Mike Staszel <mikestaszel@plugboxlinux.org>
|
2010-05-03 14:57:08 +00:00
|
|
|
|
|
|
|
pkgbase="udev"
|
|
|
|
pkgname=('udev' 'udev-compat')
|
|
|
|
pkgver=151
|
2010-06-25 06:44:35 +00:00
|
|
|
pkgrel=4
|
|
|
|
arch=('arm')
|
2010-05-03 14:57:08 +00:00
|
|
|
url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
|
|
|
|
license=('GPL')
|
|
|
|
groups=('base')
|
|
|
|
# older initscripts versions required start_udev
|
|
|
|
options=(!makeflags !libtool)
|
|
|
|
makedepends=('glibc' 'coreutils' 'util-linux' 'libusb' 'glib2' 'kernel26' 'gperf' 'libxslt' 'gobject-introspection')
|
|
|
|
source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2
|
|
|
|
81-arch.rules
|
|
|
|
load-modules.sh
|
|
|
|
cdsymlinks.sh
|
|
|
|
root-link.sh
|
|
|
|
arch-udev-rules.patch
|
|
|
|
ignore-remove.sh
|
|
|
|
firmware-loader-fix-missing-firmware.patch
|
|
|
|
11-media-by-label-auto-mount.rules)
|
|
|
|
md5sums=('aeae0e6273dcbec246c3c1b9868ebed1'
|
|
|
|
'6393ee81993f8b9beb776ca904005864'
|
|
|
|
'a2d0d59742b80b3b28ed498718654eb7'
|
|
|
|
'2e808ee78d237c478b57af2a68d43769'
|
|
|
|
'2d6dc6842464f107bccc68cd505a6c31'
|
|
|
|
'22c1f059cdeddaac5e7fe33b007da6a3'
|
|
|
|
'35fa97500243a79b2370fa4684828e69'
|
|
|
|
'ec1fa2ecaff2e8efc611cb70568630ad'
|
|
|
|
'6abee92d6289a0dfe1b86861fce8131f')
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $srcdir/$pkgname-$pkgver
|
|
|
|
# The new firmware loader has a bug where modprobe will hang 60 seconds when a
|
|
|
|
# firmware file is missing. Fix this by properly reporting error to the kernel
|
|
|
|
patch -p1 -i "$srcdir"/firmware-loader-fix-missing-firmware.patch || return 1
|
|
|
|
./configure --prefix="" --mandir=/usr/share/man\
|
|
|
|
--includedir=/usr/include\
|
|
|
|
--libexecdir=/lib/udev\
|
|
|
|
--datarootdir=/usr/share
|
|
|
|
make || return 1
|
|
|
|
}
|
|
|
|
|
|
|
|
package_udev() {
|
|
|
|
pkgdesc="The userspace dev tools (udev)"
|
|
|
|
depends=('glibc' 'coreutils' 'util-linux' 'libusb' 'glib2'
|
|
|
|
'module-init-tools>=3.11')
|
|
|
|
install=udev.install
|
|
|
|
backup=(etc/udev/udev.conf
|
|
|
|
etc/modprobe.d/framebuffer_blacklist.conf)
|
|
|
|
conflicts=('pcmcia-cs' 'hotplug' 'initscripts<2009.07')
|
|
|
|
replaces=('devfsd')
|
|
|
|
|
|
|
|
cd $srcdir/$pkgname-$pkgver
|
|
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
# Fix pkgconfig path
|
|
|
|
install -d -m755 $pkgdir/usr/lib
|
|
|
|
mv $pkgdir/lib/pkgconfig $pkgdir/usr/lib
|
|
|
|
# Fix ConsoleKit path
|
|
|
|
mv $pkgdir/lib/ConsoleKit $pkgdir/usr/lib
|
|
|
|
# Install our rule for permissions and symlinks
|
|
|
|
install -D -m644 $srcdir/81-arch.rules $pkgdir/lib/udev/rules.d/81-arch.rules
|
|
|
|
# install our module loading subsystem
|
|
|
|
install -D -m755 $srcdir/load-modules.sh $pkgdir/lib/udev/load-modules.sh
|
|
|
|
# install cdsymlinks.sh
|
|
|
|
install -D -m755 $srcdir/cdsymlinks.sh $pkgdir/lib/udev/cdsymlinks.sh
|
|
|
|
# install root-link.sh
|
|
|
|
install -D -m755 $srcdir/root-link.sh $pkgdir/lib/udev/root-link.sh
|
|
|
|
# install ignore-remove.sh
|
|
|
|
install -D -m755 $srcdir/ignore-remove.sh $pkgdir/lib/udev/ignore-remove.sh
|
|
|
|
# disable error logging to prevent startup failures printed to vc on boot
|
|
|
|
sed -i -e 's|udev_log="err"|udev_log="0"|g' $pkgdir/etc/udev/udev.conf
|
|
|
|
# install additional standard rules files
|
|
|
|
for rule in $srcdir/$pkgname-$pkgver/rules/packages/*.rules; do
|
|
|
|
install -D -m 644 $rule $pkgdir/lib/udev/rules.d/
|
|
|
|
done
|
|
|
|
# fix standard udev rules to fit to arch
|
|
|
|
cd $pkgdir/lib/udev/rules.d/
|
|
|
|
patch -Np1 -i $srcdir/arch-udev-rules.patch || return 1
|
|
|
|
# remove .orig files
|
|
|
|
rm -f $pkgdir/lib/udev/rules.d/*.orig
|
|
|
|
# disable persistent cdromsymlinks and network by default
|
|
|
|
# and move it to /etc/udev/rules.d
|
|
|
|
mv $pkgdir/lib/udev/rules.d/75-persistent-net-generator.rules \
|
|
|
|
$pkgdir/etc/udev/rules.d/75-persistent-net-generator.rules.optional
|
|
|
|
mv $pkgdir/lib/udev/rules.d/75-cd-aliases-generator.rules \
|
|
|
|
$pkgdir/etc/udev/rules.d/75-cd-aliases-generator.rules.optional
|
|
|
|
# remove not needed rules
|
|
|
|
rm $pkgdir/lib/udev/rules.d/40-ia64.rules
|
|
|
|
rm $pkgdir/lib/udev/rules.d/40-ppc.rules
|
|
|
|
rm $pkgdir/lib/udev/rules.d/40-s390.rules
|
|
|
|
rm $pkgdir/lib/udev/rules.d/64-device-mapper.rules
|
|
|
|
rm $pkgdir/lib/udev/rules.d/64-md-raid.rules
|
|
|
|
|
|
|
|
# create framebuffer blacklist
|
|
|
|
mkdir -p $pkgdir/etc/modprobe.d/
|
|
|
|
for mod in $(find /lib/modules/*/kernel/drivers/video -name '*fb.ko' -exec basename {} .ko \;); do
|
|
|
|
echo "blacklist $mod" >> $pkgdir/etc/modprobe.d/framebuffer_blacklist.conf
|
|
|
|
done
|
|
|
|
|
|
|
|
# create static devices in /lib/udev/devices/
|
|
|
|
mkdir ${pkgdir}/lib/udev/devices
|
|
|
|
mkdir ${pkgdir}/lib/udev/devices/pts
|
|
|
|
mkdir ${pkgdir}/lib/udev/devices/shm
|
|
|
|
|
|
|
|
mknod -m 0600 ${pkgdir}/lib/udev/devices/console c 5 1 || return 1
|
|
|
|
mknod -m 0666 ${pkgdir}/lib/udev/devices/null c 1 3 || return 1
|
|
|
|
mknod -m 0660 ${pkgdir}/lib/udev/devices/zero c 1 5 || return 1
|
|
|
|
mknod -m 0666 ${pkgdir}/lib/udev/devices/kmsg c 1 11 || return 1
|
|
|
|
|
|
|
|
ln -snf /proc/self/fd ${pkgdir}/lib/udev/devices/fd || return 1
|
|
|
|
ln -snf /proc/self/fd/0 ${pkgdir}/lib/udev/devices/stdin || return 1
|
|
|
|
ln -snf /proc/self/fd/1 ${pkgdir}/lib/udev/devices/stdout || return 1
|
|
|
|
ln -snf /proc/self/fd/2 ${pkgdir}/lib/udev/devices/stderr || return 1
|
|
|
|
ln -snf /proc/kcore ${pkgdir}/lib/udev/devices/core || return 1
|
|
|
|
|
|
|
|
# these static devices are created for convenience, to autoload the modules if necessary
|
|
|
|
# /dev/loop0
|
|
|
|
mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0 || return 1
|
|
|
|
chgrp disk ${pkgdir}/lib/udev/devices/loop0 || return 1
|
|
|
|
# /dev/net/tun
|
|
|
|
mkdir ${pkgdir}/lib/udev/devices/net
|
|
|
|
mknod -m 0666 ${pkgdir}/lib/udev/devices/net/tun c 10 200 || return 1
|
|
|
|
# /dev/fuse
|
|
|
|
mknod -m 0666 ${pkgdir}/lib/udev/devices/fuse c 10 229 || return 1
|
|
|
|
# /dev/ppp
|
|
|
|
mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0 || return 1
|
|
|
|
|
|
|
|
# Replace dialout group in rules with uucp group
|
|
|
|
for i in $pkgdir/lib/udev/rules.d/*.rules; do
|
|
|
|
sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g' $i
|
|
|
|
done
|
|
|
|
|
|
|
|
# Add Plugbox Linux USB and SD-card automount rules
|
2010-06-25 06:44:35 +00:00
|
|
|
cp -R $srcdir/11-media-by-label-auto-mount.rules $pkgdir/etc/udev/rules.d/
|
2010-05-03 14:57:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_udev-compat() {
|
|
|
|
pkgdesc="The userspace dev tools (udev) - additional rules for older kernels"
|
|
|
|
depends=('udev')
|
|
|
|
groups=('')
|
|
|
|
cd $srcdir/$pkgname-$pkgver
|
|
|
|
install -d -m755 ${pkgdir}/lib/${pkgname}/rules.d
|
|
|
|
install -D -m644 ${srcdir}/${pkgname}-${pkgver}/rules/gentoo/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules
|
|
|
|
}
|