Merge pull request #905 from ddaygold/dkms-mt7601

dkms-mt7601: to use v3.0.0.4 upsteam src.
This commit is contained in:
Kevin Mihelich 2014-07-18 05:18:33 -06:00
commit 5248832cce
3 changed files with 21 additions and 36 deletions

View file

@ -1,8 +1,8 @@
pkgname=dkms-mt7601
pkgver=v3.0.0.3
pkgver=v3.0.0.4
pkgrel=1
pkgdesc="Driver for Ralink MT7601 chipset wireless adaptors"
arch=('arm')
arch=('arm' 'armv7h')
url="http://www.ralinktech.com"
license=('GPL')
depends=('dkms' 'linux-headers')
@ -10,20 +10,16 @@ conflicts=()
install=${pkgname}.install
options=(!strip)
_pkgname="mt7601"
source=("https://googledrive.com/host/0B_JlgOR4VNe0Sjg4ei0ySEY4aUE/DPA_MT7601U_LinuxSTA_3.0.0.3_20130717_LS.tar.bz2"
source=("https://ddaygold.github.io/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.pfc.tar.bz2"
"dkms.conf")
md5sums=('7597450f4374ecaa5798a8f60c956911'
'230952e09ff23d9725fc329a2e9522e3')
md5sums=('f7984ea77c465a01e89453a8b60f9e4f'
'f07b4518d0f1190e0c72230137afadb4')
package() {
# Change src dir name
mv ${srcdir}/DPA_MT7601U_LinuxSTA_3.0.0.3_20130717_LS ${srcdir}/$_pkgname-$pkgver
# Copy Makefile to subdir (because symbolic link is not copied for some reason)
rm ${srcdir}/$_pkgname-$pkgver/UTIL/Makefile
cp ${srcdir}/$_pkgname-$pkgver/Makefile.inc ${srcdir}/$_pkgname-$pkgver/UTIL/Makefile
mv ${srcdir}/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913 ${srcdir}/$_pkgname-$pkgver
installDir="$pkgdir/usr/src/$_pkgname-$pkgver"

View file

@ -1,26 +1,24 @@
post_install (){
MODULE="mt7601"
VERSION="v3.0.0.3"
DKMS=$(which dkms)
MODPROBE=$(which modprobe)
CP=$(which cp)
MKDIR=$(which mkdir)
VERSION="v3.0.0.4"
# TODO: replace /usr/src with a variable.
SRCDIR=/usr/src/$MODULE-$VERSION
$DKMS add -m $MODULE -v $VERSION
$DKMS build -m $MODULE -v $VERSION
$DKMS install -m $MODULE -v $VERSION
dkms add -m $MODULE -v $VERSION
dkms build -m $MODULE -v $VERSION
dkms install -m $MODULE -v $VERSION
# This file is read form a hardcoded location.
# Can we put this in a standard location?
PARAMSDIR="/etc/Wireless/RT2870STA"
$MKDIR -p $PARAMSDIR
$CP $SRCDIR/RT2870STA.dat $PARAMSDIR
mkdir -p $PARAMSDIR
cp $SRCDIR/RT2870STA.dat $PARAMSDIR
$MODPROBE -a mt7601Usta mtutil7601Usta mtnet7601Usta
depmod -a $(uname -r)
modprobe -a mt7601Usta
}
pre_upgrade(){
@ -37,18 +35,15 @@ pre_remove (){
/usr/bin/rmmod mt7601 &> /dev/null
fi
DKMS=$(which dkms)
_line=$($DKMS status -m mt7601)
_line=$(dkms status -m mt7601)
if echo "$_line" | grep -E 'added|built|installed'; then
version=$(echo "$_line" | sed 's/mt7601,\([^,]*\)[,:].*/\1/;t;d')
$DKMS remove -m mt7601 -v $version --all
dkms remove -m mt7601 -v $version --all
fi
RM=$(which rm)
RMDIR=$(which rmdir)
$RM -rf /etc/Wireless/RT2870STA
$RMDIR --ignore-fail-on-non-empty /etc/Wireless
rm -rf /etc/Wireless/RT2870STA
rmdir --ignore-fail-on-non-empty /etc/Wireless
}
post_remove () {

View file

@ -1,19 +1,13 @@
PACKAGE_NAME="mt7601"
PACKAGE_VERSION="v3.0.0.3"
PACKAGE_VERSION="v3.0.0.4"
AUTOINSTALL="yes"
MAKE[0]="make"
BUILT_MODULE_NAME[0]="mt7601Usta"
BUILT_MODULE_NAME[1]="mtutil7601Usta"
BUILT_MODULE_NAME[2]="mtnet7601Usta"
BUILT_MODULE_LOCATION[0]="MODULE/os/linux"
BUILT_MODULE_LOCATION[1]="UTIL/os/linux"
BUILT_MODULE_LOCATION[2]="NETIF/os/linux"
BUILT_MODULE_LOCATION[0]="os/linux"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
DEST_MODULE_LOCATION[1]="/kernel/drivers/net/wireless"
DEST_MODULE_LOCATION[2]="/kernel/drivers/net/wireless"