summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiorgio Gilestro2016-09-17 12:34:48 +0100
committerGiorgio Gilestro2016-09-17 12:34:48 +0100
commit21f101bc2f94f9655112d83a5399e9a74cb0f1e7 (patch)
treeb0f1e73ab9c9b5f6de90e83d48492ade7dba2c20
downloadaur-21f101bc2f94f9655112d83a5399e9a74cb0f1e7.tar.gz
first upload
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD35
-rw-r--r--dkms.conf8
-rw-r--r--r8152-dkms.install20
4 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..224ff3acd05
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+# Generated by mksrcinfo v8
+# Sat Sep 17 11:33:19 UTC 2016
+pkgbase = r8152-dkms
+ pkgdesc = A kernel module for Realtek 8152 network adapters
+ pkgver = 2.07.0
+ pkgrel = 1
+ url = http://www.realtek.com.tw
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = glibc
+ depends = dkms
+ optdepends = linux-headers: Build the module for Arch kernel
+ optdepends = linux-lts-headers: Build the module for LTS Arch kernel
+ conflicts = r8152
+ source = http://12244.wpc.azureedge.net/8012244/drivers/rtdrivers/cn/nic/0005-r8152.53-2.07.0.tar.bz2
+ source = dkms.conf
+ sha256sums = cabefb22eef081a2d34088322efc9f1ac55b73978965eb24643a8037837d8b7b
+ sha256sums = 0a15d5490745d1763b812be21e0ee32c1e63bc434459229ef7e66f2af2c50b85
+
+pkgname = r8152-dkms
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..36025083e89
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Giorgio Gilestro <giorgio@gilest.ro>
+_pkgbase=r8152
+pkgname=${_pkgbase}-dkms
+pkgver=2.07.0
+pkgrel=1
+pkgdesc="A kernel module for Realtek 8152 network adapters"
+url="http://www.realtek.com.tw"
+license=("GPL")
+arch=('i686' 'x86_64')
+depends=('glibc' 'dkms')
+conflicts=("${_pkgbase}")
+optdepends=('linux-headers: Build the module for Arch kernel'
+ 'linux-lts-headers: Build the module for LTS Arch kernel')
+#install=$pkgname.install
+source=(http://12244.wpc.azureedge.net/8012244/drivers/rtdrivers/cn/nic/0005-${_pkgbase}.53-$pkgver.tar.bz2
+ 'dkms.conf')
+sha256sums=('cabefb22eef081a2d34088322efc9f1ac55b73978965eb24643a8037837d8b7b'
+ '0a15d5490745d1763b812be21e0ee32c1e63bc434459229ef7e66f2af2c50b85')
+
+prepare() {
+ cd "r8152-$pkgver"
+}
+
+
+package() {
+ install -Dm644 dkms.conf "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/dkms.conf"
+
+ sed -e "s/@PKGNAME@/${_pkgbase}/g" \
+ -e "s/@PKGVER@/${_pkgbase}/g" \
+ -i "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/dkms.conf"
+
+ #cd "${_pkgbase}-$pkgver"
+ #rm src/Makefile_linux24x
+ cp -dr --no-preserve='ownership' "${_pkgbase}-$pkgver" "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/src"
+}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 00000000000..43e61bb5799
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,8 @@
+PACKAGE_NAME="@PKGNAME@"
+PACKAGE_VERSION="@PKGVER@"
+MAKE[0]="make -C $kernel_source_dir SUBDIRS=$dkms_tree/$module/$module_version/build/src EXTRA_CFLAGS='-DCONFIG_R8152_NAPI -DCONFIG_R8152_VLAN' modules"
+CLEAN="rm src/@PKGNAME@.ko src/*.o || true"
+BUILT_MODULE_NAME[0]="@PKGNAME@"
+BUILT_MODULE_LOCATION[0]="src/"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/realtek"
+AUTOINSTALL="yes"
diff --git a/r8152-dkms.install b/r8152-dkms.install
new file mode 100644
index 00000000000..ddd32c44a3c
--- /dev/null
+++ b/r8152-dkms.install
@@ -0,0 +1,20 @@
+#/bin/sh
+post_install() {
+ dkms add r8152/${1%-*}
+ cat << EOF
+==> To build and install your modules run: dkms install r8152/${1%-*}
+==> To do this automatically at startup run: systemctl enable dkms.service
+EOF
+}
+
+pre_upgrade() {
+ pre_remove "$2"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+pre_remove() {
+ [ -n "${1%-*}" ] && dkms remove r8152/${1%-*} --all &>/dev/null || true
+}