summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzabolcs Sipos2022-06-10 12:16:22 +0200
committerSzabolcs Sipos2022-06-10 12:16:22 +0200
commit9a384dd5a6f6b308cbd03c5076c09897cbb3e68e (patch)
tree7be25350822498f68212732028ee230a5cea0321
parent902a82890bbdbaa4a465a0b1e3e475aaa44265e6 (diff)
downloadaur-9a384dd5a6f6b308cbd03c5076c09897cbb3e68e.tar.gz
Real VCS package
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD24
2 files changed, 21 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c59a0e97a145..5a9a53ce54f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,8 @@
pkgbase = raspberrypi-devicetree-git
pkgdesc = Downstream devicetrees and overlays for Raspberry Pi
- pkgver = 20220331
+ pkgver = 1.20220331
pkgrel = 1
+ epoch = 1
url = https://github.com/raspberrypi/firmware
arch = any
license = GPL2
@@ -10,7 +11,5 @@ pkgbase = raspberrypi-devicetree-git
conflicts = linux-raspberrypi
conflicts = linux-raspberrypi4
options = !strip
- source = https://github.com/raspberrypi/firmware/archive/61966732d03de9b71baf561f920e018b54c241ac.tar.gz
- md5sums = b8c1249fb99e8fb692c44c2cff2d486a
pkgname = raspberrypi-devicetree-git
diff --git a/PKGBUILD b/PKGBUILD
index 5d6a73a246d3..e51917e55499 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,19 +4,33 @@ buildarch=28
pkgname=raspberrypi-devicetree-git
pkgdesc="Downstream devicetrees and overlays for Raspberry Pi"
-pkgver=20220331
+pkgver=1.20220331
pkgrel=1
+epoch=1
arch=('any')
url="https://github.com/raspberrypi/firmware"
+_repository="https://github.com/raspberrypi/firmware.git"
provides=('raspberrypi-devicetree')
conflicts=('uboot-raspberrypi' 'linux-raspberrypi' 'linux-raspberrypi4')
license=(GPL2)
options=(!strip)
-_commit=61966732d03de9b71baf561f920e018b54c241ac
-source=("https://github.com/raspberrypi/firmware/archive/${_commit}.tar.gz")
-md5sums=('b8c1249fb99e8fb692c44c2cff2d486a')
+
+prepare() {
+ rm -rf "${srcdir}"/*
+ git clone --filter=blob:none --no-checkout "${_repository}" "${srcdir}"/firmware
+ cd "${srcdir}"/firmware
+
+ latest_tag=$(git tag -l --sort=-version:refname "1.20*" | head -n 1)
+ echo "${latest_tag}" > "${srcdir}"/PKGVER
+
+ git -c advice.detachedHead=false checkout tags/"${latest_tag}"
+}
+
+pkgver() {
+ cat "${srcdir}"/PKGVER
+}
package() {
mkdir -p "${pkgdir}"/boot
- cp -r "${srcdir}"/firmware-${_commit}/boot/{*.dtb,overlays} "${pkgdir}"/boot
+ cp -r "${srcdir}"/firmware/boot/{*.dtb,overlays} "${pkgdir}"/boot
}