summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 58571782e3376aae25aeb7dc42501d9f507629b1 (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
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgbase=python-peachpy-git
pkgname=('python-peachpy-git' 'python-peachpy-doc-git')
pkgver=r371.84e60a5
pkgrel=1
pkgdesc='Python framework for writing high-performance assembly kernels (git version)'
arch=('any')
url='https://github.com/Maratyszcza/PeachPy/'
license=('BSD')
makedepends=('git' 'python-setuptools' 'python-wheel' 'python-pip' 'python-sphinx'
             'python-sphinx-bootstrap-theme')
source=('git+https://github.com/Maratyszcza/PeachPy.git')
sha256sums=('SKIP')

pkgver() {
    printf 'r%s.%s' "$(git -C PeachPy rev-list --count HEAD)" "$(git -C PeachPy rev-parse --short HEAD)"
}

build() {
    cd PeachPy
    python setup.py build
    python setup.py build_sphinx --all-files --source-dir="${srcdir}/PeachPy/sphinx"
}

package_python-peachpy-git() {
    depends=('python' 'python-six')
    provides=('python-peachpy')
    conflicts=('python-peachpy')
    
    cd PeachPy
    python setup.py install --root="$pkgdir" --skip-build --optimize='1'
    install -D -m644 LICENSE.rst "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_python-peachpy-doc-git() {
    pkgdesc="$(sed 's/\((git version)\)/(documentation) \1/' <<< "$pkgdesc")"
    provides=('python-peachpy-doc')
    conflicts=('python-peachpy-doc')
    
    mkdir -p "${pkgdir}/usr/share/doc/python-peachpy"
    cp -dr --no-preserve='ownership' PeachPy/build/sphinx/html/* "${pkgdir}/usr/share/doc/python-peachpy"
    install -D -m644 PeachPy/LICENSE.rst "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}