This commit is contained in:
Jack L. Frost 2015-06-01 16:15:16 +03:00
commit 5c83b78fd2
3 changed files with 150 additions and 0 deletions

103
PKGBUILD Normal file
View File

@ -0,0 +1,103 @@
# Maintainer: artoo <artoo@manjaro.org>
# Contributor: Alexey D. <lq07829icatm@rambler.ru>
# Contributor: Ivailo Monev <xakepa10@gmail.com>
_udev_ver=219
_src_uri='http://dev.gentoo.org/~blueness/eudev'
pkgname=( 'eudev' 'libeudev' )
pkgver=3.0
pkgrel=3
pkgdesc="The userspace dev tools (udev) forked by Gentoo"
arch=('i686' 'x86_64')
url="http://www.gentoo.org/proj/en/eudev/"
license=('GPL')
makedepends=('gobject-introspection' 'gperf' 'gtk-doc' 'intltool')
backup=('etc/udev/udev.conf')
options=(!makeflags !libtool)
source=("${_src_uri}/${pkgname}-${pkgver}.tar.gz"
'initcpio_hooks'
'initcpio_install')
sha256sums=('74db8aaf13cc392edfb821291783ecd64d815e6f81409f57e290d3017750db29'
'892ce43218e0a458981bbce451252c8987dc398e60b8de288e7542b8f2409c13'
'77dd1fd318b4456409aceb077f060b87944defb07cf39d29ad1968dc6f361875')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure \
--prefix=/usr \
--with-rootprefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib \
--sbindir=/usr/bin \
--with-html-dir=/usr/share/doc/${pkgname}-${pkgver}/html \
--enable-gudev \
--enable-introspection \
--enable-kmod \
--enable-split-usr
make
}
package_eudev() {
pkgdesc="The userspace dev tools (udev) forked by Gentoo"
provides=( "udev=${_udevver}" )
backup=( 'etc/udev/udev.conf' )
depends=(
'glib2'
'kbd'
'kmod'
'hwids'
'util-linux'
)
optdepends=(
'eudev-systemdcompat: makes packages compiled with systemd features run'
'libsystemd-standalone: same as the above, but built from upstream sources'
'upower-pm-utils: pm-utils support'
)
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
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
install -Dm644 "${srcdir}/initcpio_hooks" "${pkgdir}/usr/lib/initcpio/hooks/udev"
install -Dm644 "${srcdir}/initcpio_install" "${pkgdir}/usr/lib/initcpio/install/udev"
# split out...
mkdir -pm755 "${srcdir}/_libeudev"
cd "${srcdir}/_libeudev"
# ...libs
mkdir -pm755 usr/lib
mv "$pkgdir"/usr/lib/lib{g,}udev*.{so,a}* usr/lib
# ...pkgconfig
mkdir -pm755 usr/lib/pkgconfig
mv "$pkgdir"/usr/lib/pkgconfig/{libudev,gudev-1.0}.pc usr/lib/pkgconfig
# ...headers
mkdir -pm755 usr/include
mv "$pkgdir"/usr/include/{gudev-1.0,libudev.h} usr/include
}
package_libeudev() {
pkgdesc="eudev client libraries"
depends=( 'glibc' 'glib2' )
provides=(
"libudev=${_udevver}"
'libgudev-1.0.so'
'libudev.so'
)
conflicts=(
'libeudev>=1.8'
'libgudev-1.0.so'
'libudev.so'
)
mv "$srcdir/_libeudev"/* "$pkgdir"
}

20
initcpio_hooks Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/ash
run_earlyhook() {
udevd --daemon --resolve-names=never
udevd_running=1
}
run_hook() {
msg ":: Triggering uevents..."
udevadm trigger --action=add --type=subsystems
udevadm trigger --action=add --type=devices
udevadm settle
}
run_cleanuphook() {
udevadm control --exit
udevadm info --cleanup-db
}
# vim: set ft=sh ts=4 sw=4 et:

27
initcpio_install Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
build() {
add_file "/etc/udev/udev.conf"
add_binary /usr/bin/udevd
add_binary /usr/bin/udevadm
for rule in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers.rules; do
add_file "/usr/lib/udev/rules.d/$rule"
done
for tool in ata_id scsi_id; do
add_file "/usr/lib/udev/$tool"
done
add_runscript
}
help() {
cat <<HELPEOF
This hook will use udev to create your root device node and detect the needed
modules for your root device. It is also required for firmware loading in
initramfs. It is recommended to use this hook.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et: