# Template file for 'rpi-firmware'
_githash="de7aa7e95d4b8fdca7eea2a66ca811d54f34aeaa"
_gitshort="${_githash:0:7}"

pkgname=rpi-firmware
version=20160322
revision=1
noarch=yes
wrksrc="firmware-${_githash}"
short_desc="Firmware files for the Raspberry Pi (git ${_gitshort})"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="3-clause-BSD"
homepage="https://github.com/raspberrypi/firmware"
distfiles="https://github.com/raspberrypi/firmware/archive/${_githash}.tar.gz"
checksum=6b35f41f825300be482d41f35ef1d3f8e93b5e2a0eca9aa4fb6f9396893a5e8e

conf_files="/boot/cmdline.txt /boot/config.txt"

do_install() {
	rm -f boot/*.img
	rm -rf boot/overlays
	rm -f boot/*.dtb
	rm -f boot/COPYING.linux

	vmkdir boot
	cp -R boot/* ${DESTDIR}/boot

	vmkdir usr/share/licenses/${pkgname}
	mv ${DESTDIR}/boot/LICENCE.broadcom ${DESTDIR}/usr/share/licenses/${pkgname}

	# Install configuration files.
	vinstall ${FILESDIR}/cmdline.txt 644 boot
	vinstall ${FILESDIR}/config.txt 644 boot
}
