PKGBUILDs/core/udev-oxnas/PKGBUILD

79 lines
2.7 KiB
Bash
Raw Normal View History

2011-10-25 21:18:24 +00:00
# $Id: PKGBUILD 141113 2011-10-24 09:59:23Z dreisner $
2011-07-05 23:34:18 +00:00
# Maintainer: Tom Gundersen <teg@jklm.no>
2011-11-10 20:46:20 +00:00
# Contributor: Aaron Griffin <aaron@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>
2011-07-05 23:34:18 +00:00
# ALARM: Jason Plum <max@warheads.net>
# - Make this compatible with non-accept4 kernels.
2012-01-30 00:53:06 +00:00
# - due to newer udev requiring devtmpfs (not available in .31), keeping udev at 175
2011-07-05 23:34:18 +00:00
2011-10-25 21:18:24 +00:00
plugrel=1
2011-07-05 23:34:18 +00:00
2011-10-25 21:18:24 +00:00
_pkgbase='udev'
pkgname='udev-oxnas'
2012-04-13 14:46:21 +00:00
pkgver=182
2012-01-30 00:53:06 +00:00
_pkgver=175
2012-04-15 18:46:12 +00:00
pkgrel=2
2011-07-05 23:34:18 +00:00
arch=(i686 x86_64)
url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
license=('GPL')
options=(!makeflags !libtool)
2011-10-25 21:18:24 +00:00
makedepends=('gobject-introspection' 'gperf')
2012-01-30 00:53:06 +00:00
source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$_pkgbase-$_pkgver.tar.bz2
2011-07-05 23:34:18 +00:00
81-arch.rules
2011-10-25 21:18:24 +00:00
pre-accept4-kernel.patch)
2011-11-10 20:46:20 +00:00
md5sums=('2fc9c1efcbde98e3d73ffee7a77aea47'
2011-10-25 21:18:24 +00:00
'3da2bb9891592f9438a07bd641465531'
2011-11-10 20:46:20 +00:00
'8b28d85b2158be1b5a190135c9cc8851')
2011-07-05 23:34:18 +00:00
build() {
2012-01-30 00:53:06 +00:00
cd $srcdir/$_pkgbase-$_pkgver
2011-10-25 21:18:24 +00:00
patch -Np1 -i ${srcdir}/pre-accept4-kernel.patch
./configure --sysconfdir=/etc\
--with-rootlibdir=/lib\
--libexecdir=/lib/udev\
--sbindir=/sbin\
--with-systemdsystemunitdir=/lib/systemd/system\
--disable-rule-generator\
--enable-udev_acl
2011-07-05 23:34:18 +00:00
make
}
package_udev-oxnas() {
2012-04-13 14:46:21 +00:00
pkgdesc="The userspace dev tools for old kernels (udev ${_pkgver})"
depends=('util-linux' 'libusb-compat' 'glib2' 'kmod' 'pciutils')
2011-07-05 23:34:18 +00:00
install=udev.install
2011-10-25 21:18:24 +00:00
backup=(etc/udev/udev.conf)
2012-04-01 22:01:03 +00:00
provides=("udev=${pkgver}")
2012-04-15 18:46:12 +00:00
conflicts=('udev')
2011-07-05 23:34:18 +00:00
2012-01-30 00:53:06 +00:00
cd $srcdir/$_pkgbase-$_pkgver
2011-07-05 23:34:18 +00:00
make DESTDIR=${pkgdir} install
# Install our rule for permissions and symlinks
install -D -m644 $srcdir/81-arch.rules $pkgdir/lib/udev/rules.d/81-arch.rules
# create framebuffer blacklist
2011-10-25 21:18:24 +00:00
mkdir -p $pkgdir/lib/modprobe.d/
2011-07-05 23:34:18 +00:00
for mod in $(find /lib/modules/*/kernel/drivers/video -name '*fb.ko.gz' -exec basename {} .ko.gz \;); do
echo "blacklist $mod"
2011-10-25 21:18:24 +00:00
done | sort -u > $pkgdir/lib/modprobe.d/framebuffer_blacklist.conf
2011-07-05 23:34:18 +00:00
2011-10-25 21:18:24 +00:00
# /dev/loop0 is created for convenience, to autoload the module if necessary
# may be obsoleted by https://lkml.org/lkml/2011/7/30/111
2011-07-05 23:34:18 +00:00
mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0
chgrp disk ${pkgdir}/lib/udev/devices/loop0
2011-10-25 21:18:24 +00:00
# udevd moved, symlink to make life easy for restarting udevd manually
ln -s /lib/udev/udevd ${pkgdir}/sbin/udevd
2011-07-05 23:34:18 +00:00
# Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
for i in $pkgdir/lib/udev/rules.d/*.rules; do
sed -i -e 's#GROUP="dialout"#GROUP="uucp"#g;
s#GROUP="tape"#GROUP="storage"#g;
s#GROUP="cdrom"#GROUP="optical"#g' $i
done
}