alarm/raspberrypi-firmware: Split package.

This commit is contained in:
Lauri Kenttä 2013-03-17 16:14:17 +02:00
parent 2a4f23e04d
commit 5376788e5f

View file

@ -1,8 +1,13 @@
buildarch=18
pkgname=raspberrypi-firmware
pkgbase=raspberrypi-firmware
pkgname=('raspberrypi-firmware'
'raspberrypi-firmware-bootloader'
'raspberrypi-firmware-emergency-kernel'
'raspberrypi-firmware-tools'
'raspberrypi-firmware-examples')
pkgver=20130308
pkgrel=1
pkgrel=2
pkgdesc="Firmware files for Raspberry Pi"
arch=('any')
url="https://github.com/raspberrypi/firmware"
@ -11,8 +16,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 +32,36 @@ build() {
rm -f "${srcdir}"/firmware/boot/kernel.img
}
package() {
package_raspberrypi-firmware() {
depends=('raspberrypi-firmware-bootloader'
'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}
}
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 +70,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
}