summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 67b29b13419172d463b3b4783297e73d6dd5acaf (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
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgname=python2-sherpa
pkgver=4.9.1
pkgrel=1
pkgdesc="Modeling and fitting package for scientific data analysis"
arch=('i686' 'x86_64')
url="http://cxc.cfa.harvard.edu/contrib/sherpa/"
license=('GPL')
depends=('python2>=2.7' 'python2-numpy' 'fftw')
makedepends=('python2-setuptools' 'gcc-fortran')
optdepends=('python2-matplotlib: Graphical output'
            'python2-astropy: Data I/O support'
            'ds9-bin: Imaging requires'
            'xpa: Imaging requires'
            'python2-pytest>=3.3: For testing suite'
            'python2-mock: For testing suite'
            'python2-pytest-xvfb: For testing suite')
install=python2-sherpa.install
source=("https://files.pythonhosted.org/packages/source/s/sherpa/sherpa-${pkgver}.tar.gz"
        'sherpa_local_fftw.patch')
md5sums=('bc86d545e5d7764b1601e7fe0d8e76a6'
         'd1823cc7683442d92450fadff7aed362')

prepare() {
    cd "${srcdir}/sherpa-${pkgver}"
    patch -Np1 -i "${srcdir}/sherpa_local_fftw.patch"
}

package() {
    unset LDFLAGS
    cd ${srcdir}/sherpa-${pkgver}

    install -D -m644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
    python2 setup.py install --root=${pkgdir} --prefix=/usr --optimize=1

    mv ${pkgdir}/usr/bin/sherpa_smoke ${pkgdir}/usr/bin/sherpa_smoke2
    mv ${pkgdir}/usr/bin/sherpa_test ${pkgdir}/usr/bin/sherpa_test2
}