summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCampbell Barton2016-07-26 11:01:10 +1000
committerCampbell Barton2016-07-26 11:01:10 +1000
commit55f014208a7236b0c2ae5132160a9f5cf89e7e55 (patch)
treee89ec8eb9f6b9154aa9b39ece001ab65f5bee5d1
parenta8e88e98bcba6144042cf3a34b3e105d66e1f651 (diff)
downloadaur-55f014208a7236b0c2ae5132160a9f5cf89e7e55.tar.gz
Extract version from source+git
-rw-r--r--PKGBUILD27
1 files changed, 21 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6b393803ec1c..53be10664dca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,13 +2,12 @@
_pkgname=opentoonz
_version=git
-
+pkgver=1.0.3.635
pkgname=${_pkgname}-${_version}
-# todo, extract from ./toonz/sources/toonz/main.cpp, applicationFullName
-pkgver=1.0.3
-pkgrel=2
+pkgrel=1
pkgdesc="2D Animation software."
arch=('i686' 'x86_64')
+
url="https://github.com/${_pkgname}/${_pkgname}"
license=('BSD')
groups=()
@@ -34,6 +33,23 @@ md5sums=(
'SKIP'
) #autofill using updpkgsums
+pkgver() {
+ # Uses: opentoonz_version.git_commit_count
+ cd $_pkgname
+ # extract:
+ #
+ # const char *applicationFullName = "OpenToonz 1.0.3";
+ ver=$(cat toonz/sources/toonz/main.cpp | \
+ grep -e "const char \*applicationFullName.*OpenToon" | \
+ cut -d'"' -f 2 | \
+ cut -d' ' -f 2)
+
+ git_count=$(git rev-list --all --count)
+
+ echo $ver.$git_count
+}
+
+
build() {
# make libtiff
cd $_pkgname/thirdparty/tiff-4.0.3
@@ -45,9 +61,8 @@ build() {
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:PATH=/opt/opentoonz
- # Currently only single threaded builds working
cd $_pkgname-build
- make $MAKEFLAGS -j 1
+ make $MAKEFLAGS
}
package() {