diff options
author | JSH | 2015-08-27 18:57:12 -0400 |
---|---|---|
committer | JSH | 2015-08-27 18:57:12 -0400 |
commit | ac59536533c8520ea978a98500e6f5d870777ee6 (patch) | |
tree | 399efd3fe131998d3373f7ae37415a61389cf115 | |
download | aur-ac59536533c8520ea978a98500e6f5d870777ee6.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | dkms.conf | 8 | ||||
-rw-r--r-- | r8101-dkms.install | 28 |
4 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5e0a930d5056 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = r8101-dkms + pkgdesc = r8101 realtek lan drivers (DKMS) + pkgver = 1.027.00 + pkgrel = 1 + url = http://realtek.com.tw/ + install = r8101-dkms.install + arch = i686 + arch = x86_64 + license = GPL2 + depends = dkms + optdepends = ethtool: device configuration + provides = r8101 + conflicts = r8101 + source = dkms.conf + sha256sums = 2846e89fe3fd68c64c71a0f1150873a061571acc63e65cca6d825df7985ad7b5 + +pkgname = r8101-dkms + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7f8e3d201819 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: JSH <jsh6789(at)gmail(dot)com> +# Contributor: Geoffroy Carrier <gcarrier@aur.archlinux.org> + +_pkgbase=r8101 +pkgname=r8101-dkms +pkgver=1.027.00 +pkgrel=1 +pkgdesc="r8101 realtek lan drivers (DKMS)" +arch=('i686' 'x86_64') +url="http://realtek.com.tw/" +license=('GPL2') +depends=('dkms') +optdepends=('ethtool: device configuration') +provides=("${_pkgbase}") +conflicts=("${_pkgbase}") +install=${pkgname}.install + +# To retrieve the source file, you must first visit the following URL, click +# the link to the right of the LINUX driver, and finally place the file in the +# directory containing this PKGBUILD. Make sure the version matches pkgver. +# http://www.realtek.com.tw/Downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=7&Level=5&Conn=4&DownTypeID=3&GetDown=false + +source=('dkms.conf') + +package() { + + # Copy dkms.conf + 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 -r ${_pkgbase}-${pkgver}/src ${_pkgbase}-${pkgver}/Makefile \ + "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/ +} +sha256sums=('2846e89fe3fd68c64c71a0f1150873a061571acc63e65cca6d825df7985ad7b5') diff --git a/dkms.conf b/dkms.conf new file mode 100644 index 000000000000..0036f7e7f945 --- /dev/null +++ b/dkms.conf @@ -0,0 +1,8 @@ +PACKAGE_NAME="@_PKGBASE@" +PACKAGE_VERSION="@PKGVER@" +MAKE[0]="'make' BASEDIR=/usr/lib/modules/${kernelver} modules" +CLEAN="'make' clean" +BUILT_MODULE_LOCATION="src/" +BUILT_MODULE_NAME[0]="@_PKGBASE@" +DEST_MODULE_LOCATION[0]="/kernel/drivers/net/ethernet/realtek" +AUTOINSTALL="yes"
\ No newline at end of file diff --git a/r8101-dkms.install b/r8101-dkms.install new file mode 100644 index 000000000000..6e6cac26294e --- /dev/null +++ b/r8101-dkms.install @@ -0,0 +1,28 @@ +# arg 1: the new package version +post_install() { + dkms add r8101/${1%-*} + cat << EOF +==> To build and install your modules run: dkms install r8101/${1%-*} +==> To do this automatically at startup run: systemctl enable dkms.service +EOF +} + +# arg 1: the new package version +# arg 2: the old package version +pre_upgrade() { + pre_remove "$2" +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + post_install "$1" +} + +# arg 1: the old package version +pre_remove() { + # Remove modules using dkms + [ -n "${1%-*}" ] && dkms remove r8101/${1%-*} --all &>/dev/null || true +} + +# vim:set ts=2 sw=2 ft=sh et:
\ No newline at end of file |