1 # Maintainer: Nicolo' Barbon <smilzoboboz@gmail.com>
5 pkgdesc="Calculates ambient brightness and sets screen's correct backlight using a webcam."
7 url="http://sourceforge.net/projects/calise/"
10 depends=('python-pygame' 'python-imaging' 'python2-numpy' 'hicolor-icon-theme' 'pyxdg')
11 makedepends=('python-distutils-extra' 'intltool')
12 optdepends=('python2-pyqt: gui, screenbalance feature')
18 install=calise.install
20 source=(http://sourceforge.net/projects/$pkgname/files/$pkgname-beta/$pkgver/$pkgname-$pkgver.tar.gz)
22 sha256sums=('87c82ca76e7d05a97b44069eb673758bc1e8af6536272e4007daae1ca4198383')
26 env python2 setup.py build
31 interface="`udevadm info -a -p /sys/class/backlight/* |
34 awk -F ['"'] '{print $2}'`"
35 if [ ! -e /sys/class/backlight/$interface/brightness ]; then
36 echo "Your configuration is currently not supported."
39 udevrule="$pkgdir/lib/udev/rules.d/99-backlight-$interface.rules"
40 mkdir -p "$pkgdir/lib/udev/rules.d/"
41 echo "KERNEL==\"${interface}\", RUN+=\"/bin/chmod 664 /sys/class/backlight/$interface/brightness\"" > $udevrule
42 echo "KERNEL==\"${interface}\", RUN+=\"/bin/chgrp video /sys/class/backlight/$interface/brightness\"" >> $udevrule
43 env python2 setup.py install --prefix="$pkgdir/usr/"