# Maintainer: Adrián Chaves Fernández (Gallaecio) pkgname=acpid pkgver=2.0.23 pkgrel=1 pkgdesc="A daemon for delivering ACPI power management events with netlink support." arch=('x86_64') url="http://sourceforge.net/projects/acpid2/" license=('GPL') depends=('bash') opedepends=('perl: use perl based examples') backup=('etc/acpi/events/anything' 'etc/acpi/handler.sh' 'etc/conf.d/acpid') source=("http://sourceforge.net/projects/acpid2/files/${pkgname}-${pkgver}.tar.xz/download" 'acpid' 'acpid.conf.d' 'anything' 'handler.sh' 'acpid.socket' 'acpid.service') categories=('system') md5sums=('d7bcdcdefcd53b03730e50ba842554ea' 'd9ca7f71f520238a0448fab105a23fe9' '91fdb3709c878eed757d192a420251a1' '2d37b98d6e74bab815604b8b48c6cfd4' '0e8dd13793b1baa79a745f4034888367' 'ee6cb99e50e580c50331a73045412ae9' '20e988b8fa6aa4d46e42ab8608774826') build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/usr make } package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install cd "${srcdir}" msg 'Install supplementary scripts...' install -Dm755 acpid "$pkgdir/etc/rc.d/acpid" install -Dm644 anything "$pkgdir/etc/acpi/events/anything" install -Dm755 handler.sh "$pkgdir/etc/acpi/handler.sh" install -Dm644 acpid.conf.d "$pkgdir/etc/conf.d/acpid" msg 'Install SystemD units...' install -Dm0644 acpid.socket "${pkgdir}/usr/lib/systemd/system/acpid.socket" install -Dm0644 acpid.service "${pkgdir}/usr/lib/systemd/system/acpid.service" msg 'Set world readable bit on the acpid binary.' chmod 0755 "${pkgdir}"/usr/sbin/acpid msg 'Remove deprecated rc.d files' rm -rf ${pkgdir}/etc/rc.d/ }