# Contributor: Stuart Cardall # Maintainer: Stuart Cardall pkgname=udevil pkgver=0.4.4 pkgrel=0 pkgdesc="Mount / unmount removable devices without a password (udisks alternative)" url="http://ignorantguru.github.io/udevil" arch="all" license="GPL3+" makedepends="$depends_dev glib-dev udev-dev intltool" install="$pkgname.pre-install" subpackages="$pkgname-lang $pkgname-doc" pkggroups="plugdev" source="$pkgname-$pkgver.tar.gz::https://github.com/IgnorantGuru/$pkgname/archive/$pkgver.tar.gz" _builddir="$srcdir"/$pkgname-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --prefix=/usr \ --disable-systemd || return 1 make || return 1 } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install || return 1 chown root:plugdev "$pkgdir"/usr/bin/udevil || return 1 chmod u+s,go-s,o-x "$pkgdir"/usr/bin/udevil # remove SUID bit mkdir -p "$pkgdir/usr/share/apk-tools/$pkgname" # chmod ugo-s,ugo+x "$pkgdir"/usr/bin/udevil #remove SUID bit completely # post-install message mkdir -p "$pkgdir/usr/share/doc/$pkgname" cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <