summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 881f659f752b2c953678413385e82470ba17d8b5 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Clint Valentine <valentine.clint@gmail.com>

_name=slackclient
pkgbase='python-slackclient'
pkgname=('python-slackclient' 'python2-slackclient')
pkgver=1.2.1
pkgrel=1
pkgdesc="Python Slack API clients for Web API and RTM API"
arch=('any')
url="https://pypi.python.org/pypi/slackclient"
license=('MIT')
makedepends=(
  'python' 'python-setuptools'
  'python2' 'python2-setuptools')
options=(!emptydirs)
source=("${pkgname}"-"${pkgver}".tar.gz::https://pypi.io/packages/source/"${_name:0:1}"/"${_name}"/"${_name}"-"${pkgver}".tar.gz)
sha256sums=('e9de0c893e8c5473107f5927ae1e543d35246f0c834f5e86470b22b762211577')

prepare() {
  cp -a "${_name}"-"${pkgver}"{,-py2}
}

build(){
  cd "${srcdir}"/"${_name}"-"${pkgver}"
  python setup.py build

  cd "${srcdir}"/"${_name}"-"${pkgver}"-py2
  python2 setup.py build
}

package_python2-slackclient() {
  depends=(
    'python2'
    'python2-websocket-client'
    'python2-requests'
    'python2-six'
  )

  cd "${_name}"-"${pkgver}"-py2
  python2 setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
}

package_python-slackclient() {
  depends=(
    'python'
    'python-websocket-client'
    'python-requests'
    'python-six'
  )

  cd "${_name}"-"${pkgver}"
  python setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
}