summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMehrad Mahmoudian2021-06-14 22:02:38 +0300
committerMehrad Mahmoudian2021-06-14 22:02:38 +0300
commit241af4ece287e1f0522e21f3b302ab0b581a1066 (patch)
tree622b4b7f0f396d43ec6a627aaeffff3c6d4375d9
parent8a0338dedc84f65f450448951fb710a0ad4e6c0f (diff)
downloadaur-241af4ece287e1f0522e21f3b302ab0b581a1066.tar.gz
[add] The git HEAD short hash now get appended to the flameshot verion
-rw-r--r--PKGBUILD19
1 files changed, 17 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 47e91156a7f7..7870d88172ab 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,12 @@
-# Maintainer : Feresey <p.milko1999@yandex.ru>
+# Maintainer : Jeremy Borgman <borgman.jeremy@pm.me>
+# Maintainer : Mehrad Mahmoudian <m.mahmoudian@gmail.com>
+# Contributor : Feresey <p.milko1999@yandex.ru>
# Contributor : j1simon <stemp@ono.com>
# Contributor : Feresey <p.milko1999@yandex.ru>
pkgname=flameshot-git
_pkgname=flameshot
-pkgver=r707.ceb51a9
+pkgver=r1354.8f6b6b08
pkgrel=1
pkgdesc="Powerful yet simple to use screenshot software"
arch=('i686' 'x86_64')
@@ -26,6 +28,19 @@ pkgver() {
build() {
cd "${srcdir}/${_pkgname}"
+
+ # get the details of the version numbers
+ NORMAL_VERSION="$(grep -oP 'FLAMESHOT_VERSION\s\d+\.\d+\.\d+' CMakeLists.txt | cut -d ' ' -f2)"
+ ROLLING_VERSION="r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
+
+ # skip the special characters in the versions
+ NORMAL_VERSION_PATTERN="$(echo ${NORMAL_VERSION} | sed 's/\./\\\./g')"
+ ROLLING_VERSION_PATTERN="$(echo ${ROLLING_VERSION} | sed 's/\./\\\./g')"
+
+ # Replace the version number in the cmake with the combination of versions above
+ sed "s/${NORMAL_VERSION_PATTERN}/${NORMAL_VERSION_PATTERN}_${ROLLING_VERSION_PATTERN}/" CMakeLists.txt
+
+
cmake -DCMAKE_INSTALL_PREFIX=/usr
make
}