summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDaniel Albers2020-04-12 14:11:05 +0200
committerDaniel Albers2020-04-12 14:12:20 +0200
commit551f55c368d578b36acb3c39484628a9f907b0fa (patch)
treed29e399eaf956decb684a90c26d50581b958272b /PKGBUILD
parent038d99321f07578003f3f714965b7417cc956c19 (diff)
downloadaur-inkscape-shallow-git.tar.gz
Use source based versioning, support incremental builds
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD17
1 files changed, 12 insertions, 5 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1225c5ba7a9a..cc2003683b1f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,6 @@
pkgname=inkscape-shallow-git
-pkgver=1.0+devel.r2.g6edc3e959f
+pkgver=1.1.dev.r0.g5215a56
pkgrel=1
-epoch=2
pkgdesc="An Open Source vector graphics editor, using SVG file format, from git master (shallow clone)"
url="https://gitlab.com/inkscape/inkscape"
arch=('i686' 'x86_64')
@@ -23,12 +22,20 @@ _gitname="inkscape.git"
pkgver() {
cd "$_gitname"
- printf %s "1.0+devel.r2.g6edc3e959f"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
- git clone --depth 1 https://gitlab.com/inkscape/inkscape "$_gitname"
- cd "$_gitname"
+ if [[ -d "$_gitname" ]]; then
+ cd $_gitname
+ git pull
+ else
+ git clone --depth 1 https://gitlab.com/inkscape/inkscape "$_gitname"
+ cd "$_gitname"
+ fi
+ version=$(packaging/snappy/version.sh; git restore -- .)
+ git branch $(git symbolic-ref --short HEAD) --contains "$version" 2>/dev/null ||
+ git tag -a -m "$version" "$version"
git submodule update --init --recursive
}