1 # Contributor: Simone Pignatti <simo91.linux@gmail.com>
6 pkgdesc="ACPI scripts and AsusOSD for the Asus Eee PC"
7 url="http://update.eeepc.asus.com/p900/pool"
10 depends=('acpid' 'vbetool')
11 makedepends=('deb2targz' 'unrar')
14 backup=('etc/acpi/eee.conf')
15 source=(http://update.eeepc.asus.com/p900/pool/asus-acpi_1.61-1xandros19_i386.deb
16 ftp://ftp.asus.com/pub/ASUS/EeePC/701/ASUS_ACPI_071126.rar
17 volume-{up,down,toggle}
33 asusosd-volume_toggle_fix.patch
34 asusosd-osd_configurable.patch
38 md5sums=('1c7d9c4b5fc6848c6a2aa9b411a13316'
39 '9f4b2815b8965624e639d1e7588b6cd0'
40 '315ce5e7b87b4ca7083fd0daaf5d394d'
41 'b0b9d034186ef1213570b90d6c865425'
42 'dc7cbe699d7ffbf75b33058ed3fddb02'
43 '6d6b2c66169059514ad0f8c8be8b024a'
44 'b5df10121971b7c3458491819a879f54'
45 '0f6bbfdc536e2b470481876994bafb0c'
46 'cdac9707cf2c7affedcd254e0b94cfdb'
47 '91d31222311be60442168a9ee4f1f060'
48 '679cad23f80f1437c6ef65e592a2a7dc'
49 'b58ad8749ed7c97bd4a7754c12bb73ae'
50 'c3ac0f09047f11e230f7c0226a39eb27'
51 'c65818b1656777fe3c37d3ccddfd517a'
52 '1780e6f5ca427fb708510851f762cd2c'
53 'fc78b8cb016fc66ae37c2c97ed07309a'
54 'dc2065dbace3856d8972c9cc9dff100e'
55 'a712160b7d1b7724ffd5a92739b58505'
56 'ed9f9fb82a3003ba432507ebcc4408a4'
57 'c0f8acc4dad29bfbcd2dae31613ab3a7'
58 'c7496612dd777f10ea2cbc7d06a37c5f'
59 '06a0e13292ac49e82f144a0b0af9f61f'
60 '1ca0c5c988dbb1b267f824aef9f1a60c'
61 '58319289b45b27861a045c28eeac5496'
62 'b60022008099133848e1bc3c46d4c677'
63 'f8d1fe7ef1afae2a4f6bb0769e06376b'
64 '0a062c093a46e0f6c21d8c76cd12b1f9')
68 # Compile asusosd and install
69 unrar e -y ASUS_ACPI_071126.rar
70 tar xzf asus_osd.tar.gz
72 # Switch to /usr instead of /usr/local
73 sed -i 's|/usr/local|/usr|g' *
74 # Correct volume mute/on switching
75 patch -p0 < $startdir/asusosd-volume_toggle_fix.patch || return 1
76 patch -p0 < $startdir/asusosd-osd_configurable.patch || return 1
78 install -D -m0755 asusosd "$pkgdir"/usr/bin/asusosd
79 # And the flashy icons for asusosd
81 deb2targz asus-acpi_1.61-1xandros19_i386.deb || return 1
82 tar -xzf asus-acpi_1.61-1xandros19_i386.tar.gz
83 # Install modified volume-control.sh needed by asusosd to show correct volume levels
84 install -m0755 volume_control.sh "$pkgdir"/usr/bin/ || return 1
85 mkdir "$pkgdir"/usr/share
86 cp -r usr/local/share/* "$pkgdir"/usr/share
87 # File for autostarting asusosd
88 install -D -m0644 ../Asusosd.desktop "$pkgdir"/etc/xdg/autostart/Asusosd.desktop
90 install -d "$pkgdir"/etc/acpi
91 install -m0755 wlan.sh "$pkgdir"/etc/acpi/
92 install -m0755 suspend2ram.sh "$pkgdir"/etc/acpi/
93 install -m0755 display.sh "$pkgdir"/etc/acpi/
94 install -m0755 lid.sh "$pkgdir"/etc/acpi/
95 install -m0755 ap-button.sh "$pkgdir"/etc/acpi/
96 install -m0755 powersource.sh "$pkgdir"/etc/acpi/
97 install -m0755 power-button.sh "$pkgdir"/etc/acpi/
98 # Install custom events
99 install -d "$pkgdir"/etc/acpi/events
100 install -m0644 volume-{up,down,toggle} "$pkgdir"/etc/acpi/events/
101 install -m0644 wlan-{on,off} "$pkgdir"/etc/acpi/events/
102 install -m0644 button-{ap,power,sleep} "$pkgdir"/etc/acpi/events/
103 install -m0644 display-toggle "$pkgdir"/etc/acpi/events/
104 install -m0644 lid-event "$pkgdir"/etc/acpi/events/
105 install -m0644 powersource "$pkgdir"/etc/acpi/events/
107 install -d "$pkgdir"/etc/rc.d || return 1
108 install -m0755 eee.rc "$pkgdir"/etc/rc.d/eee || return 1
109 # Install default configuration file
110 install -m0644 eee.conf "$pkgdir"/etc/acpi/