summaryrefslogtreecommitdiffstats
path: root/abs/core/acpid/PKGBUILD
blob: 8cd787563d645f591a088fe952fccd1e6d2f53a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $Id: PKGBUILD 97250 2013-09-15 20:35:17Z seblu $
# Maintainer: Sébastien Luttringer
# Contributor: xduugu
# Contributor: Manolis Tzanidakis
# Contributor: Jonathan Schmidt <j.schmidt@archlinux.us

pkgname=acpid
pkgver=2.0.20
pkgrel=1
pkgdesc='A daemon for delivering ACPI power management events with netlink support'
arch=('i686' 'x86_64')
url='http://sourceforge.net/projects/acpid2/'
license=('GPL')
depends=('bash')
optdepends=('perl: use perl based examples')
replaces=('acpid2')
backup=('etc/acpi/handler.sh' 'etc/acpi/events/anything')
source=("http://downloads.sourceforge.net/sourceforge/acpid2/$pkgname-$pkgver.tar.xz"
        'acpid.socket'
        'acpid.service'
        'anything'
        'handler.sh')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sbindir=/usr/bin
  make
}

package() {
  pushd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  popd

  # default config
  install -Dm644 anything "$pkgdir/etc/acpi/events/anything"
  install -Dm755 handler.sh "$pkgdir/etc/acpi/handler.sh"

  # systemd
  install -Dm644 acpid.socket "$pkgdir/usr/lib/systemd/system/acpid.socket"
  install -Dm644 acpid.service "$pkgdir/usr/lib/systemd/system/acpid.service"

  # fix acpid rights
  chmod 755 "$pkgdir/usr/bin/acpid"
}

# vim:set ts=2 sw=2 et:
md5sums=('1b740e6419cf45aaeb2bd78d589f27f9'
         'd11700eb136e0489835ddaf977a7905b'
         '79cc7a9dceacdeffd51f070c2ba5f023'
         '2d37b98d6e74bab815604b8b48c6cfd4'
         'e97277eb1937c7ffe92a95fa60c073e4')