summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlexey D2015-07-05 08:55:49 +0300
committerAlexey D2015-07-05 08:55:49 +0300
commitdb3143e8c2f07a9bdc21a26ed41333cb45c4b6f4 (patch)
treeae6c3fa35018672cdd22d0519bf1df6b40512b04 /PKGBUILD
downloadaur-db3143e8c2f07a9bdc21a26ed41333cb45c4b6f4.tar.gz
initial version
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD92
1 files changed, 92 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6ec7515ccb47
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,92 @@
+# Maintainer: Alexey D. <lq07829icatm@rambler.ru>
+# Contributor: Ivailo Monev <xakepa10@gmail.com>
+pkgname='eudev-git'
+pkgdesc="The userspace dev tools (udev) forked by Gentoo"
+pkgver=20150211
+pkgrel=1
+provides=('eudev')
+replaces=('eudev' 'udev' 'systemd' 'libsystemd' 'systemd-tools')
+conflicts=('eudev' 'udev' 'systemd' 'libsystemd' 'systemd-tools')
+groups=('base')
+arch=('i686' 'x86_64')
+url="https://github.com/gentoo/eudev"
+license=('GPL')
+depends=('util-linux' 'glib2' 'kmod' 'hwids' 'bash')
+makedepends=('git' 'gobject-introspection' 'gperf' 'libxslt' 'docbook-xsl')
+options=(!makeflags !libtool)
+install="${pkgname}.install"
+backup=('etc/udev/udev.conf' 'etc/udev/rules.d/80-net-name-slot.rules')
+source=('git://github.com/gentoo/eudev.git'
+ 'initcpio_hooks'
+ 'initcpio_install'
+ '80-net-name-slot.rules')
+md5sums=('SKIP'
+ 'e99e9189aa2f6084ac28b8ddf605aeb8'
+ 'd3a7b1d77e53d401ed37827ad297846a'
+ 'd83a59d647b511b815ee0e8c85dcd54a')
+_gitname="eudev"
+
+pkgver()
+{
+ cd "${srcdir}/${_gitname}"
+
+ # Date of last commit
+ git log -1 --format="%ci" HEAD | cut -d\ -f1 | tr -d '-'
+}
+
+build() {
+ cd "${srcdir}/${_gitname}"
+
+ if [ -f "Makefile" ];then
+ msg2 "Cleaning up..."
+ make clean
+ fi
+
+ # Temporary workaround for bug #87
+ #sed /"#include <linux\/fcntl.h>"/d -i src/*/*.c
+
+ msg2 "Configuring sources..."
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --with-rootprefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib \
+ --sbindir=/usr/bin \
+ --enable-gudev \
+ --enable-introspection
+
+ msg2 "Compiling..."
+ make
+}
+
+
+package() {
+ cd "${srcdir}/${_gitname}"
+ make DESTDIR="${pkgdir}" install
+
+ # Install the mkinitpcio hook
+ install -Dm644 "${srcdir}/initcpio_hooks" "${pkgdir}/usr/lib/initcpio/hooks/udev"
+ install -Dm644 "${srcdir}/initcpio_install" "${pkgdir}/usr/lib/initcpio/install/udev"
+
+ # Replace dialout/tape/cdrom group in rules with uucp/storage/optical group
+ for i in "${pkgdir}/usr/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
+
+ # input group is not used in Arch Linux at this moment
+ sed '/GROUP="input"/d' -i "${pkgdir}/usr/lib/udev/rules.d/50-udev-default.rules"
+
+ # Make new interface naming policy disabled by default
+ rm -f "${pkgdir}/usr/lib/udev/rules.d/80-net-name-slot.rules"
+ install -Dm644 "${srcdir}/80-net-name-slot.rules" "${pkgdir}/etc/udev/rules.d/80-net-name-slot.rules"
+
+ # Getting udev version
+ udevver=$(grep UDEV_VERSION configure.ac | egrep -o "[0-9]{3}")
+ provides+=("udev=$udevver")
+ provides+=("systemd=$udevver")
+ provides+=("libsystemd=$udevver")
+ provides+=("systemd-tools=$udevver")
+}
+