upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / sopel / repos / community-any / PKGBUILD
blob9080cbad917f44a308e874f107f19097e41d3348
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=sopel
4 pkgver=7.1.9
5 pkgrel=2
6 pkgdesc="An easy-to-use and highly extensible IRC Bot framework (Formerly Willie)"
7 arch=('any')
8 license=('custom:EFL')
9 url='https://sopel.chat'
10 depends=('python-setuptools' 'sqlite' 'python-xmltodict' 'python-pytz' 'python-praw'
11          'python-geoip2' 'python-requests' 'python-dnspython' 'python-sqlalchemy1.3')
12 makedepends=('python-sphinx' 'python-sphinxcontrib-autoprogram')
13 checkdepends=('python-pytest' 'python-pytest-vcr' 'python-requests-mock')
14 backup=('etc/sopel.cfg')
15 source=("https://github.com/sopel-irc/sopel/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
16         "open-U-deprecated.patch")
17 sha512sums=('55fd81f7d16bf3a46c216a0ae68b72df3cc2f4d1d282786f87eadadf51d19838f92d2e29a6a424905099dbf9e27ea495f6d54e676947dcd5c3edcff1d7b5aea3'
18             'aa3d13fad475bc5004545303694c3ce7eb7de9f780e266858aa70a47ca098b851395754962604210e3fb839af8e86ee237e36e2d15d3fe9dba5390f65e9a8db3')
20 prepare() {
21   cd sopel-$pkgver
22   sed -i 's/<6/<8/;s/==0.12/>=0.12/' {dev-,}requirements.txt
23   patch -Np1 -i ${srcdir}/open-U-deprecated.patch
26 build() {
27   cd sopel-$pkgver
28   python setup.py build egg_info
29   PYTHONPATH="$PWD" make -C docs man
32 check() {
33   cd sopel-$pkgver
34   PYTHONPATH="$PWD" pytest --ignore build/ -p no:nose
37 package() {
38   cd sopel-$pkgver
39   python setup.py install --root="$pkgdir" --optimize=1
41   install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
42   install -Dm644 contrib/sopel.cfg "$pkgdir/etc/sopel.cfg"
43   install -Dm644 contrib/sopel.service "$pkgdir/usr/lib/systemd/system/sopel.service"
44   install -Dm644 contrib/sopel.conf "$pkgdir/usr/lib/tmpfiles.d/sopel.conf"
45   install -Dm644 docs/build/man/sopel.1 "$pkgdir/usr/share/man/man1/sopel.1"