summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5685623842554deb0af08d662f47b6955a32a319 (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
42
43
# Maintainer: boogiepop <boogiepop@gmx.com>
# Contributor: KafCoppelia <k740677208@gmail.com>

_pkgbase=8852be
pkgname=${_pkgbase}-dkms-git
pkgver=1.15.10.0.5.0.4
pkgrel=1
pkgdesc="Realtek RTL8852BE Wi-Fi driver for Radxa."
arch=('any')
url="https://github.com/radxa-pkg/${_pkgbase}-dkms"
license=('GPL')
depends=('dkms' 'bc' 'linux-headers')
makedepends=('git')
conflicts=(${_pkgbase})
source=(git+${url}.git)
sha256sums=('SKIP')

pkgver() {
	cd ${srcdir}/${_pkgbase}-dkms
	_version=$(git tag -l --sort -version:refname | head -n 1)
	printf ${_version//[-]/\.}
}

package() {
    cd ${srcdir}/${_pkgbase}-dkms

    mkdir -p ${pkgdir}/usr/src/${_pkgbase}-${pkgver}

    cp debian/dkms debian/dkms.conf
    mv debian/dkms.conf ${pkgdir}/usr/src/${_pkgbase}-${pkgver}
    # install -Dm644 dkms.conf ${pkgdir}/usr/src/${_pkgbase}-${pkgver}/dkms.conf

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

    # Copy sources (including Makefile)
    cp -pr ./src/* ${pkgdir}/usr/src/${_pkgbase}-${pkgver}

    # Blacklists conflicting module
    # install -Dm644 ${pkgname}.conf "${srcdir}/usr/lib/modprobe.d/${pkgname}.conf"
}