Merge pull request #425 from Metabolix/rpi-fw-split-v1

alarm/raspberrypi-firmware: Split package.
This commit is contained in:
pepedog 2013-03-18 12:23:59 -07:00
commit 9e7ebdbd93

View file

@ -1,8 +1,14 @@
buildarch=18
pkgname=raspberrypi-firmware
pkgbase=raspberrypi-firmware
pkgname=('raspberrypi-firmware'
'raspberrypi-firmware-bootloader'
'raspberrypi-firmware-bootloader-x'
'raspberrypi-firmware-emergency-kernel'
'raspberrypi-firmware-tools'
'raspberrypi-firmware-examples')
pkgver=20130308
pkgrel=1
pkgrel=3
pkgdesc="Firmware files for Raspberry Pi"
arch=('any')
url="https://github.com/raspberrypi/firmware"
@ -11,8 +17,7 @@ license=('custom')
options=(!strip)
_gitroot=git://github.com/raspberrypi/firmware.git
_gitname=firmware
provides=('raspberrypi-firmware')
conflicts=('raspberrypi-firmware')
build() {
msg "Connecting to GIT server...."
@ -28,14 +33,45 @@ build() {
rm -f "${srcdir}"/firmware/boot/kernel.img
}
package() {
package_raspberrypi-firmware() {
depends=('raspberrypi-firmware-bootloader'
'raspberrypi-firmware-bootloader-x'
'raspberrypi-firmware-emergency-kernel'
'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,kernel*.img,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-emergency-kernel() {
pkgdesc="Emergency kernel for Raspberry Pi"
mkdir -p "${pkgdir}"/boot
cp "${srcdir}"/firmware/boot/{COPYING.linux,kernel*.img} "${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,src,LICENCE} "${pkgdir}"/opt/vc
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,src,LICENCE} "${pkgdir}"/opt/vc
cp -R "${srcdir}"/firmware/hardfp/opt/vc/{bin,include,lib,sbin,LICENCE} "${pkgdir}"/opt/vc
fi
# Create lib links
@ -44,3 +80,15 @@ package() {
# ensure we can load libs
echo "/opt/vc/lib/" > "${pkgdir}"/etc/ld.so.conf.d/raspberrypi-firmware.conf
}
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
}