mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
78 lines
3 KiB
Bash
78 lines
3 KiB
Bash
# Maintainer: Oleg Rakhmanov <oleg [at] archlinuxarm [dot] org>
|
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# Maintainer: graysky <graysky@archlinux.us>
|
|
|
|
buildarch=28
|
|
|
|
pkgname=raspberrypi-firmware
|
|
pkgver=20211025
|
|
pkgrel=1
|
|
_commitfirmware=8db7ef815b849a8a7cdd8e4cd14f41a07b0b0288
|
|
_commituserland=0093675e4aa6e152a3ffc318b51a124e96eb287b
|
|
pkgdesc="Firmware tools, libraries, and headers for Raspberry Pi"
|
|
arch=('armv6h' 'armv7h' 'aarch64')
|
|
url="https://github.com/raspberrypi/firmware"
|
|
license=('custom')
|
|
makedepends_aarch64=('cmake')
|
|
replaces=('raspberrypi-firmware-tools')
|
|
provides=('raspberrypi-firmware-tools')
|
|
options=(!strip)
|
|
source=('00-raspberrypi-firmware.conf'
|
|
'10-raspberrypi-firmware.rules'
|
|
'raspberrypi-firmware.sh')
|
|
source_armv6h=("https://github.com/raspberrypi/firmware/archive/$_commitfirmware.tar.gz")
|
|
source_armv7h=("https://github.com/raspberrypi/firmware/archive/$_commitfirmware.tar.gz")
|
|
source_aarch64=("https://github.com/raspberrypi/userland/archive/$_commituserland.tar.gz"
|
|
"https://raw.githubusercontent.com/raspberrypi/firmware/master/opt/vc/LICENCE")
|
|
md5sums=('72e0d5818fc513ece1b964f25f7e7882'
|
|
'2ad54baf398afe59ff5a70eb655f1b96'
|
|
'60919cb17f31b4698b6650bbb46f18ed')
|
|
md5sums_armv6h=('1ec527fd86aa9e89d95d590c8adeac4d')
|
|
md5sums_armv7h=('1ec527fd86aa9e89d95d590c8adeac4d')
|
|
md5sums_aarch64=('375a261b5fa1cd927e8ad3a63b8c87cc'
|
|
'86e53f5f5909ee66900418028de11780')
|
|
|
|
build() {
|
|
if [[ "${CARCH}" = 'aarch64' ]]; then
|
|
cd "${srcdir}/userland-${_commituserland}"
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DARM64=ON
|
|
make
|
|
fi
|
|
}
|
|
|
|
package() {
|
|
# setup permissions on video group for /opt/vc/bin/vcgencmd
|
|
install -Dm0644 "$srcdir/10-raspberrypi-firmware.rules" "$pkgdir/usr/lib/udev/rules.d/10-raspberrypi-firmware.rules"
|
|
|
|
# setup PATH to hit /opt/vc/bin/
|
|
install -Dt "$pkgdir/etc/profile.d" -m644 raspberrypi-firmware.sh
|
|
|
|
mkdir -p "${pkgdir}"/opt/vc
|
|
|
|
if [[ "${CARCH}" = 'aarch64' ]]; then
|
|
cd ${srcdir}/userland-${_commituserland}
|
|
make install DESTDIR="${pkgdir}"
|
|
install -m644 ../LICENCE "${pkgdir}"/opt/vc/LICENCE
|
|
rm -rf "${pkgdir}"/opt/vc/src
|
|
|
|
# Remove executable flag on shared objects
|
|
find "${pkgdir}" -type f -name '*.so' -print0 | xargs -0 chmod -x
|
|
|
|
# Create lib links
|
|
mkdir -p "${pkgdir}"/etc/ld.so.conf.d/
|
|
install -m644 ../00-raspberrypi-firmware.conf "${pkgdir}"/etc/ld.so.conf.d/00-raspberrypi-firmware.conf
|
|
else
|
|
cp -R "${srcdir}"/firmware-${_commitfirmware}/hardfp/opt/vc/{bin,include,lib,LICENCE} "${pkgdir}"/opt/vc
|
|
cp -R "${srcdir}"/firmware-${_commitfirmware}/opt/vc/man "${pkgdir}"/opt/vc
|
|
|
|
# Create lib links
|
|
mkdir -p "${pkgdir}"/etc/ld.so.conf.d/
|
|
cp "${srcdir}/00-raspberrypi-firmware.conf" "${pkgdir}"/etc/ld.so.conf.d/
|
|
fi
|
|
|
|
# Install man pages to /usr/share/man/ not to /opt/vc/man/
|
|
mkdir -p "${pkgdir}"/usr/share/man/man{1,7}
|
|
mv "${pkgdir}"/opt/vc/man/man1/*.1 "${pkgdir}"/usr/share/man/man1
|
|
mv "${pkgdir}"/opt/vc/man/man7/*.7 "${pkgdir}"/usr/share/man/man7
|
|
rm -rf "${pkgdir}"/opt/vc/man
|
|
}
|