linux-libre-firmware/PKGBUILD

48 lines
1.7 KiB
Bash

# Contributor: André Silva <emulatorman@parabola.nu>
# Contributor: Márcio Silva <coadde@parabola.nu>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: Bastian Germann
pkgname=linux-libre-firmware
pkgver=1.4
pkgrel=2
pkgdesc='Firmware files for Linux-libre'
arch=('any')
url='https://jxself.org/firmware'
license=('GPL2')
makedepends=('arm-none-eabi-gcc' 'avr-libc' 'cmake' 'dfu-util' 'wget')
options=('!buildflags')
provides=('linux-firmware')
conflicts=('linux-firmware'
'linux-firmware-git')
source=("https://jxself.org/firmware/${pkgname}-${pkgver}.tar.lz"
"https://jxself.org/firmware/${pkgname}-${pkgver}.tar.lz.asc"
min-pagesize-gcc-fix.patch)
sha512sums=('3b4c8afb63c55f05df0b2686459c6bb2c0cb56db8384d5527506ff4a14b8de80e1a3037a9b57cccccd6953d869c6a71a6500c4c7b735253ea0b57c79854d9457'
'SKIP'
'0561c3afd0e9d08d6f9a1e3ecb479695d14fff8c850c29d9955f318d8ad870ed5a0792371a3ea0e3dc48ccf5619771cb6155e0531826088ed4c5cecd2912200d')
validpgpkeys=('F611A908FFA165C699584ED49D0DB31B545A3198')
prepare() {
# ln the arm-none-eabi- prefixed tools for av7110
mkdir -p bin
ln -sf /usr/bin/arm-none-eabi-gcc bin/arm-linux-gnueabi-gcc
ln -sf /usr/bin/arm-none-eabi-ld bin/arm-linux-gnueabi-ld
ln -sf /usr/bin/arm-none-eabi-objcopy bin/arm-linux-gnueabi-objcopy
export PATH=$PATH:$(pwd)/bin
# workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
patch -p0 -d "${pkgname}-${pkgver}" < min-pagesize-gcc-fix.patch
}
build() {
cd "${pkgname}-${pkgver}/src"
make
}
package() {
cd "${pkgname}-${pkgver}/src"
install -d -m755 "$pkgdir"/usr/lib/firmware
make prefix="${pkgdir}/usr/lib/firmware" install
install -Dm644 WHENCE "${pkgdir}/usr/share/licenses/${pkgname}"
}