summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6488d7572d93670de9c6142448656d67619791fd (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
# Contributor: piernov <piernov@piernov.org

pkgname=ch34x-dkms-git
_pkgname=ch34x
pkgver=r44.845e6f5
pkgrel=1
pkgdesc='CH341SER driver with fixed bug'
arch=('i686' 'x86_64')
url='https://github.com/juliagoda/CH341SER'
depends=('dkms')
makedepends=('git')
install=${pkgname}.install
source=("git+https://github.com/juliagoda/CH341SER.git" "dkms.conf" "blacklist-ch34x-dkms-git.conf")
sha1sums=('SKIP'
          'caaa4d1bbf824ceea3855e7b4d8557aa80978231'
          'f16e2741c39103594dd6bcee562bfda6d2818318')

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

package() {
	install -dm 755 "${pkgdir}/usr/src"
	git -C "CH341SER" checkout-index --prefix="${pkgdir}/usr/src/${_pkgname}-${pkgver}/" -a
	#cp -dr --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/src/${_pkgname}-${pkgver}"
	install -D -m 644 dkms.conf "${pkgdir}/usr/src/${_pkgname}-${pkgver}"

        install -dm755 "${pkgdir}/etc/modprobe.d"
        install -m644 "blacklist-ch34x-dkms-git.conf" "${pkgdir}/etc/modprobe.d"

	# Set name and version
	sed -e "s/@PKGVER@/${pkgver}/" \
		-i "${pkgdir}"/usr/src/${_pkgname}-${pkgver}/dkms.conf
}