core/udisks/PKGBUILD
2015-07-09 20:46:34 +00:00

65 lines
2.0 KiB
Bash

#
# Platform Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas@chakra-project.org
pkgname=udisks
pkgver=1.0.5
pkgrel=2
pkgdesc="Disk Management Service"
arch=('x86_64')
url="http://www.freedesktop.org/wiki/Software/udisks"
license=('GPL')
depends=('systemd' 'util-linux' 'sg3_utils' 'glib2' 'dbus-glib' 'polkit'
'parted' 'device-mapper' 'libatasmart' 'lsof' 'libgudev')
makedepends=('intltool' 'docbook-xsl')
source=(http://hal.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
udisks.service
drop-pci-db.patch)
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
# https://bugs.freedesktop.org/show_bug.cgi?id=90778
sed -i '1i #include <sys/stat.h>' src/helpers/job-drive-detach.c
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
# fix fail pci-db message, patch thanks to Tom Gundersen <teg@jklm.no>
patch -p1 -i ${srcdir}/drop-pci-db.patch
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/lib/udisks --disable-static
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make profiledir=/usr/share/bash-completion/completions DESTDIR="${pkgdir}" install
chmod 644 "${pkgdir}/usr/share/bash-completion/completions/udisks-bash-completion.sh"
# move udev helpers and rules to /usr/lib
mv "${pkgdir}"/lib/udev "${pkgdir}"/usr/lib/
rm -r "${pkgdir}"/lib
#fix ntfs mounts
sed -i -e 's|<allow_active>auth_admin_keep</allow_active>|<allow_active>yes</allow_active>|' ${pkgdir}/usr/share/polkit-1/actions/org.freedesktop.udisks.policy
# move umount helper to /usr/bin
mv "${pkgdir}"/sbin/umount.udisks "${pkgdir}"/usr/bin/
rm -r "${pkgdir}"/sbin
install -Dm644 "$srcdir/udisks.service" "$pkgdir/usr/lib/systemd/system/udisks.service"
echo "SystemdService=udisks.service" \
>> "$pkgdir/usr/share/dbus-1/system-services/org.freedesktop.UDisks.service"
# install the /media folder
install -d -m 755 $pkgdir/media
}
md5sums=('70d48dcfe523a74cd7c7fbbc2847fcdd'
'5d80832b4d4da72beeb45c15b63a1481'
'773cccd70afd18ace4332037feff67ec')