summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: baf3ed4edd33bfdb89b39a45da42cb7558744995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Maintainer: Christian Mauderer <oss@c-mauderer.de>

_pkgbase=gslx680-acpi
pkgname=${_pkgbase}-dkms-git
pkgrel=3
pkgver=r149.667efce
pkgdesc="ACPI/x86 compatible driver for Silead GSLx680 touchscreens."
arch=('i686' 'x86_64')
url="https://github.com/onitake/gslx680-acpi"
license=('GPL2')
depends=('dkms' 'linux-headers')
makedepends=('git')
provides=("${_pkgbase}")
conflicts=("${_pkgbase}")
install=${pkgname}.install
source=("${pkgname}"::"git+https://github.com/onitake/${_pkgbase}.git"
	"blacklist-silead.conf")
sha256sums=('SKIP'
            '04e768901152606ab0c33dac6d0c4a365e5fd7ba803a43be9847e47f9da38461')

pkgver() {
	cd "${srcdir}/${pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
	cd "${srcdir}/${pkgname}"

	# Install
	msg2 "Copy over sources"
	mkdir -p "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/"
	cp -pr ${srcdir}/${pkgname}/* "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/"

	# Set name and version
	msg2 "Adapt version"
	sed -e "s/PACKAGE_VERSION=.*$/PACKAGE_VERSION=\"${pkgver}\"/" \
	    -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf

	install -Dm644 -t "${pkgdir}/etc/modprobe.d/" \
			"${srcdir}/blacklist-silead.conf"
}