summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8a76cc425d55f2d1a6c9038166ef5117b85effce (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
# Maintainer: Clint Valentine <valentine.clint@gmail.com>
# Maintainer: Nathan Owens <ndowens @ artixlinux.org>

pkgbase='python-lzstring'
pkgname=('python-lzstring' 'python2-lzstring')
pkgver=1.0.4
pkgrel=1
pkgdesc="LZ-string compression for Python"
arch=('any')
url="https://pypi.python.org/pypi/lzstring"
license=('MIT')
makedepends=('python' 'python-setuptools' 'git'
	     'python2' 'python2-setuptools')
options=(!emptydirs)
_commit=0b2773ede157fb69f0c837b853ccc5ab9c236c58
source=("git+https://github.com/gkovacs/lz-string-python#commit=${_commit}")
sha256sums=('SKIP')

prepare() {
  cp -a "lz-string-python"{,-py2}
}

build(){
  cd "${srcdir}/lz-string-python"
  python setup.py build

  cd "${srcdir}/lz-string-python-py2"
  python2 setup.py build
}

package_python2-lzstring() {
  depends=('python2' 'python2-future')

  cd "${srcdir}/lz-string-python"
  python2 setup.py install --root="${pkgdir}"/ --optimize=1 --skip-build
  
  install -Dm644 LICENSE.md "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
}

package_python-lzstring() {
  depends=('python' 'python-future')

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