blob: 6f64f7063be5012d70f479c22d9f5fea28af9e84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# 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=2
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/setarcos/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"
"blacklist-mt7601u.conf"
"001-MT7601u-Linux-4.x.patch"
"dkms.conf")
sha256sums=('53a0b97563b61396b0bcde9ffeb677f7dbe46db764fb367517e0c99e90fd6e2f'
'5cb57146dcbc238feff1c0e1836dea995c33180892327eba02804a0755ce9a81'
'2c14cefbb3fe1229412f09129675948db40e60550ad8413dd31e8e24c9d7b189'
'3eacca3e1b034aba788ced29f452c47706e9b31ed7c624fb5c006ce751406f40'
'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}/blacklist-mt7601u.conf" "${pkgdir}/etc/modprobe.d/"
install -m644 "${srcdir}/${_pkg}/etc/Wireless/RT2870AP/RT2870AP.dat" "${pkgdir}/etc/Wireless/RT2870AP/"
cd "${srcdir}/${_pkg}/"
patch -p1 < ../001-MT7601u-Linux-4.x.patch
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
}
|