Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2018-01-18 12:45:19 +03:00
parent ef48ea0bdd
commit f3439bb042
2 changed files with 47 additions and 37 deletions

View File

@ -3,7 +3,7 @@
# Contributor: Alexey D. <lq07829icatm@rambler.ru>
# Contributor: Ivailo Monev <xakepa10@gmail.com>
_udev_ver=220
_udev_ver=232
_src_uri='http://dev.gentoo.org/~blueness/eudev'
pkgname=( 'eudev' 'libeudev' )
@ -14,24 +14,35 @@ arch=('i686' 'x86_64')
url="https://github.com/gentoo/eudev"
license=('GPL')
makedepends=('gobject-introspection' 'gperf' 'gtk-doc' 'intltool' 'kmod')
backup=('etc/udev/udev.conf')
options=(!makeflags !libtool)
source=("${_src_uri}/${pkgname}-${pkgver}.tar.gz"
options=( '!libtool' '!staticlibs')
source=(
"$pkgname-$pkgver.tar.gz::https://github.com/gentoo/eudev/archive/v${pkgver}.tar.gz"
'initcpio_hooks'
'initcpio_install')
'initcpio_install'
'udev-hwdb.hook'
)
prepare(){
cd "${srcdir}/${pkgbase}-${pkgver}"
sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
-e 's/GROUP="tape"/GROUP="storage"/' \
-e 's/GROUP="cdrom"/GROUP="optical"/' \
-i rules/*.rules
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./autogen.sh
./configure \
--prefix=/usr \
--with-rootprefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib \
--sbindir=/usr/bin \
--with-html-dir=/usr/share/doc/${pkgname}-${pkgver}/html \
--disable-gudev \
--enable-introspection \
--enable-kmod \
--enable-manpages \
--enable-split-usr
make
@ -49,53 +60,40 @@ package_eudev() {
'util-linux'
'libeudev'
)
optdepends=(
'eudev-systemdcompat: makes packages compiled with systemd features run'
'libsystemd-standalone: same as the above, but built from upstream sources'
'libsystemd-standalone: to run packages built against systemd'
'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
# initramfs hooks
install -Dm644 "$srcdir/initcpio_hooks" "$pkgdir/usr/lib/initcpio/hooks/udev"
install -Dm644 "$srcdir/initcpio_install" "$pkgdir/usr/lib/initcpio/install/udev"
install -Dm644 "$srcdir/udev-hwdb.hook" "$pkgdir/usr/share/libalpm/hooks/udev-hwdb.hook"
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 usr/lib/pkgconfig
mv "$pkgdir"/usr/lib/libudev*.{so,a}* usr/lib/
mv "$pkgdir"/usr/lib/pkgconfig/libudev.pc usr/lib/pkgconfig/libudev.pc
# ...headers
mkdir -pm755 usr/include
mv "$pkgdir"/usr/include/libudev.h usr/include
# These go into a separate package
rm -rv "$pkgdir"/usr/lib/pkgconfig
rm -v "$pkgdir"/usr/include/libudev.h
rm -v "$pkgdir"/usr/lib/libudev*.{so*,a}
}
package_libeudev() {
pkgdesc="eudev client libraries"
depends=( 'glibc' 'glib2' )
conflicts=( 'libudev.so' )
provides=(
"libudev"
'libudev.so'
)
conflicts=(
'libeudev'
"libudev=$_udev_ver"
'libudev.so'
)
mv "$srcdir/_libeudev"/* "$pkgdir"
cd "${srcdir}/${pkgbase}-${pkgver}"
make -C src/libudev DESTDIR="$pkgdir" install
}
sha1sums=('240d7b589ef1da1bb85a950f919e826239363350'
sha1sums=('c46eb61d12fc48429d67a899a9b2a15162042324'
'defa489254f38e57723a8ff70654f29e47bd448a'
'a6a6ee5c751fb92e2c79e0a297e4c318c8f6bb75')
'a6a6ee5c751fb92e2c79e0a297e4c318c8f6bb75'
'6cdf611d37604062ae4c380307421cef6fde445d')

12
udev-hwdb.hook Normal file
View File

@ -0,0 +1,12 @@
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Target = usr/lib/udev/hwdb.d/*
Target = etc/udev/hwdb.d/*
[Action]
Description = Updating udev Hardware Database...
When = PostTransaction
Exec = /usr/bin/udevadm hwdb --update