Add aur/dkms-8188eu driver for realtek

This commit is contained in:
moonman 2013-06-02 23:54:10 -06:00
parent 2dbf6a9357
commit d4217585ca
3 changed files with 104 additions and 0 deletions

53
aur/dkms-8188eu/PKGBUILD Normal file
View file

@ -0,0 +1,53 @@
# Maintainer: Jan Madaj < madaj.jan@gmail.com >
#alarm: moonman
# -dkms.conf: change ARCH=i386 to ARCH=arm
pkgname=dkms-8188eu
pkgver=v4.1.4_6773
pkgrel=1
pkgdesc="Driver for Realtek RTL8188EU chipset wireless cards"
arch=('arm')
url="http://www.realtek.com.tw/"
license=('GPL')
depends=('dkms' 'linux-headers')
conflicts=()
install=${pkgname}.install
options=(!strip)
_pkgname="8188eu"
source=("rtl8188eu.tar.gz::https://github.com/lwfinger/rtl8188eu/tarball/master"
"dkms.conf")
md5sums=( 'SKIP'
'fc32543ad16a503466411663561a87f9')
package() {
#Change github commit id in folder name to master
mv ${srcdir}/lwfinger-rtl8188eu-* ${srcdir}/rtl8188eu-master
installDir="$pkgdir/usr/src/${_pkgname}-${pkgver}"
install -dm755 "$installDir"
install -m644 "$srcdir/dkms.conf" "$installDir"
cd "${srcdir}/rtl8188eu-master/"
msg2 "Disabling Power Savings Mode"
sed -i 's/^CONFIG_POWER_SAVING\ =\ y/CONFIG_POWER_SAVING\ =\ n/' Makefile
for d in `find . -type d`
do
install -dm755 "$installDir/$d"
done
for f in `find . -type f`
do
install -m644 "${srcdir}/rtl8188eu-master/$f" "$installDir/$f"
done
}

View file

@ -0,0 +1,45 @@
post_install (){
MODULE="8188eu"
DKMS=$(which dkms)
MODPROBE=$(which modprobe)
VERSION="v4.1.4_6773"
$DKMS add -m $MODULE -v $VERSION
$DKMS build -m $MODULE -v $VERSION
$DKMS install -m $MODULE -v $VERSION
$MODPROBE -a $MODULE
}
pre_upgrade(){
pre_remove
}
post_upgrade(){
post_install
}
pre_remove (){
_inmemory=$(/usr/bin/lsmod | /usr/bin/grep 8188eu)
if [ ! -z "$_inmemory" ]; then
/usr/bin/rmmod 8188eu &> /dev/null
fi
DKMS=$(which dkms)
_line=$($DKMS status -m 8188eu)
if echo "$_line" | grep -E 'added|built|installed'; then
version=$(echo "$_line" | sed 's/8188eu,\([^,]*\)[,:].*/\1/;t;d')
$DKMS remove -m 8188eu -v $version --all
fi
}
post_remove () {
/sbin/depmod -a
}
op=$1
shift
$op $*

View file

@ -0,0 +1,6 @@
PACKAGE_NAME="8188eu"
PACKAGE_VERSION="v4.1.4_6773"
MAKE[0]="CONFIG_RTL8188EU=m make ARCH=arm CROSS_COMPILE= -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules"
BUILT_MODULE_NAME[0]="8188eu"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
AUTOINSTALL="yes"