desktop/acpid/PKGBUILD
2016-03-17 08:11:51 +00:00

58 lines
1.9 KiB
Bash

pkgname=acpid
pkgver=2.0.27
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')
sha256sums=('820c223e53cc11d9d7229fb1ffc2c2205f1054082c80f83f5a4ec4df16d3a616'
'f23f57646d78bb22b282b9299c5528c6d906cd0c75b080c2606783839e56df49'
'1bd216409d7eaa7665d91bc9ed80a9dca7e2326ebe31bb342f8ae1d364b4e36a'
'eb5230affb9dba7653890655b94e83f377c689a39131b6b13c8202ba2382c275'
'6ae2b153c4ef9cbfd32c4428406fc63d931ea7fdfb2e45529f89b51f4d7ac17a'
'ac08f8c59cfcbf70d60a2fe51b50e8551e0212e42e5f392022f2aeae393ae706'
'35eda2808e6b0c138be793dd4158b8861f2361a7aa31fa626a700a59beb5285e')
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/
}