aboutsummaryrefslogtreecommitdiffstats
path: root/PKGBUILD
blob: 8dcb08b484506e0b89ca8739f6a21c45e69295bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
pkgname=epy-git
_name=epy
provides=('epy')
pkgver=2022.1.8.r204.c1f9b4e
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
}