summaryrefslogtreecommitdiffstats
path: root/abs/core/pm-utils/PKGBUILD
blob: b59f4d67da9a182fdeac4166043ca486f1bd9786 (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
# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Thayer Williams <thayer@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=pm-utils
pkgver=1.4.1
pkgrel=6
pkgdesc="Utilities and scripts for suspend and hibernate power management"
arch=('i686' 'x86_64')
url="http://pm-utils.freedesktop.org"
license=('GPL')
depends=('bash' 'procps' 'pm-quirks')
makedepends=('xmlto' 'docbook-xml' 'docbook-xsl')
source=(http://pm-utils.freedesktop.org/releases/${pkgname}-${pkgver}.tar.gz
        02-logging-append.patch
        12-fix-intel-audio-powersave-hook.patch
        13-49bluetooth-sync.patch
        14-disable-sata-alpm.patch)
md5sums=('1742a556089c36c3a89eb1b957da5a60'
         'a45149617bf3eb8dc32e6d9e22ae715d'
         'edada31a7d722763513fbe705d95d19d'
         '298f78b873c03c025700d5da619ac134'
         'd0040f7d30b6a0dd195b5401abbbbdb9')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np1 -i "${srcdir}/02-logging-append.patch"
  patch -Np1 -i "${srcdir}/12-fix-intel-audio-powersave-hook.patch"
  patch -Np1 -i "${srcdir}/13-49bluetooth-sync.patch"
  patch -Np1 -i "${srcdir}/14-disable-sata-alpm.patch"
  ./configure --prefix=/usr \
      --sysconfdir=/etc \
      --sbindir=/usr/bin \
      --localstatedir=/var
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install

  # nm >=0.8.2 has native udev suspend/resume support
  rm -f "${pkgdir}/usr/lib/pm-utils/sleep.d/55NetworkManager"
  
  # Remove hooks that cause hardware failure or don't make sense at all
  rm -f "${pkgdir}/usr/lib/pm-utils/power.d/"{harddrive,disable_wol}
}