summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1ccad52d01ee9ada69e55324d34a5d1c95e353f1 (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
56
57
58
# Maintainer: Clint Valentine <valentine.clint@gmail.com>

_name=nimfa
pkgbase='python-nimfa'
pkgname=('python-nimfa' 'python2-nimfa')
pkgver=1.3.2
pkgrel=1
pkgdesc="Nonnegative matrix factorization in Python"
arch=('any')
url=https://github.com/meowklaski/"${_name}"
license=('BSD')
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=('87171493f5af8201297ea67938342e98277e7726ae8ff010b4c7738948ce0c47')

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

package() {
  cd "${srcdir}"/nimfa-"${pkgver}"
  python setup.py install --root="${pkgdir}/" --optimize=1
}

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

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

package_python2-nimfa() {
  depends=(
    'python2'
    'python2-numpy'
    'python2-scipy'
  )

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

package_python-nimfa() {
  depends=(
    'python'
    'python-numpy'
    'python-scipy'
  )

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