sys-boot/raspberrypi-firmware: add logic for non-live releases
authorAndrey Utkin <andrey_utkin@gentoo.org>
Fri, 22 Mar 2019 23:59:23 +0000 (23:59 +0000)
committerAndrey Utkin <andrey_utkin@gentoo.org>
Sun, 24 Mar 2019 19:17:42 +0000 (19:17 +0000)
This allows to add release ebuilds by copying the file verbatim.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andrey Utkin <andrey_utkin@gentoo.org>
sys-boot/raspberrypi-firmware/raspberrypi-firmware-9999.ebuild

index 6037eca917bf1d59f650cb3b9bbf1348e6c2de39..ad0ee67fad5d3e7fa888d75bd00e61d19c2e457c 100644 (file)
@@ -3,14 +3,22 @@
 
 EAPI=7
 
-inherit git-r3 mount-boot readme.gentoo-r1
+inherit mount-boot readme.gentoo-r1
 
 DESCRIPTION="Raspberry PI boot loader and firmware"
 HOMEPAGE="https://github.com/raspberrypi/firmware"
 LICENSE="GPL-2 raspberrypi-videocore-bin"
 SLOT="0"
-EGIT_REPO_URI="https://github.com/raspberrypi/firmware"
-EGIT_CLONE_TYPE="shallow"
+
+if [[ "${PV}" == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/raspberrypi/firmware"
+       EGIT_CLONE_TYPE="shallow"
+else
+       SRC_URI="https://github.com/raspberrypi/firmware/archive/${PV}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="-* ~arm ~arm64"
+       S="${WORKDIR}/firmware-${PV}"
+fi
 
 RESTRICT="binchecks strip"