PKGBUILDs/alarm/raspberrypi-firmware/PKGBUILD

86 lines
2.3 KiB
Bash
Raw Normal View History

buildarch=18
2012-03-17 18:53:40 +00:00
pkgbase=raspberrypi-firmware
pkgname=('raspberrypi-firmware'
'raspberrypi-firmware-bootloader'
2014-03-24 19:57:04 +00:00
'raspberrypi-firmware-bootloader-x'
'raspberrypi-firmware-tools'
'raspberrypi-firmware-examples')
pkgver=20140711
pkgrel=1
2012-03-17 18:53:40 +00:00
pkgdesc="Firmware files for Raspberry Pi"
arch=('any')
url="https://github.com/raspberrypi/firmware"
makedepends=('git')
2012-03-17 18:53:40 +00:00
license=('custom')
options=(!strip)
_gitroot=git://github.com/raspberrypi/firmware.git
_gitname=firmware
build() {
msg "Connecting to GIT server...."
if [[ -d "$_gitname" ]]; then
cd "$_gitname" && git pull origin
msg "The local files are updated."
else
git clone --depth 1 "$_gitroot" "$_gitname"
fi
msg "GIT checkout done or server timeout"
rm -f "${srcdir}"/firmware/boot/kernel.img
}
package_raspberrypi-firmware() {
depends=('raspberrypi-firmware-bootloader'
'raspberrypi-firmware-bootloader-x'
'raspberrypi-firmware-tools'
'raspberrypi-firmware-examples')
}
package_raspberrypi-firmware-bootloader() {
pkgdesc="Bootloader files for Raspberry Pi"
cp -R "${srcdir}"/firmware/boot "${pkgdir}"/boot
rm "${pkgdir}"/boot/{COPYING.linux,start_x.elf,fixup_x.dat}
}
package_raspberrypi-firmware-bootloader-x() {
pkgdesc="Bootloader with extra codecs for Raspberry Pi"
depends=('raspberrypi-firmware-bootloader')
mkdir -p "${pkgdir}"/boot
cp "${srcdir}"/firmware/boot/{start_x.elf,fixup_x.dat} "${pkgdir}"/boot
}
package_raspberrypi-firmware-tools() {
pkgdesc="Firmware tools and header files for Raspberry Pi"
mkdir -p "${pkgdir}"/opt/vc
if [[ $CARCH == "arm" ]]; then
cp -R "${srcdir}"/firmware/opt/vc/{bin,include,lib,sbin,LICENCE} "${pkgdir}"/opt/vc
elif [[ $CARCH == "armv6h" ]]; then
cp -R "${srcdir}"/firmware/hardfp/opt/vc/{bin,include,lib,sbin,LICENCE} "${pkgdir}"/opt/vc
fi
# Create lib links
mkdir -p "${pkgdir}"/etc/ld.so.conf.d/
# ensure we can load libs
echo "/opt/vc/lib/" > "${pkgdir}"/etc/ld.so.conf.d/00-raspberrypi-firmware.conf
2012-03-17 18:53:40 +00:00
}
package_raspberrypi-firmware-examples() {
pkgdesc="Firmware example sources for Raspberry Pi"
mkdir -p "${pkgdir}"/opt/vc
if [[ $CARCH == "arm" ]]; then
cp -R "${srcdir}"/firmware/opt/vc/src "${pkgdir}"/opt/vc
elif [[ $CARCH == "armv6h" ]]; then
cp -R "${srcdir}"/firmware/hardfp/opt/vc/src "${pkgdir}"/opt/vc
fi
}