summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 482cd4f9ce052e4a6b4698591f5dabda2ade87e2 (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
34
35
36
37
38
39
40
41
# Contributor: Alexandre Jesus <adbjesus@gmail.com>
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=soccer-cli-git
epoch=1
pkgver=20211129_r306.04932b6
pkgrel=1
pkgdesc="Soccer for Hackers - a CLI for all the football scores."
arch=('any')
url="https://github.com/architv/soccer-cli"
license=('MIT')
makedepends=('git' 'python' 'python2')
source=('git+https://github.com/architv/soccer-cli.git')
md5sums=('SKIP')

pkgver() {
  cd ${pkgbase%-git}

  # Get the version number.
  printf "%s_r%s.%s" "$(git log -1 --format="%cd" --date=short|tr -d - )" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd ${pkgbase%-git}

  sed -i -e 's/requests==2/requests>=2/' setup.py
  cd ..
  cp -r ${pkgbase%-git} ${pkgbase%-git}3
}

package_python-soccer-cli-git() {
  depends=('python-click' 'python-requests')
  provides=('python-soccer-cli')
  cd ${pkgbase%-git}3

  install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE

  python setup.py install --root="$pkgdir/" --optimize=1
  mv "$pkgdir"/usr/bin/soccer "$pkgdir"/usr/bin/soccer3
}