updated on Tue Jan 10 00:10:07 UTC 2012
[aur-mirror.git] / hibernate-script / PKGBUILD
blob37d9491750c7d21998ae03db5b4575b99933de00
1 # Maintainer: Ng Oon-Ee <ngoonee.talk@gmail.com>
2 # Contributor: Thomas Baechler <thomas@archlinux.org>
3 # Contributor: Guillaume ALAUX <guillaume at alaux dot net>
5 pkgname=hibernate-script
6 pkgver=2.0
7 pkgrel=6
8 pkgdesc="Set of scripts for managing tux on ice, hibernation and suspend to RAM"
9 arch=('any')
10 url="http://www.tuxonice.net"
11 license=('GPL')
12 depends=('sh')
13 options=(!strip)
14 backup=('etc/hibernate/hibernate.conf' 'etc/hibernate/tuxonice.conf' \
15         'etc/hibernate/disk.conf' 'etc/hibernate/ram.conf' \
16         'etc/hibernate/common.conf' 'etc/hibernate/blacklisted-modules' \
17         'etc/hibernate/ususpend-both.conf' 'etc/hibernate/sysfs-ram.conf' \
18         'etc/hibernate/ususpend-ram.conf' 'etc/hibernate/sysfs-disk.conf' \
19         'etc/hibernate/ususpend-disk.conf')
20 source=(http://tuxonice.net/files/${pkgname}-${pkgver}.tar.gz
21         hibernate-script-${pkgver}-arch.patch
22         hibernate.rc)
23 md5sums=('5c21770afbae503450e3c4a5502bf29d'
24          '2e6dba2c90e90952b8b1f167045c38e6'
25          '5d7e83902a00bf72b1de97a5450a558e')
27 build() {
28   cd ${srcdir}/${pkgname}-${pkgver}
29   # Fix scriptlets to work properly with Archlinux
30   patch -Np1 -i ${srcdir}/${pkgname}-${pkgver}-arch.patch
33 package() {
34   cd ${srcdir}/${pkgname}-${pkgver}
35   export BASE_DIR=${pkgdir}
36   export PREFIX=/usr
37   export MAN_DIR=$BASE_DIR$PREFIX/share/man
38   install -dm755 ${pkgdir}/etc/{rc,logrotate}.d
39   ./install.sh || return 1
40   install -m 755 $srcdir/hibernate.rc $pkgdir/etc/rc.d/hibernate-cleanup
41   # Allow for behaviour as in man-page (calling by hibernate-* uses
42   # /etc/hibernate/*.conf file.
43   ln -s /usr/sbin/hibernate ${pkgdir}/usr/sbin/hibernate-ram
44   ln -s /usr/sbin/hibernate ${pkgdir}/usr/sbin/hibernate-disk