1 # $Id: PKGBUILD 142408 2011-11-09 04:55:56Z tomegun $
2 # Maintainer: Dave Reisner <dreisner@archlinux.org>
3 # Contributor: Tom Gundersen <teg@jklm.no>
4 # Contributor: Aaron Griffin <aaron@archlinux.org>
5 # Contributor: Tobias Powalowski <tpowa@archlinux.org>
6 # Contributor: Thomas Bächler <thomas@archlinux.org>
11 pkgdesc="The userspace dev tools (udev)"
12 arch=('i686' 'x86_64')
13 url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
16 options=('!makeflags' '!libtool')
17 depends=('util-linux' 'libusb-compat' 'glib2' 'module-init-tools' 'pciutils' 'kmod')
18 makedepends=('git' 'gobject-introspection' 'gperf' 'gtk-doc')
21 backup=('etc/udev/udev.conf')
22 source=('81-arch.rules')
23 md5sums=('3da2bb9891592f9438a07bd641465531')
25 _gitroot='git://git.kernel.org/pub/scm/linux/hotplug/udev.git'
29 msg "Connecting to GIT server...."
31 if [[ -d $_gitname ]] ; then
32 cd "$_gitname" && git pull origin
33 msg "The local files are updated."
35 git clone "$_gitroot" "$_gitname"
38 msg "GIT checkout done or server timeout"
39 msg "Starting make..."
41 rm -rf "$srcdir/$_gitname-build"
42 cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
43 cd "$srcdir/$_gitname-build"
51 --with-rootlibdir=/lib \
53 --with-systemdsystemunitdir=/lib/systemd/system \
54 --disable-rule-generator \
61 make -C "$_gitname-build" check
65 make -C "$_gitname-build" DESTDIR="$pkgdir" install
67 # Install our rule for permissions and symlinks
68 install -D -m644 "$srcdir/81-arch.rules" "$pkgdir/lib/udev/rules.d/81-arch.rules"
70 # create framebuffer blacklist
71 install -dm755 "$pkgdir/lib/modprobe.d"
72 if pushd /lib/modules/ &>/dev/null; then
73 for mod in */kernel/drivers/video/*fb.ko* */kernel/drivers/video/*/*fb.ko*; do
75 printf 'blacklist %s\n' "${mod##*/}"
76 done | sort -u > "$pkgdir/lib/modprobe.d/framebuffer_blacklist.conf"
80 # /dev/loop0 is created for convenience, to autoload the module if necessary
81 # may be obsoleted by https://lkml.org/lkml/2011/7/30/111
82 install -dm755 "$pkgdir/lib/udev/devices"
83 mknod -m 0660 "$pkgdir/lib/udev/devices/loop0" b 7 0
84 chgrp disk "$pkgdir/lib/udev/devices/loop0"
86 # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
87 for i in "$pkgdir"/lib/udev/rules.d/*.rules; do
88 sed -i 's#GROUP="dialout"#GROUP="uucp"#g;
89 s#GROUP="tape"#GROUP="storage"#g;
90 s#GROUP="cdrom"#GROUP="optical"#g' "$i"
94 # vim: ft=sh syn=sh et