summaryrefslogtreecommitdiff
path: root/libre/linux-libre-firmware/PKGBUILD
blob: fc555c7b929450abc5351507dbf1340fa6da215c (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
80
81
82
83
84
85
# Maintainer: André Silva <emulatorman@lavabit.com>
# Contributor: Márcio Silva <coadde@lavabit.com>

pkgname=linux-libre-firmware
pkgver=3.9
pkgrel=2
pkgdesc='Free firmware files for Linux-libre'
arch=('any')
url=('http://linux-libre.fsfla.org/'
     'http://wireless.kernel.org/en/users/Drivers/ath9k_htc')
license=('GPL2' 'BSD')
makedepends=('git' 'wget')
provides=('linux-firmware'
          'kernel26-firmware=2.6.34.99')
conflicts=('linux-firmware'
           'linux-firmware-git'
           'kernel26-firmware'
           'ar9170-fw'
           'iwlwifi-1000-ucode'
           'iwlwifi-3945-ucode'
           'iwlwifi-4965-ucode'
           'iwlwifi-5000-ucode'
           'iwlwifi-5150-ucode'
           'iwlwifi-6000-ucode'
           'rt2870usb-fw'
           'rt2x00-rt61-fw'
           'rt2x00-rt71w-fw')
replaces=('linux-firmware'
          'kernel26-firmware'
          'ar9170-fw'
          'iwlwifi-1000-ucode'
          'iwlwifi-3945-ucode'
          'iwlwifi-4965-ucode'
          'iwlwifi-5000-ucode'
          'iwlwifi-5150-ucode'
          'iwlwifi-6000-ucode'
          'rt2870usb-fw'
          'rt2x00-rt61-fw'
          'rt2x00-rt71w-fw')
source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu/linux-libre-$pkgver-gnu.tar.xz"
        "git://github.com/qca/open-ath9k-htc-firmware")
md5sums=('120df29f88622dabf7015a22c7cc8e25'
         'SKIP')

prepare() {

  cd $srcdir/open-ath9k-htc-firmware

  # prepare toolchain to compile ath9k-htc firmware
  make toolchain

}

build() {

  cd $srcdir/open-ath9k-htc-firmware

  # create firmware folder to put the free firmware files there
  mkdir -p $pkgdir/usr/lib/firmware

  # compile ath9k-htc-firmware
  make -C target_firmware

  mv htc_{7010,9271}.fw $pkgdir/usr/lib/firmware

  cd $srcdir/linux-$pkgver

  # compile free firmware files of linux-libre source code  
  make INSTALL_FW_PATH=$pkgdir/usr/lib/firmware firmware_install

}

package() {

  install -d -m755 $pkgdir/usr/share/licenses/$pkgname

  # move LICENSE.TXT from ath9k-htc firmware to linux-firmware license folder
  cd $srcdir/open-ath9k-htc-firmware-1.3.2
  mv LICENSE.TXT $pkgdir/usr/share/licenses/$pkgname/LICENCE.atheros_firmware
  
  # move WHENCE file to linux-firmware license folder
  cd $srcdir/linux-$pkgver
  mv firmware/WHENCE $pkgdir/usr/share/licenses/$pkgname

}