updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / rt3572usb-wusb600nv2 / PKGBUILD
blobf58eb110b64d8c8efbb1e7ed135446caa225d285
1 # Maintainer: Simone Sclavi 'Ito' <darkhado@gmail.com>
3 ## 23/05/11: updated following the instructions of this post:
4 ## http://ubuntuforums.org/showthread.php?t=1690402
5 pkgname=rt3572usb-wusb600nv2
6 pkgver=2.5.0.0
7 pkgrel=12
8 __date=2011_0427
9 pkgdesc='Linksys WUSB600Nv2 wireless adapter driver'
10 arch=('i686' 'x86_64')
11 url='http://www.ralinktech.com/en/04_support/support.php?sn=501'
12 license=('GPL' 'GPL3' 'custom:ralink-firmware')
13 backup=('etc/Wireless/RT2870STA/RT2870STA.dat')
14 source=(http://mirror.thebasementserver.com/soft/ralink/linux/2011_0427_RT3572_Linux_STA_v${pkgver}.DPO.bz2
15         patch.config
16         patch.wusb600nv2
17         rt2870-firmware-update.pl
18         rt3572sta.conf)
20 md5sums=('6a857c9d74987c7f3fa61b15ade179cc'
21          '405bb4acfcca2372a5317a2c69d153ea'
22          '88a73f32b6246860d43f2dc70f7fcbb9'
23          'ccff67ac30e1334a42a30721884662d5'
24          'e72148b7fd853a31386d5572575eb348')
26 depends=('linux-firmware' 'perl-libwww' 'perl-archive-zip' 'usbutils')
27 makedepends=('linux-headers')
28 install=rt3572usb-wusb600nv2.install
30 build() {
31     cd ${__date}_RT3572_Linux_STA_v${pkgver}.DPO/os/linux
32     patch -Np0 -i ../../../../patch.config 
33     cd ../../common/
34     patch -Np0 -i ../../../patch.wusb600nv2
35     cd ..
36     sed -i -e 's#usb_buffer_alloc#usb_alloc_coherent#g' \
37            -e 's#usb_buffer_free#usb_free_coherent#g' \
38            include/os/rt_linux.h
39     make
42 package() {
43    install -D -m 755 rt2870-firmware-update.pl ${pkgdir}/usr/bin/rt2870-firmware-update
44    install -D -m 644 rt3572sta.conf ${pkgdir}/etc/modprobe.d/rt3572sta.conf
45    cd ${__date}_RT3572_Linux_STA_v${pkgver}.DPO
46    install -D -m 755 os/linux/rt3572sta.ko ${pkgdir}/lib/modules/$(uname -r)/kernel/drivers/net/wireless/rt3572sta.ko
47    install -D -m 644 RT2870STA.dat ${pkgdir}/etc/Wireless/RT2870STA/RT2870STA.dat
48    install -D -m 644 RT2870STACard.dat ${pkgdir}/etc/Wireless/RT2870STA/RT2870STACard.dat
49    install -D -m 644 LICENSE\ ralink-firmware.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.ralink-firmware.txt