summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Osvaldo Barrera2015-06-09 02:06:21 -0300
committerHugo Osvaldo Barrera2015-06-09 02:07:15 -0300
commit8bd12737418a336ebddff902eb712379da2c1ca8 (patch)
tree9a09d1c125c49ba75a5e12d777fa47b750dec470
downloadaur-8bd12737418a336ebddff902eb712379da2c1ca8.tar.gz
Initial commit.
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD36
-rw-r--r--mba6x_bl-dkms.conf1
-rw-r--r--mba6x_bl-dkms.install29
4 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..3dcf0e633a5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = mba6x_bl-dkms
+ pkgdesc = Backlight for mba6x to fix post suspend/resume brightness.
+ pkgver = latest
+ pkgrel = 2
+ url = https://github.com/patjak/mba6x_bl
+ install = mba6x_bl-dkms.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = dkms
+ depends = linux-headers
+ provides = mba6x_bl
+ conflicts = mba6x_bl
+ backup = etc/modules-load.d/mba6x_bl-dkms.conf
+ source = git+https://github.com/patjak/mba6x_bl.git
+ source = mba6x_bl-dkms.conf
+ md5sums = SKIP
+ md5sums = 1d04b891c7a387a845a1eac768749c6b
+
+pkgname = mba6x_bl-dkms
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..47c49a6b342
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Hugo Osvaldo Barrera <hugo@barrera.io>
+# Contributor: Frank Shin <frankshin82@gmail.com>
+
+pkgname=mba6x_bl-dkms
+_gitname=mba6x_bl
+pkgver=latest
+pkgrel=2
+pkgdesc="Backlight for mba6x to fix post suspend/resume brightness."
+url='https://github.com/patjak/mba6x_bl'
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('dkms' 'linux-headers')
+install=$pkgname.install
+provides=('mba6x_bl')
+conflicts=('mba6x_bl')
+source=("git+https://github.com/patjak/mba6x_bl.git"
+ 'mba6x_bl-dkms.conf')
+md5sums=('SKIP'
+ '1d04b891c7a387a845a1eac768749c6b')
+
+backup=('etc/modules-load.d/mba6x_bl-dkms.conf')
+
+pkgver() {
+ cd "$srcdir/${_gitname}"
+ echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+}
+
+package() {
+ cd "${srcdir}/"
+ install -Dm 644 mba6x_bl-dkms.conf "${pkgdir}/etc/modules-load.d/mba6x_bl-dkms.conf"
+
+ cd "${srcdir}/${_gitname}"
+ for FILE in Makefile dkms.conf mba6x_bl.c; do
+ install -Dm 644 $FILE "${pkgdir}/usr/src/mba6x_bl-$pkgver/$FILE"
+ done
+}
diff --git a/mba6x_bl-dkms.conf b/mba6x_bl-dkms.conf
new file mode 100644
index 00000000000..e5d1c39a96f
--- /dev/null
+++ b/mba6x_bl-dkms.conf
@@ -0,0 +1 @@
+mba6x_bl
diff --git a/mba6x_bl-dkms.install b/mba6x_bl-dkms.install
new file mode 100644
index 00000000000..ebd7cb289ad
--- /dev/null
+++ b/mba6x_bl-dkms.install
@@ -0,0 +1,29 @@
+post_install() {
+ dkms_install $1
+}
+
+pre_upgrade() {
+ dkms_remove $2
+}
+
+pre_remove() {
+ dkms_remove $1
+}
+
+post_upgrade() {
+ dkms_install $1
+}
+
+dkms_remove() {
+ local line=`dkms status -m mba6x_bl`
+ if echo "$line" | grep -E 'added|built|installed'; then
+ dkms remove -m mba6x_bl -v ${1%%-*} --all
+ fi
+}
+
+dkms_install() {
+ dkms install -m mba6x_bl -v ${1%%-*}
+ modprobe mba6x_bl
+
+ /usr/bin/depmod -a
+}