summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8217533798623b69ef7c294e5c70cc539a6fdf87 (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
# Maintainer: Jameson Pugh <imntreal@gmail.com>

pkgbase=python2-fedmsg
pkgname=('python-fedmsg' 'python2-fedmsg')
pkgver=1.1.1
pkgrel=1
pkgdesc='Utilities used around Fedora Infrastructure to send and receive messages'
arch=(any)
url='https://fedmsg.readthedocs.org/'
license=(LGPLv2)
makedeps=('python-setuptools' 'python2-setuptools')
source=("https://pypi.python.org/packages/0e/59/3a085f378b6200a6b9eb6d8f42654fb35ac181e095221796d5248372eb2f/fedmsg-0.18.2.tar.gz")
source=("https://github.com/fedora-infra/fedmsg/archive/${pkgver}.tar.gz")
sha256sums=('bdccd7206d0670f452cc502072afc89359664fdc5f9d49380cf6c99d9d84a8c2')

package_python-fedmsg() {
  pkgdesc='Utilities used around Fedora Infrastructure to send and receive messages (Python 3 version)'
  depends=('python-kitchen' 'python-pygments' 'python-pyzmq' 'python-arrow')
  cd "fedmsg-${pkgver}"

  python setup.py install --root="${pkgdir}" --optimize=1
  install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
  install -Ddm755 ${pkgname}/etc/fedmsg.d
  for file in {base.py,endpoints.py,gateway.py,ircbot.py,logging.py,relay.py,ssl.py}; do
    install -D -m644 fedmsg.d/${file} ${pkgdir}/etc/fedmsg.d/${file}
  done
}

package_python2-fedmsg() {
  pkgdesc='Utilities used around Fedora Infrastructure to send and receive messages (Python 2 version)'
  depends=('python2-kitchen' 'python2-pygments' 'python2-pyzmq' 'python2-arrow')
  cd "fedmsg-${pkgver}"

  python2 setup.py install --root="$pkgdir" --optimize=1
  install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
  for file in $(ls "${pkgdir}/usr/bin"); do
    mv "${pkgdir}/usr/bin/$file" "${pkgdir}/usr/bin/${file}-python2"
  done
}

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