musl_root/pkgs/eudev/build.sh

48 lines
990 B
Bash
Raw Normal View History

2018-11-10 00:42:27 +02:00
#!/bin/bash
pkgname="eudev"
pkgver="3.2.7"
src="https://github.com/gentoo/eudev/archive/v${pkgver}.tar.gz"
prepare () {
[ -f "${pkgname}-src.tar.gz" ] || curl -L -o "${pkgname}-src.tar.gz" "${src}"
tar -C "${srcdir}" -xvf "${pkgname}-src.tar.gz"
}
build () {
cd "${srcdir}/eudev-${pkgver}"
./autogen.sh
# Patch defs which aren't in 3.12.6 kernel headers
sed -i 's/KEY_ALS_TOGGLE/0x230/g' src/udev/udev-builtin-input_id.c
mkdir build && cd build
../configure \
--prefix=/usr \
--sysconfdir=/etc \
--disable-blkid \
--disable-mtd_probe \
--disable-kmod \
--disable-selinux
make
}
package () {
cd "${srcdir}/eudev-${pkgver}/build"
make DESTDIR="${pkgdir}" install
# Also bundle runit services
install -d -m 755 "${pkgdir}"/etc
install -d -m 755 "${pkgdir}"/etc/sv
for svc in "${wd}"/sv-service/*; do
cp -p -r "${svc}" "${pkgdir}"/etc/sv/
done
}
. ../common.sh