summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6b117d759a2ce0a9c311becf1e15a5fb4274bc24 (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
# Former maintainer: Thomas Fanninger <thomas@fanninger.at>

pkgbase=transwhat
pkgname=('python-transwhat' 'python2-transwhat')
pkgver=0.2.2
pkgrel=1
epoch=1
pkgdesc="A gateway between the XMPP and the WhatsApp IM networks"
arch=('any')
url="https://github.com/stv0g/transwhat"
license=('GPL')
makedepends=('python-setuptools' 'python2-setuptools')
options=('!strip' '!emptydirs')
source=("$pkgname-$pkgver.tar.gz::https://github.com/stv0g/transwhat/archive/v0.2.2.tar.gz")
md5sums=('75f44a8dd5a1abb449e0b4426f457dc7')

package_python-transwhat() {
  cd "${srcdir}/transwhat-${pkgver}"
  depends=('python' 'python-protobuf' 'python-pillow' 'python-dateutil' 'python-yowsup>=2' 'python-e4u')
  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
  find "$pkgdir" -type f -exec sed -i 's#/usr/bin/python2#/usr/bin/python#g' {} \;
}

package_python2-transwhat() {
  pkgdesc='A gateway between the XMPP and the WhatsApp IM networks - Python 2'
  depends=('python2' 'python2-protobuf' 'python2-pillow' 'python2-dateutil' 'python2-yowsup>=2' 'python2-e4u' "python-transwhat=${epoch}:${pkgver}-${pkgrel}")

  cd "${srcdir}/transwhat-${pkgver}"
  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
}

# disabled for now
#check(){
#  cd "${srcdir}/transwhat-${pkgver}"
#  python2 setup.py test
#}