diff options
author | bartus | 2016-09-19 19:24:39 +0200 |
---|---|---|
committer | bartus | 2016-09-19 19:24:39 +0200 |
commit | dd0dc04785e5c515021c5a66c749d9275f680b82 (patch) | |
tree | 5b298384ac0e2621e3b124db297015845f0f0618 | |
parent | b98ea9e29ffff9b1086b53465d6b94672a4e3a10 (diff) | |
download | aur-dd0dc04785e5c515021c5a66c749d9275f680b82.tar.gz |
refactor build script according to new "packaging standards"
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 64 |
2 files changed, 21 insertions, 48 deletions
@@ -1,12 +1,15 @@ pkgbase = blender-plugin-retopoflow-git pkgdesc = A suite of retopology tools for Blender - pkgver = 1.1.2 + pkgver = 1.2.1.r0.g0e11d2d pkgrel = 1 url = https://cgcookiemarkets.com/all-products/retopoflow/ arch = any license = GPL makedepends = git depends = blender + conflicts = blender-plugin-retopoflow + source = git+https://github.com/CGCookie/retopoflow.git + md5sums = SKIP pkgname = blender-plugin-retopoflow-git @@ -1,61 +1,31 @@ -# This is an example PKGBUILD file. Use this as a start to creating your own, -# and remove these comments. For more information, see 'man PKGBUILD'. -# NOTE: Please fill out the license field for your package! If it is unknown, -# then please put 'unknown'. +# Submitter: Fabien Devaux <fdev31@gmail.com> +# Maintainer: bartus szczepaniak <aur@bartus.33mail.com> -# See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines -# for more information on packaging from GIT sources. - -# Maintainer: Fabien Devaux <fdev31@gmail.com> -pkgname=blender-plugin-retopoflow-git -pkgver=1.1.2 +name=retopoflow +pkgname=blender-plugin-${name}-git +pkgver=1.2.1.r0.g0e11d2d pkgrel=1 pkgdesc="A suite of retopology tools for Blender" arch=('any') url="https://cgcookiemarkets.com/all-products/retopoflow/" license=('GPL') -groups=() depends=('blender') makedepends=('git') -provides=() -conflicts=() -replaces=() -backup=() -options=() -install= -source=() -noextract=() -md5sums=() #generate with 'makepkg -g' - -_gitroot=https://github.com/CGCookie/retopoflow.git -_gitname=retopoflow - -build() { - cd "$srcdir" - msg "Connecting to GIT server...." - - if [[ -d "$_gitname" ]]; then - cd "$_gitname" && git pull origin - msg "The local files are updated." - else - git clone "$_gitroot" "$_gitname" - fi - - msg "GIT checkout done or server timeout" - msg "Starting build..." - - rm -rf "$srcdir/$_gitname-build" - git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" +conflicts=('blender-plugin-retopoflow') +source=("git+https://github.com/CGCookie/retopoflow.git") +md5sums=('SKIP') + +pkgver() { + cd ${name} + # cutting off 'v' prefix that presents in the git tag + git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } package() { - cd "$srcdir/" - addons="$pkgdir/usr/share/blender/$(blender -v | head -n1 | cut -f2 -d ' ')/scripts/addons/" - if [ ! -d "$addons" ]; then - mkdir -p "$addons" - fi - cp -a "$_gitname" "$addons/$_gitname" - rm -fr "$addons/$_gitname/.git"* + cd ${srcdir} + addons="$pkgdir/usr/share/blender/$(blender -v | head -n1 | cut -f2 -d ' ')/scripts/addons" + install -d ${addons}/${name} + cp -r ${name}/* ${addons}/${name} } # vim:set ts=2 sw=2 et: |