summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArch Nous2015-06-11 15:52:21 +0300
committerArch Nous2015-06-11 15:52:21 +0300
commitd1dae94a76933dd51f5caf2655c11f39aa9f5e75 (patch)
tree53e2f95957ae4ed3af6352b1a66f8e6faa6173fb
downloadaur-d1dae94a76933dd51f5caf2655c11f39aa9f5e75.tar.gz
Initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD72
-rw-r--r--dkms.conf14
-rw-r--r--mt7601u-ap-dkms.install23
-rw-r--r--mt7601u-ap.conf1
5 files changed, 129 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..55a90c0147e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = mt7601u-ap-dkms
+ pkgdesc = Kernel module for Ralink MT7601U chipset wireless adaptors with Access Point (AP / Master) support.
+ pkgver = 3.0.0.3
+ pkgrel = 1
+ url = http://www.ralinktech.com
+ install = mt7601u-ap-dkms.install
+ arch = any
+ license = GPL
+ depends = dkms
+ options = !strip
+ source = https://github.com/housq/mt7601u/archive/master.zip
+ source = mt7601u-ap.conf
+ source = dkms.conf
+ sha256sums = 952e6200163132fd1ee3f01b739b842129dfc05282e6366c80ac191d87b38da6
+ sha256sums = 5cb57146dcbc238feff1c0e1836dea995c33180892327eba02804a0755ce9a81
+ sha256sums = a4d4f94c9492f344d4baa05d5f5ce132eb3bf0f9fb6eec161a87eea9450ebc12
+
+pkgname = mt7601u-ap-dkms
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9361251789f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,72 @@
+# Maintainer: Christos Nouskas <nous%archlinux.us>
+# Adapted from dkms-mt7601u-latest by Freyermuth Julien <julien.chipster@archlinux.fr>
+
+_pkgname=mt7601u-ap
+pkgname=${_pkgname}-dkms
+pkgver=3.0.0.3
+_pkg=${_pkgname}-${pkgver}
+pkgrel=1
+pkgdesc="Kernel module for Ralink MT7601U chipset wireless adaptors with Access Point (AP / Master) support."
+arch=('any')
+url="http://www.ralinktech.com"
+license=('GPL')
+depends=('dkms')
+conflicts=()
+install=${pkgname}.install
+options=(!strip)
+source=("https://github.com/housq/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"
+ "mt7601u-ap.conf"
+ "dkms.conf")
+
+sha256sums=('952e6200163132fd1ee3f01b739b842129dfc05282e6366c80ac191d87b38da6'
+ '5cb57146dcbc238feff1c0e1836dea995c33180892327eba02804a0755ce9a81'
+ 'a4d4f94c9492f344d4baa05d5f5ce132eb3bf0f9fb6eec161a87eea9450ebc12')
+
+prepare() {
+ rm -rf "${srcdir}/mt7601u-master"
+ cd "${srcdir}"
+ unzip master.zip
+ mv "${srcdir}/mt7601u-master" "${srcdir}/${_pkg}/"
+}
+
+build() {
+ #gcc 4.9 adds -Werror=date-time, which Linux has enabled in its build.
+ cd "${srcdir}/${_pkg}/"
+ DATE=$(date +%d-%m-%Y);
+ TIME=$(date +%z);
+ sed -i "s|__DATE__|\"$DATE\"|g" src/sta/sta_cfg.c
+ sed -i "s|__TIME__|\"$TIME\"|g" src/sta/sta_cfg.c
+ sed -ri "s/^(SSID=).*/\1RA_11N_AP/" etc/Wireless/RT2870AP/RT2870AP.dat
+ sed -ri "s/^(WPAPSK=).*/\1ChangeMeNOW/" etc/Wireless/RT2870AP/RT2870AP.dat
+}
+
+package() {
+
+ installDir="${pkgdir}/usr/src/${_pkgname}-$pkgver"
+ install -dm755 "${pkgdir}/etc/Wireless/RT2870AP"
+ install -dm755 "${pkgdir}/etc/modprobe.d"
+ install -dm755 "$installDir"
+ install -m644 "${srcdir}/dkms.conf" "$installDir"
+ install -m644 "${srcdir}/mt7601u-ap.conf" "${pkgdir}/etc/modprobe.d/"
+ install -m644 "${srcdir}/${_pkg}/etc/Wireless/RT2870AP/RT2870AP.dat" "${pkgdir}/etc/Wireless/RT2870AP/"
+
+ 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
+}
diff --git a/dkms.conf b/dkms.conf
new file mode 100644
index 00000000000..4d0e5c97cc1
--- /dev/null
+++ b/dkms.conf
@@ -0,0 +1,14 @@
+PACKAGE_NAME="@_PKGNAME@"
+PACKAGE_VERSION="@PKGVER@"
+AUTOINSTALL="yes"
+
+MAKE[0]="make"
+BUILT_MODULE_NAME[0]="rtutil7601Uap"
+BUILT_MODULE_NAME[1]="mt7601Uap"
+BUILT_MODULE_NAME[2]="rtnet7601Uap"
+BUILT_MODULE_LOCATION[0]="src/os/linux"
+BUILT_MODULE_LOCATION[1]="src/os/linux"
+BUILT_MODULE_LOCATION[2]="src/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"
diff --git a/mt7601u-ap-dkms.install b/mt7601u-ap-dkms.install
new file mode 100644
index 00000000000..bf5a5c2ae25
--- /dev/null
+++ b/mt7601u-ap-dkms.install
@@ -0,0 +1,23 @@
+# old version (without -$pkgrel): ${1%%-*}
+# new version (without -$pkgrel): ${2%%-*}
+
+post_install() {
+ dkms install mt7601u-ap/${1%%-*}
+ echo ">>> You might need to modprobe mt7601Uap manually."
+ echo ">>> Also, you *must* change the default values (especially WPAPSK)"
+ echo ">>> in /etc/Wireless/RT2870AP/RT2870AP.dat"
+ echo ">>> Read the documentation in /usr/src/mt7601u-ap-3.0.0.3/doc."
+}
+
+pre_upgrade() {
+ pre_remove ${2%%-*}
+}
+
+post_upgrade() {
+ post_install ${1%%-*}
+}
+
+pre_remove() {
+ dkms remove mt7601u-ap/${1%%-*} --all
+}
+
diff --git a/mt7601u-ap.conf b/mt7601u-ap.conf
new file mode 100644
index 00000000000..1e44f28c30c
--- /dev/null
+++ b/mt7601u-ap.conf
@@ -0,0 +1 @@
+softdep mt7601Uap pre: rtutil7601Uap post: rtnet7601Uap