summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bbf79bbba31cbe226fdbf7dd7e456949e184d741 (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
# Maintainer: Juacrumar <juacrumar at lairen dot eu>

pkgname=pineappl
pkgver=0.6.2
pkgrel=1
pkgdesc='PineAPPL is not an extension of APPLgrid. Installs pineappl_cli, pineappl library and python package'
arch=('any')
url="https://n3pdf.github.io/pineappl/"
license=('GPL3')
makedepends=("python-setuptools" "maturin" "python-pip" "sccache")
depends=("cargo-c"
         "rust"
         "lhapdf"
         "python-pkgconfig"
         "python-numpy"
         )
optdepends=()
provides=("pineappl")
changelog=
source=("https://github.com/N3PDF/pineappl/archive/v${pkgver}.tar.gz")
md5sums=("d29f47c3a61a0432872977e86caecb95")

build() {
    # Build the python interface
	cd "$pkgname-$pkgver"/pineappl_py
    maturin build --release
}

package() {
    # Install the command-line program
	cd "$pkgname-$pkgver"
    cargo install --path pineappl_cli --root=${pkgdir}/usr --no-track --features=fktable,evolve
    # Install pineappl_capi
	cd pineappl_capi
    cargo cinstall --release --destdir=${pkgdir} --prefix=/usr
    cd ..
    # And the python wrapper
    cd target/wheels/
    PYTHONDONTWRITEBYTECODE=1 PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps *.whl
    # manually remove __pycache__ from pkgdir (isn't there a better way?)
    rm -rf ${pkgdir}/usr/lib/python*/site-packages/pineappl/__pycache__
    # Note: some debug information, including the folder where the package was built, might stored
}