summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkh@valera2021-03-10 13:30:53 +0200
committerkh@valera2021-03-10 13:30:53 +0200
commitb53f7f77bbeb170c19483dd5d812b089015c6e15 (patch)
tree04b49afa71f6ce72dc8408a753443eede0f4278b
downloadaur-b53f7f77bbeb170c19483dd5d812b089015c6e15.tar.gz
rtl8821cu-git
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD44
-rw-r--r--rtl8821cu-git.install15
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b82a4462e01e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = rtl8821cu-git
+ pkgdesc = Linux Driver for USB WiFi Adapters that use the RTL8811CU, RTL8821CU and RTL8731AU Chipsets
+ pkgver = 5.8.1.799e54b8f4
+ pkgrel = 1
+ url = https://github.com/morrownr/8821cu
+ install = rtl8821cu-git.install
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ license = GPL2
+ makedepends = git
+ makedepends = make
+ makedepends = linux-headers
+ depends = linux=5.11.2-1
+ conflicts = rtl8821cu
+ conflicts = rtl8821cu-dkms-git
+ source = git+https://github.com/morrownr/8821cu
+ source = rtl8821cu-git.install
+ sha256sums = SKIP
+ sha256sums = afe2dc6de056dfeb319910ac1e63d914983108a971dfbc1403119d024d790899
+
+pkgname = rtl8821cu-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2080920cddb2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+pkgname=rtl8821cu-git
+_pkgbase=rtl8821cu
+commit="e54b8f4"
+_pkgver="5.8.1.7"
+pkgver=5.8.1.799e54b8f4
+pkgrel=1
+pkgdesc="Linux Driver for USB WiFi Adapters that use the RTL8811CU, RTL8821CU and RTL8731AU Chipsets"
+arch=('i686' 'x86_64' 'armv7h')
+url="https://github.com/morrownr/8821cu"
+license=('GPL2')
+#depends=('linux'=$kernelver)
+makedepends=('git' 'make' 'linux-headers')
+conflicts=("${_pkgbase}" "${_pkgbase}-dkms-git")
+source=("git+https://github.com/morrownr/8821cu"
+ "$pkgname.install")
+install=$pkgname.install
+sha256sums=('SKIP' 'afe2dc6de056dfeb319910ac1e63d914983108a971dfbc1403119d024d790899')
+procs_num=$(nproc)
+
+_extramodules=$(cat `find /usr/lib/modules/extramodules* -type 'f' -name 'version'`)
+
+pkgver() {
+ cd ${srcdir}/8821cu
+ printf '%s' ${_pkgver} "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd ${srcdir}/8821cu
+ if [ ${CARCH} == "armv7h" ]; then
+ ARCH="arm"
+ else
+ ARCH=${CARCH}
+ fi
+ make ARCH=$ARCH -j$procs_num KSRC="/usr/lib/modules/${_extramodules}/build/"
+}
+
+package(){
+ cd ${srcdir}/8821cu
+ file_dir="$pkgdir/usr/lib/modules/${_extramodules}/kernel/drivers/net/wireless/realtek/rtl8821cu"
+ mkdir -p $file_dir
+ install -Dm644 "8821cu.ko" "$file_dir/8821cu.ko"
+ gzip -9 "$file_dir/8821cu.ko"
+}
+
diff --git a/rtl8821cu-git.install b/rtl8821cu-git.install
new file mode 100644
index 000000000000..38032835df5d
--- /dev/null
+++ b/rtl8821cu-git.install
@@ -0,0 +1,15 @@
+post_install() {
+ echo "Installing the module 8821cu"
+ depmod -a
+ modprobe 8821cu
+}
+
+post_upgrade() {
+ depmod -a
+}
+
+post_remove() {
+ echo "Module removal 8821cu"
+ rmmod 8821cu
+ depmod -a
+} \ No newline at end of file