summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArch Nous2015-06-11 15:52:30 +0300
committerArch Nous2015-06-11 15:52:30 +0300
commit2e826886cee5a109114250a0cae5f2e4aa695073 (patch)
tree77a39e0dd743e5537f3e62120b23ba4b9d138297
downloadaur-mt7601u-dkms.tar.gz
Initial import
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD71
-rw-r--r--dkms.conf8
-rw-r--r--mt7601u-dkms.install21
-rw-r--r--mt7601u.conf1
5 files changed, 127 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c26bda2b7521
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = mt7601u-dkms
+ pkgdesc = Kernel module for MediaTek MT7601U USB dongles, written from scratch based on the vendor GPL-driver. Unlike the vendor driver this driver uses modern Linux WiFi infrastructure and should work flawlessly with NetworkManager, wicd, wpa_supplicant and such.
+ pkgver = 3.1
+ pkgrel = 1
+ url = http://www.ralinktech.com
+ install = mt7601u-dkms.install
+ arch = any
+ license = GPL
+ depends = linux-headers>=3.19
+ depends = dkms
+ conflicts = dkms-mt7601u
+ conflicts = mt7601u-ap-dkms
+ conflicts = dkms-mt7601u-latest
+ noextract = DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
+ options = !strip
+ source = https://github.com/kuba-moo/mt7601u/archive/master.zip
+ source = http://www.mediatek.com/AmazonS3/Downloads/linux/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
+ source = mt7601u.conf
+ source = dkms.conf
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 16e4d1b97a128a8f92f27af3124a331327c861996c9dda0dc337a77822b8931d
+ sha256sums = 3035f0d88d9cc6395237064026e64df737e964fe762591bdf41c508ca7070411
+
+pkgname = mt7601u-dkms
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9111fd410d47
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Christos Nouskas <nous%archlinux.us>
+# Adapted from dkms-mt7601u-latest by Freyermuth Julien <julien.chipster@archlinux.fr>
+
+_pkgname=mt7601u
+pkgname=${_pkgname}-dkms
+pkgver=3.1
+_pkg=${_pkgname}-${pkgver}
+pkgrel=1
+pkgdesc="Kernel module for MediaTek MT7601U USB dongles, written from scratch based on the vendor GPL-driver. Unlike the vendor driver this driver uses modern Linux WiFi infrastructure and should work flawlessly with NetworkManager, wicd, wpa_supplicant and such."
+arch=('any')
+url="http://www.ralinktech.com"
+license=('GPL')
+depends=('linux-headers>=3.19' 'dkms')
+conflicts=('dkms-mt7601u' 'mt7601u-ap-dkms' 'dkms-mt7601u-latest' )
+install=${pkgname}.install
+options=(!strip)
+source=("https://github.com/kuba-moo/mt7601u/archive/master.zip"
+ "http://www.mediatek.com/AmazonS3/Downloads/linux/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2"
+# "https://mt7601-openwrt.googlecode.com/hg/patches/001-DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0-v2.patch"
+# "https://mt7601-openwrt.googlecode.com/hg/patches/002-rt2870-mt7601Usta-kuid_t-kgid_t.patch"
+ "${_pkgname}.conf"
+ "dkms.conf")
+noextract=('DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2')
+
+prepare() {
+ rm -rf "${srcdir}/mt7601u-master"
+ cd "${srcdir}"
+ unzip master.zip
+ tar jxf DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2 ./DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/mcu/bin/MT7601.bin
+ mv "${srcdir}/mt7601u-master" "${srcdir}/${_pkg}/"
+}
+
+build() {
+ #gcc 4.9 adds -Werror=date-time, which Linux has enabled in its build.
+ cd "${srcdir}/${_pkg}/"
+}
+
+package() {
+ echo $srcdir
+ installDir="${pkgdir}/usr/src/${_pkgname}-$pkgver"
+ install -dm755 "${pkgdir}/etc/modprobe.d" "${pkgdir}/usr/share/doc/${_pkgname}" \
+ "${pkgdir}/usr/lib/firmware"
+# install -dm755 "${pkgdir}/usr/share/doc/${_pkgname}"
+ cd "${srcdir}/${_pkg}/"
+ install -dm755 "$installDir"
+ install -m644 "${srcdir}/dkms.conf" "$installDir/"
+ install -m644 "${srcdir}/${_pkg}/README.md" "${pkgdir}/usr/share/doc/${_pkgname}"
+ install -m644 "${srcdir}/${_pkgname}.conf" "${pkgdir}/etc/modprobe.d/"
+ install -m644 "${srcdir}/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/mcu/bin/MT7601.bin" "${pkgdir}/usr/lib/firmware/mt7601u.bin"
+
+ cd "${srcdir}/${_pkg}/"
+
+ for d in `find . -type d`
+ do
+ install -dm755 "$installDir/$d"
+ done
+
+ for f in `find . -type f -o -type l`
+ do
+ install -m644 "${srcdir}/${_pkg}/$f" "$installDir/$f"
+ done
+
+ # Set name and version
+ sed -e "s/@_PKGNAME@/${_pkgname}/" \
+ -e "s/@PKGVER@/${pkgver}/" \
+ -i "${pkgdir}"/usr/src/${_pkg}/dkms.conf
+}
+sha256sums=('SKIP'
+ 'SKIP'
+ '16e4d1b97a128a8f92f27af3124a331327c861996c9dda0dc337a77822b8931d'
+ '3035f0d88d9cc6395237064026e64df737e964fe762591bdf41c508ca7070411')
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 000000000000..0bd556d644b5
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,8 @@
+PACKAGE_NAME="@_PKGNAME@"
+PACKAGE_VERSION="@PKGVER@"
+AUTOINSTALL="yes"
+
+MAKE[0]="'make'"
+BUILT_MODULE_NAME[0]="mt7601u"
+BUILT_MODULE_LOCATION[0]="."
+DEST_MODULE_LOCATION[0]="/kernel/drivers/net/wireless"
diff --git a/mt7601u-dkms.install b/mt7601u-dkms.install
new file mode 100644
index 000000000000..8c24b9f6e6a6
--- /dev/null
+++ b/mt7601u-dkms.install
@@ -0,0 +1,21 @@
+# old version (without -$pkgrel): ${1%%-*}
+# new version (without -$pkgrel): ${2%%-*}
+
+post_install() {
+ dkms install mt7601u/${1%%-*}
+ echo ">>> You might need to modprobe mt7601u manually."
+ echo ">>> Read the documentation in /usr/share/doc/mt7601/README."
+}
+
+pre_upgrade() {
+ pre_remove ${2%%-*}
+}
+
+post_upgrade() {
+ post_install ${1%%-*}
+}
+
+pre_remove() {
+ dkms remove mt7601u/${1%%-*} --all
+}
+
diff --git a/mt7601u.conf b/mt7601u.conf
new file mode 100644
index 000000000000..3f6f9faaef98
--- /dev/null
+++ b/mt7601u.conf
@@ -0,0 +1 @@
+softdep mt7601u pre: pre mac80211