# Maintainer: David P. # Contributor: André Silva # Contributor: Márcio Silva # Contributor: Luke Shumaker pkgname=linux-libre-firmware pkgver=1.1 pkgrel=4 epoch=1 pkgdesc='Firmware files for Linux-libre' arch=('any') url='https://jxself.org/firmware' license=('GPL3' 'GPL2') makedepends=('cmake' 'gmp' 'gperf' 'arm-linux-gnueabi-gcc' 'sh-elf-gcc' 'sh-elf-newlib' 'xtensa-unknown-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} 'remove-wget.patch' # remove the download of external toolchains ) sha512sums=('4ef111f86e8a87bab31e02be171e09f47d71884f1737f5329e9dd07e9f799436d8ff2de5aa0b2cfb4bc921ed02bb2b59b9a1ea69176dcef5f902364d8725e75a' 'SKIP' '60b58bed66e737148a5954c18efb1113518f14cf43ee2b6e7e8cdabe253a6db1c0d696f01eb25ecda7a8d3300afcf0169fa35f5eb123211554f08710f2c26ea2') validpgpkeys=('F611A908FFA165C699584ED49D0DB31B545A3198') # Jason Self prepare() { cd $srcdir/$pkgname-$pkgver # Some firmwares download toolchains with wget. We don't want that patch -p1 -i ../remove-wget.patch # CARL9170 configuration sed -e '13s|config/conf|config/conf --alldefconfig|' \ -i src/carl9170fw/autogen.sh } build() { cd "${srcdir}/${pkgname}-${pkgver}/src" if [ $CARCH = x86_64 ]; then # Building as31 with -O2 in 64-bits systems will # make usbdux result into a segmentation fault # Source: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887320 CFLAGS=${CFLAGS/-O2/-O0} fi make } package() { cd "${srcdir}/${pkgname}-${pkgver}/src" install -dm755 $pkgdir/usr/lib/firmware make prefix=$pkgdir/usr/lib/firmware install # ath9k_htc works only if it's located at /usr/lib/firmware mv $pkgdir/usr/lib/firmware/ath9k_htc/* $pkgdir/usr/lib/firmware rm -r $pkgdir/usr/lib/firmware/ath9k_htc install -Dm644 WHENCE $pkgdir/usr/share/licenses/$pkgname/WHENCE }