summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7fe8af5401da66cbf22c3fc5503007a040fd15db (plain)
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
# Maintainer:  Dimitris Kiziridis <ragouel at outlook dot com>

pkgname=dankcli-git
pkgver=0.5.8.r2.fbb8058
pkgrel=1
pkgdesc="CLI Image Captioning Tool or Meme Generator which automatically adds whitespace and text to top"
arch=('any')
provides=('dankcli')
url='https://github.com/sggts04/dankcli'
license=('MIT')
depends=('python-pillow')
makedepends=('python-setuptools')
source=("dankcli::git+${url}")
sha256sums=('SKIP')

pkgver() {
  _version=$(awk '/version/{print substr($1,10,5)}' ${srcdir}/dankcli/setup.py)
  printf "$_version.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd ${srcdir}/dankcli
  python setup.py build
  echo "#!/usr/bin/env bash
  python -m dankcli \$1 \$2" > dankcli.sh
}

package() {
  cd ${srcdir}/dankcli
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm755 dankcli.sh "${pkgdir}/usr/bin/dankcli"
}