summaryrefslogtreecommitdiff
path: root/libre/linux-libre-firmware/PKGBUILD
blob: e0ec3fb91c8835484a9287d79e37b421d09d6e84 (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
# Maintainer: David P. <megver83@parabola.nu>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>

pkgname=linux-libre-firmware
pkgver=1.2
pkgrel=2
epoch=1
pkgdesc='Firmware files for Linux-libre'
arch=('any')
url='https://jxself.org/firmware'
license=('GPL3' 'GPL2')
makedepends=('cmake' 'arm-linux-gnueabi-gcc' 'sh-elf-gcc' 'sh-elf-newlib' 'xtensa-elf-gcc')
provides=('linux-firmware')
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'
           'amd-ucode'
           'openfwwf'
           'ath9k-htc-firmware')
replaces=(${conflicts[@]})
options=(!strip)
source=("${url}/${pkgname}-${pkgver}.tar.lz"{,.asc} '0001-remove-external-toolchains.patch' '0002-carl9170fw-gcc-8-fix.patch')
sha512sums=('2f70207ae7a98a71b74950a909e899c58617e46693a4b069cd16de1b2f0bb31c6abb07c0f4db88b5cecc3f3c50da56265da0b771c58b164981d628231f130387'
            'SKIP'
            'cc3417dcf165442260b509facc391fcce9125befea26c22b0748715484ab2373c56e5fa6e306ff74c1f39baccf8f5a0aee067d444d5980796e9d2c6fa6179fe5'
            'f1326f1af1586b39ca738ff9c263c5ac1388996914cbab9898adac3430dba2b28fecc5495ab624b098c853cc9795b646d0ca631b696413db14d7f4a47b4a2374')
validpgpkeys=('F611A908FFA165C699584ED49D0DB31B545A3198') # Jason Self

prepare() {
  cd $srcdir/$pkgname-$pkgver

  # do not download toolchains so we can build offline
  patch -p1 -i ../0001-remove-external-toolchains.patch

  # fix building with GCC 8+
  patch -p1 -i ../0002-carl9170fw-gcc-8-fix.patch

}  

build() {
  cd "${srcdir}/${pkgname}-${pkgver}/src"
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}/src"

  install -dm755 $pkgdir/usr/lib/firmware
  make prefix=$pkgdir/usr/lib/firmware install

  install -Dm644 WHENCE $pkgdir/usr/share/licenses/$pkgname/WHENCE
}