summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3a3790a982e2994e288899b013fe8d63a657e954 (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
# Maintainer: Aseem Athale <athaleaseem@gmail.com>

_pkg=gnews
pkgname=python-${_pkg}-git
pkgver=r172.a322163
pkgrel=2
pkgdesc='A library that provides an API to search for articles on Google News and returns a usable JSON response.'
arch=('any')
url=https://github.com/ranahaani/gnews
license=('MIT')
depends=('python' 'python-feedparser' 'python-beautifulsoup4' 'python-dnspython' 'python-requests')
makedepends=('git' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel')
provides=('python-gnews')
conflicts=('python-gnews')
source=("git+${url}.git")
sha256sums=('SKIP')

pkgver() {
  cd "${_pkg}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
  cd "$_pkg"
  python -m build --wheel --no-isolation
}


package() {
  cd "$_pkg"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim:ts=2:sw=2:et: