diff options
author | TheAifam5 | 2019-11-29 16:38:34 +0100 |
---|---|---|
committer | TheAifam5 | 2019-11-29 16:38:34 +0100 |
commit | 1199d14e750844883bab4d7d1090e421e70e92c4 (patch) | |
tree | 6133574f3ba40658980c36350ef672430ec51c70 /PKGBUILD | |
download | aur-openscad-nopscadlib-git.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..94a24f64349e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: TheAifam5 <theaifam5@gmail.com> + +pkgname='openscad-nopscadlib-git' +_gitname='nopscadlib' +pkgver=r151.6f93b6a +pkgrel=1 +pkgdesc='Library of parts modelled in OpenSCAD and a framework for making projects.' +url='https://github.com/nophead/NopSCADlib' +arch=('any') +depends=('openscad') +makedepends=('git') +license=('GPL-3.0') +source=("${_gitname}::git+https://github.com/nophead/NopSCADlib.git") +sha512sums=('SKIP') + +install="openscad-${_gitname}-git.install" + +pkgver() { + cd "${_gitname}" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +build() { + cd "${_gitname}" + rm -rf *test* + rm -rf examples +} + +package() { + mkdir -p "${pkgdir}/usr/share/openscad/libraries/${_gitname}/" + + cd "${_gitname}" + + find . -type f -name '*.scad' -exec install -Dm 744 '{}' "$pkgdir/usr/share/openscad/libraries/${_gitname}/{}" \; +} + |