2010-06-27 14:04:54 +00:00
|
|
|
# Maintainer: Mike Staszel <mikestaszel@plugboxlinux.org
|
|
|
|
# Maintainer: Aaron Griffin <aaron@archlinux.org>
|
|
|
|
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
# Maintainer: Thomas Bächler <thomas@archlinux.org>
|
2010-05-03 14:57:08 +00:00
|
|
|
|
|
|
|
pkgbase="udev"
|
|
|
|
pkgname=('udev' 'udev-compat')
|
2010-06-27 14:04:54 +00:00
|
|
|
pkgver=157
|
2010-07-02 02:21:18 +00:00
|
|
|
pkgrel=2
|
2010-06-27 14:05:48 +00:00
|
|
|
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
|
2010-06-27 14:04:54 +00:00
|
|
|
81-arch.rules load-modules.sh cdsymlinks.sh root-link.sh
|
2010-05-03 14:57:08 +00:00
|
|
|
arch-udev-rules.patch
|
2010-06-27 14:04:54 +00:00
|
|
|
11-media-by-label-auto-mount.rules
|
|
|
|
11-sd-cards-auto-mount.rules)
|
|
|
|
md5sums=('0ea39cc875116982abf200eb16c1b53e'
|
2010-05-03 14:57:08 +00:00
|
|
|
'6393ee81993f8b9beb776ca904005864'
|
2010-06-27 14:04:54 +00:00
|
|
|
'f91fddc67609b45b244a624977c4247b'
|
2010-05-03 14:57:08 +00:00
|
|
|
'2e808ee78d237c478b57af2a68d43769'
|
|
|
|
'2d6dc6842464f107bccc68cd505a6c31'
|
2010-06-27 14:04:54 +00:00
|
|
|
'70198227b7bbe3852e1cd2299693af66'
|
|
|
|
'b71221f5d3588b5f1522906bb7cd7c6b'
|
|
|
|
'689cf10b97269e68db29451809e28419')
|
2010-05-03 14:57:08 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $srcdir/$pkgname-$pkgver
|
|
|
|
./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
|
|
|
|
# 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
|
2010-06-27 14:04:54 +00:00
|
|
|
|
|
|
|
mv "${pkgdir}/lib/girepository-1.0" "${pkgdir}/usr/lib/" || return 1
|
|
|
|
|
|
|
|
# Plugbox Linux USB drive and SD card automount rules
|
2010-07-02 02:21:18 +00:00
|
|
|
rm -rf $pkgdir/etc/udev/rules.d/*
|
|
|
|
cp $srcdir/11-media-by-label-auto-mount.rules $pkgdir/etc/udev/rules.d/
|
|
|
|
cp $srcdir/11-sd-cards-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
|
|
|
|
}
|