Skip to content

Commit a0c61ba

Browse files
committed
Add gen_pkgbuild.sh for AUR
1 parent 0c480b4 commit a0c61ba

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ __pycache__/
33
epy_reader.egg-info/*
44
.venv
55
.idea
6-
build
76
dist
87
tmp/
98
.coverage
9+
10+
build/**
11+
!build/gen_pkgbuild.sh

PKGBUILD build/gen_pkgbuild.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
#!/bin/bash -
2+
3+
(
4+
cat << 'EOF'
5+
# Maintainer: Benawi Adha <[email protected]>
6+
# Contributor: Spencer Muise <[email protected]>
7+
18
pkgname=epy-git
29
_name=epy
310
provides=('epy')
4-
pkgver=2022.1.8.r204.c1f9b4e
11+
pkgver=EPY_PKGVER
512
pkgrel=1
613
pkgdesc="CLI Ebook Reader"
714
arch=('any')
@@ -33,3 +40,5 @@ package() {
3340
cd $_name
3441
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
3542
}
43+
EOF
44+
) | 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)"`'/'

0 commit comments

Comments
 (0)