updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / acpi-eeepc-generic-svn / PKGBUILD
blob0611745f388617a3efaef0c1cf5caf0711972e07
1 # Maintainer: Nicolas Bigaouette <nbigaouette@gmail.com>
2 # Greatly inspired by:
3 #   EeePC ACPI Utilities : http://eeepc-acpi-util.sourceforge.net
4 #   Other Eee acpi packages from AUR: http://aur.archlinux.org/packages.php?K=eee
6 # TODO
7 #   Fix Bluetooth
8 #   Some models ACPI events might be wrong or not there at all
9 #   Restore feature of http://eeepc-acpi-util.sourceforge.net/ has yet to be implemented.
10 #   FSB control
11 #   Touch /var/eeepc/power.lock on shutdown to prevent accidental suspend. Should be deleted at boot.
12 #   More automatic detection of LineIn/LineOut/iSpeaker...
13 #   Autodetection of wifi module and include different hacks for each of them. See acpi-eee 10.0-1's wlan.sh
14 #   Set resolution with xrandr (see display.sh) necessary?
15 #   Reset values of AC after resume (see powersource.sh, called at the end of suspend2ram.sh)
16 #   Fan control??
18 pkgname=acpi-eeepc-generic-svn
19 pkgver=0.3.2
20 pkgrel=2
21 pkgdesc="ACPI scripts for EeePC netbook computers (700, 701, 900, 900A, 901, 904HD, S101, 1000, 1000H, 1000HD)"
22 url="http://code.google.com/p/acpi-eeepc-generic/"
23 arch=(i686)
24 license=(GPL2)
25 depends=(acpid libnotify xorg-server-utils dmidecode)
26 install=$pkgname.install
27 backup=(etc/conf.d/acpi-eeepc-generic.conf)
28 conflicts=("acpi-eee" "acpi-eee900" "acpi-eee901" "acpi-eee1000" "acpi-eeepc900" "buttons-eee901" "e3acpi" "eee-control" "eee-fan")
29 source=(
30     "acpi-eeepc-generic-handler.sh"
31     "acpi-eeepc-generic-functions.sh"
32     "acpi-eeepc-generic-events"
33     "acpi-eeepc-generic-restore.rcd"
34     "acpi-eeepc-generic-logsbackup.rcd"
35     "acpi-eeepc-generic.conf"
36     "acpi-eeepc-generic-wifi-toggle.sh"
37     "acpi-eeepc-generic-bluetooth-toggle.sh"
38     "acpi-eeepc-generic-suspend2ram.sh"
39     "acpi-eeepc-generic-rotate-lvds.sh"
40     "eeepc.desktop"
41     "eee.png"
42     "acpi-eeepc-1000-events.conf"
43     "acpi-eeepc-1000H-events.conf"
44     "acpi-eeepc-1000HD-events.conf"
45     "acpi-eeepc-700-events.conf"
46     "acpi-eeepc-701-events.conf"
47     "acpi-eeepc-900-events.conf"
48     "acpi-eeepc-900A-events.conf"
49     "acpi-eeepc-901-events.conf"
50     "acpi-eeepc-904HD-events.conf"
51     "acpi-eeepc-S101-events.conf")
52 md5sums=('64eea385e307556e6149efe644c29604'
53          '44e5ddee64dad7f0a1a1946608ecface'
54          'cf253e386d7e743a3d25ec4165051521'
55          'a17f9fa32514dcd3d3596a237e517cc5'
56          'a1995a198c8e71b1afb0d86a8a8bc5e1'
57          '585c1f542aee73fa9331433dfb8b3352'
58          'b2217737f73eacd8269461ee336648fb'
59          '0eeb1f39a431a0eb8d0553d4cd555c2e'
60          '6fa6ac6794bef0e077b3aaa83266365d'
61          'f499c7af27f091cc85237b3fb9aa4a87'
62          '6e46b54564cdd14f2588c921c0a7faf1'
63          '4d9af939dbd59121cd4bb191d340eb1c'
64          '6950474780bed9dcc216e2e965227b2e'
65          '6950474780bed9dcc216e2e965227b2e'
66          '6950474780bed9dcc216e2e965227b2e'
67          '024286372c0a0e005804711b022dc4a3'
68          '024286372c0a0e005804711b022dc4a3'
69          '36ac41aec1b63e66fcb8ecab72a7af0e'
70          '36ac41aec1b63e66fcb8ecab72a7af0e'
71          '36ac41aec1b63e66fcb8ecab72a7af0e'
72          '36ac41aec1b63e66fcb8ecab72a7af0e'
73          '6950474780bed9dcc216e2e965227b2e')
75 build() {
76     #cd $srcdir/$pkgname-$pkgver
78     mkdir -p $pkgdir/{etc/{acpi/{eeepc/models,events},conf.d,rc.d},usr/share/{applications,pixmaps}}
80     # Install our own handler
81     install -m0755 ${srcdir}/acpi-eeepc-generic-handler.sh ${pkgdir}/etc/acpi/acpi-eeepc-generic-handler.sh || return 1
82     install -m0755 ${srcdir}/acpi-eeepc-generic-functions.sh ${pkgdir}/etc/acpi/eeepc/acpi-eeepc-generic-functions.sh || return 1
83     install -m0755 ${srcdir}/acpi-eeepc-generic-events ${pkgdir}/etc/acpi/events/acpi-eeepc-generic-events || return 1
85     install -m0644 ${srcdir}/acpi-eeepc-generic.conf ${pkgdir}/etc/conf.d/acpi-eeepc-generic.conf || return 1
87     # Install events configuration files for each model
88     for f in ${srcdir}/acpi-eeepc-*-events.conf; do
89         install -m0644 $f ${pkgdir}/etc/acpi/eeepc/models
90     done
92     #install -m0755 ${srcdir}/acpi-eeepc-generic-restore.rcd ${pkgdir}/etc/rc.d/eeepc-restore || return 1
93     install -m0755 ${srcdir}/acpi-eeepc-generic-logsbackup.rcd ${pkgdir}/etc/rc.d/logsbackup || return 1
95     # Helper scripts
96         install -m0755 ${srcdir}/acpi-eeepc-generic-suspend2ram.sh ${pkgdir}/etc/acpi/eeepc || return 1
97     install -m0755 ${srcdir}/acpi-eeepc-generic-wifi-toggle.sh ${pkgdir}/etc/acpi/eeepc || return 1
98     install -m0755 ${srcdir}/acpi-eeepc-generic-bluetooth-toggle.sh ${pkgdir}/etc/acpi/eeepc || return 1
99     install -m0755 ${srcdir}/acpi-eeepc-generic-rotate-lvds.sh ${pkgdir}/etc/acpi/eeepc || return 1
101     install -m0755 ${srcdir}/eeepc.desktop ${pkgdir}/usr/share/applications/eeepc.desktop || return 1
102     install -m0644 ${srcdir}/eee.png ${pkgdir}/usr/share/pixmaps/eee.png || return 1