diff options
author | Kevin MacMartin | 2015-06-10 00:37:46 -0400 |
---|---|---|
committer | Kevin MacMartin | 2015-06-10 00:37:46 -0400 |
commit | 2ceb57fd019f87751c05b3a3380a5a4cc6fd15c1 (patch) | |
tree | 473af11b7aea9b6a89923f6d443138ae910f9001 | |
download | aur-2ceb57fd019f87751c05b3a3380a5a4cc6fd15c1.tar.gz |
Initial import into AUR 4
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | als-dkms.install | 23 |
3 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5dbd89fac2a7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = als-dkms + pkgdesc = ASUS Zenbook ambient light sensor kernel module (DKMS) + pkgver = r27 + pkgrel = 1 + url = https://github.com/danieleds/als + install = als-dkms.install + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = git + depends = dkms + depends = gcc + depends = make + optdepends = linux-headers + optdepends = linux-lts-headers + provides = als-driver-git + conflicts = als-driver-git + replaces = als-driver-git + source = als::git+https://github.com/danieleds/als.git + sha512sums = SKIP + +pkgname = als-dkms + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..77fd27e16bdc --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Kevin MacMartin <prurigro at gmail dot com> + +_pkgname=als +pkgname=${_pkgname}-dkms +pkgver=r27 +pkgrel=1 +pkgdesc="ASUS Zenbook ambient light sensor kernel module (DKMS)" +arch=('i686' 'x86_64') +url="https://github.com/danieleds/als" +license=('GPL2') +depends=('dkms' 'gcc' 'make') +optdepends=('linux-headers' 'linux-lts-headers') +makedepends=('git') +conflicts=("${_pkgname}-driver-git") +replaces=("${_pkgname}-driver-git") +provides=("${_pkgname}-driver-git") +install=${pkgname}.install + +source=("$_pkgname::git+${url}.git") +sha512sums=('SKIP') + +pkgver() { + cd $_pkgname + printf "r%s""$(git rev-list --count HEAD)" +} + +prepare() { + cd $_pkgname + sed -i 's|PACKAGE_VERSION="[^"]*"|PACKAGE_VERSION="'$pkgver'"|' dkms.conf +} + +package() { + install -d "$pkgdir"/usr/src/${_pkgname}-${pkgver} + cp -r ${_pkgname}/{Makefile,${_pkgname}.c,dkms.conf} "$pkgdir"/usr/src/${_pkgname}-${pkgver}/ +} diff --git a/als-dkms.install b/als-dkms.install new file mode 100644 index 000000000000..3ab9716fd4d1 --- /dev/null +++ b/als-dkms.install @@ -0,0 +1,23 @@ +post_install() { + dkms add -m als -v ${1%%-*} + dkms install -m als -v ${1%%-*} + cat << EOF +==> The ALS (Ambient Light Sensor) module has been installed. +==> To load the ALS module, run 'modprobe als', or add it to a config + in /etc/modules-load.d to have it load during startup. +==> To check and update every boot, enable the dkms service by running: + systemctl enable dkms.service +EOF +} + +pre_upgrade() { + pre_remove ${2%%-*} +} + +post_upgrade() { + post_install ${1%%-*} +} + +pre_remove() { + dkms remove -m als -v ${1%%-*} --all +} |