# Maintainer: Mike Staszel # Maintainer: Tobias Powalowski # Maintainer: Thomas Bächler pkgbase="udev" pkgname=('udev' 'udev-compat') pkgver=157 pkgrel=1 arch=('arm') 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 11-media-by-label-auto-mount.rules 11-sd-cards-auto-mount.rules) md5sums=('0ea39cc875116982abf200eb16c1b53e' '6393ee81993f8b9beb776ca904005864' 'f91fddc67609b45b244a624977c4247b' '2e808ee78d237c478b57af2a68d43769' '2d6dc6842464f107bccc68cd505a6c31' '70198227b7bbe3852e1cd2299693af66' 'b71221f5d3588b5f1522906bb7cd7c6b' '689cf10b97269e68db29451809e28419') 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 mv "${pkgdir}/lib/girepository-1.0" "${pkgdir}/usr/lib/" || return 1 # Plugbox Linux USB drive and SD card automount rules cp -R $srcdir/11-media-by-label-auto-mount.rules $pkgdir/etc/udev/rules.d/ cp -R $srcdir/11-sd-cards-auto-mount.rules $pkgdir/etc/udev/rules.d/ } 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 }