PKGBUILDs/alarm/rpi-eeprom/PKGBUILD
graysky c0dc3fd5db alarm/rpi-eeprom to 20210611-2
Fix backup target
2021-06-12 06:59:14 -04:00

36 lines
1.3 KiB
Bash

# Maintainer: graysky <graysky@archlinux.us>
buildarch=12
pkgname=rpi-eeprom
_commit=4b7fcc65e98dc42baef6e5eab5268e87f932b5c2
pkgver=20210611
pkgrel=2
pkgdesc="Bootloader and VL805 USB controller EEPROM update tool for RPi4"
arch=('any')
url='https://github.com/raspberrypi/rpi-eeprom'
license=('custom')
depends=(python pciutils raspberrypi-firmware coreutils binutils)
backup=("etc/default/$pkgname-update")
source=("https://github.com/raspberrypi/rpi-eeprom/archive/$_commit.tar.gz")
md5sums=('47233beef732ac7f23bc43f413be3682')
package() {
cd "$pkgname-$_commit"
install -pd "$pkgdir/usr/bin"
install -pm755 rpi-eeprom-config "$pkgdir/usr/bin/rpi-eeprom-config"
install -pm755 rpi-eeprom-update "$pkgdir/usr/bin/rpi-eeprom-update"
install -pDm644 "$pkgname-update-default" "$pkgdir/etc/default/$pkgname-update"
# Arch ARM does not ship raspi-config
sed -i '/to change the release/d' "$pkgdir/usr/bin/rpi-eeprom-update"
install -pd "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/backup"
for target in beta critical stable; do
cp -a "firmware/$target" "$pkgdir/usr/lib/firmware/raspberrypi/bootloader"
done
ln -sf critical "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/default"
ln -sf stable "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/latest"
install -pDm644 LICENSE "$pkgdir/usr/share/doc/$pkgname"
}