PKGBUILDs/alarm/rpi-eeprom/PKGBUILD

38 lines
1.3 KiB
Bash
Raw Normal View History

2021-05-31 11:08:12 +00:00
# Maintainer: graysky <graysky@archlinux.us>
buildarch=12
pkgname=rpi-eeprom
_commit=b93a7569a3b670078917ef0c29186cd2cfc47184
pkgver=20211006
2021-06-19 17:51:20 +00:00
pkgrel=1
2021-05-31 11:08:12 +00:00
pkgdesc="Bootloader and VL805 USB controller EEPROM update tool for RPi4"
arch=('any')
url='https://github.com/raspberrypi/rpi-eeprom'
license=('custom')
2021-06-05 20:32:58 +00:00
depends=(python pciutils raspberrypi-firmware coreutils binutils)
backup=("etc/default/$pkgname-update")
2021-05-31 11:08:12 +00:00
source=("https://github.com/raspberrypi/rpi-eeprom/archive/$_commit.tar.gz")
md5sums=('e383ee86aad8693a53a1202411cebae0')
install="$pkgname.install"
2021-05-31 11:08:12 +00:00
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"
}