diff options
author | benadha <benawiadha@gmail.com> | 2022-02-14 19:33:14 +0700 |
---|---|---|
committer | benadha <benawiadha@gmail.com> | 2022-02-14 19:33:14 +0700 |
commit | a0c61ba996d743a9c0ea3f2e5dbfa8d8703e8c53 (patch) | |
tree | 1466e904bf350d1f0cd9a7fcb1e45f3bf4750f68 /build | |
parent | 0c480b4908f7a24e32b84a9efc0e86e1fecf1184 (diff) | |
download | epy-a0c61ba996d743a9c0ea3f2e5dbfa8d8703e8c53.tar.gz |
Add gen_pkgbuild.sh for AUR
Diffstat (limited to 'build')
-rwxr-xr-x | build/gen_pkgbuild.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/build/gen_pkgbuild.sh b/build/gen_pkgbuild.sh new file mode 100755 index 0000000..d1e2d26 --- /dev/null +++ b/build/gen_pkgbuild.sh @@ -0,0 +1,44 @@ +#!/bin/bash - + +( +cat << 'EOF' +# Maintainer: Benawi Adha <benawiadha@gmail.com> +# Contributor: Spencer Muise <smuise@spencermuise.ca> + +pkgname=epy-git +_name=epy +provides=('epy') +pkgver=EPY_PKGVER +pkgrel=1 +pkgdesc="CLI Ebook Reader" +arch=('any') +url='https://github.com/wustho/epy' +license=("GPL3") +conflicts=("epy") +depends=( + 'python' +) +makedepends=( + 'git' + 'python-setuptools' +) +source=("git+https://github.com/wustho/$_name.git") +sha256sums=('SKIP') + +pkgver() { + cd "$_name" + printf "%s.r%s.%s" "$(grep -F '__version__ =' epy.py | awk -F\" '{print $2}')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd $_name + python setup.py build +} + +package() { + install -D "$srcdir/$_name/LICENSE" "$pkgdir/usr/share/licenses/$pkgname" + cd $_name + python setup.py install --root="$pkgdir" --optimize=1 --skip-build +} +EOF +) | sed 's/pkgver=EPY_PKGVER/pkgver='`printf "%s.r%s.%s" "$(grep -F '__version__ =' epy.py | awk -F\" '{print $2}')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"`'/' |