diff options
author | Andy Weidenbaum | 2015-06-09 11:41:59 -0700 |
---|---|---|
committer | Andy Weidenbaum | 2015-06-09 11:41:59 -0700 |
commit | c069690d30607fe77a2ed16d89f134a001a69e50 (patch) | |
tree | a0f62c0ed2b4cc09dd0eebcfd9cf045639778829 | |
download | aur-c069690d30607fe77a2ed16d89f134a001a69e50.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | LICENSE | 26 | ||||
-rw-r--r-- | PKGBUILD | 51 |
3 files changed, 99 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6c1906efd15d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = stlviewer-git + pkgdesc = Simple command line tool to view STL files + pkgver = 20150602 + pkgrel = 1 + url = https://github.com/vishpat/stlviewer/wiki + arch = i686 + arch = x86_64 + license = custom + makedepends = gcc + makedepends = git + makedepends = glu + makedepends = python2 + depends = freeglut + provides = stlviewer + conflicts = stlviewer + source = git+https://github.com/vishpat/stlviewer + source = LICENSE + sha256sums = SKIP + sha256sums = f43ca3551171a46b73b45c0cb37f57408294feea87f7a840a5dc642edf6f68b2 + +pkgname = stlviewer-git + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..f82ce355268e --- /dev/null +++ b/LICENSE @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2012, Vishal Patil + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..01d6df9a88cf --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Andy Weidenbaum <archbaum@gmail.com> +# Contributor: yar + +pkgname=stlviewer-git +pkgver=20150602 +pkgrel=1 +pkgdesc="Simple command line tool to view STL files" +arch=('i686' 'x86_64') +depends=('freeglut') +makedepends=('gcc' 'git' 'glu' 'python2') +url="https://github.com/vishpat/stlviewer/wiki" +license=('custom') +source=(git+https://github.com/vishpat/stlviewer + LICENSE) +sha256sums=('SKIP' + 'f43ca3551171a46b73b45c0cb37f57408294feea87f7a840a5dc642edf6f68b2') +provides=('stlviewer') +conflicts=('stlviewer') + +pkgver() { + cd ${pkgname%-git} + git log -1 --format="%cd" --date=short | sed "s|-||g" +} + +prepare() { + cd ${pkgname%-git} + + msg 'Fixing Python version...' + find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/python#/usr/bin/python2#g' + find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/env python#/usr/bin/env python2#g' +} + +build() { + cd ${pkgname%-git} + + msg 'Compiling...' + python2 compile.py +} + +package() { + cd ${pkgname%-git} + + msg 'Installing executable...' + install -D -m755 stlviewer "${pkgdir}/usr/bin/stlviewer" + + msg 'Installing license...' + install -D -m644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE" + + msg 'Cleaning up pkgdir...' + find "$pkgdir" -type d -name .git -exec rm -r '{}' + +} |