2019-06-27 16:06:47 -04:00
|
|
|
# Maintainer: Antoine Martin <antoine.martin@protonmail.com>
|
2019-06-27 16:17:46 -04:00
|
|
|
pkgname=py-envtpl
|
2019-06-27 16:16:08 -04:00
|
|
|
pkgver=20180204
|
2019-06-27 16:18:35 -04:00
|
|
|
pkgrel=2
|
2019-06-27 16:06:47 -04:00
|
|
|
pkgdesc="Render jinja2 templates on the command line using shell environment variables"
|
|
|
|
url='https://github.com/andreasjansson/envtpl'
|
|
|
|
arch="noarch"
|
|
|
|
license="GPL"
|
2019-06-27 16:16:08 -04:00
|
|
|
depends="python py-argparse py-jinja2"
|
|
|
|
makedepends="git py-setuptools py-six"
|
2019-06-27 16:06:47 -04:00
|
|
|
source="$pkgname-$pkgver.tar.gz"
|
|
|
|
_giturl="https://github.com/andreasjansson/envtpl.git"
|
2019-06-27 16:16:08 -04:00
|
|
|
_gittag="72262ff18c20b0a55e1e113528e9d5aea55c5d00"
|
2019-06-27 16:06:47 -04:00
|
|
|
builddir="$srcdir/$pkgname"
|
|
|
|
options="!check"
|
|
|
|
|
|
|
|
snapshot() {
|
|
|
|
mkdir -p "$srcdir"
|
|
|
|
cd "${srcdir}"
|
|
|
|
if ! [ -d $pkgname.git ]; then
|
|
|
|
git clone $_giturl $pkgname.git || return 1
|
|
|
|
cd $pkgname.git
|
|
|
|
else
|
|
|
|
cd $pkgname.git
|
|
|
|
git fetch || return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Checking out"
|
|
|
|
git checkout $_gittag
|
|
|
|
echo "Repo archive"
|
|
|
|
git archive --prefix="$pkgname/" -o dam.tar --format "tar" $_gittag
|
|
|
|
|
|
|
|
gzip dam.tar -c > "$SRCDEST"/$pkgname-$pkgver.tar.gz
|
|
|
|
ln -s "$SRCDEST"/$pkgname-$pkgver.tar.gz "$startdir"/$pkgname-$pkgver.tar.gz
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$builddir"
|
|
|
|
python setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd "$builddir"
|
|
|
|
python setup.pytest
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$builddir"
|
|
|
|
python setup.py install --root="${pkgdir}" --optimize 1 --skip-build
|
|
|
|
}
|
2019-06-27 16:18:35 -04:00
|
|
|
sha512sums="a92934be44a7e42f3004190347d7aa54f3cbfaf54b21a70b83d7214ed9c5cd6f73d7c87e9f57a9e3bad2146a2342d7488ad39848da5ca77a5b5c6003b35f9c82 py-envtpl-20180204.tar.gz"
|
2019-06-27 16:16:08 -04:00
|
|
|
|