51 lines
1.3 KiB
Text
51 lines
1.3 KiB
Text
# Maintainer: Antoine Martin <antoine.martin@protonmail.com>
|
|
pkgname=py-envtpl
|
|
pkgver=20180204
|
|
pkgrel=3
|
|
pkgdesc="Render jinja2 templates on the command line using shell environment variables"
|
|
url='https://github.com/andreasjansson/envtpl'
|
|
arch="noarch"
|
|
license="GPL"
|
|
depends="python py-argparse py-jinja2"
|
|
makedepends="git py-setuptools py-six"
|
|
source="$pkgname-$pkgver.tar.gz"
|
|
_giturl="https://github.com/andreasjansson/envtpl.git"
|
|
_gittag="72262ff18c20b0a55e1e113528e9d5aea55c5d00"
|
|
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
|
|
}
|
|
sha512sums="659e4e25b09ddcf8ca8e2208d76950b4cc2b4cf0981d8323c5c529ea8c9c57fa3560ec0d9126d1f79196659b8cce451b88ea20fbac0135df355407151496e103 py-envtpl-20180204.tar.gz"
|