1 # Maintainer: Konstantin Gizdov <arch at kge dot pw>
2 # Contributor: Frank Siegert <frank dot siegert at googlemail dot com>
5 pkgname=("${pkgbase}" "${pkgbase}-docs")
9 pkgdesc="A particle physics package for storing collision events from Monte Carlo generators"
11 url="http://hepmc.web.cern.ch/"
13 makedepends=('cmake' 'doxygen' 'gcc-fortran' 'graphviz' 'hepmc2' 'pythia8' 'python' 'root')
14 source=("${pkgbase}-${pkgver}.tar.gz::http://hepmc.web.cern.ch/${pkgbase}/releases/${_pkgname}-${pkgver}.tar.gz")
15 sha256sums=('248f3b5b36dd773844cbe73d51f60891458334b986b259754c59dbf4bbf1d525')
18 local p="$1" f d; shift
20 d="$srcdir/$p/${f#$pkgdir/}"
21 mkdir -p "$(dirname "$d")"
23 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
30 -D CMAKE_BUILD_TYPE=None
31 -D CMAKE_INSTALL_PREFIX=/usr
32 -D HEPMC3_BUILD_DOCS=ON
33 -D HEPMC3_BUILD_EXAMPLES=ON
34 -D HEPMC3_ENABLE_TEST=ON
35 -D HEPMC3_INSTALL_INTERFACES=ON
36 -D HEPMC3_PYTHON_VERSIONS='3.X'
37 -D USE_INTERFACE_FROM_PYTHIA8=ON
38 -D PYTHIA8_XMLDOC_DIR=/usr/share/pythia8/xmldoc
43 cmake "${cmake_options[@]}"
44 cmake --build build --verbose
48 ctest --test-dir build --output-on-failure
58 'hpmc-docs: for documentation'
59 'pythia8: Pythia support'
60 'python: Python interface'
64 DESTDIR="$pkgdir" cmake --install build
67 # TODO: report upstream and have them fix this!
68 install -vd "${pkgdir}/usr/lib/cmake"
69 mv -v "${pkgdir}/usr/share/HepMC3/cmake" "${pkgdir}/usr/lib/cmake/${_pkgname}"
70 sed -i 's@${CMAKE_CURRENT_LIST_DIR}/../../../@/usr@' \
71 "${pkgdir}/usr/lib/cmake/${_pkgname}/${_pkgname}Config.cmake"
75 _pick $pkgbase-docs usr/share/doc
79 package_hepmc-docs() {
80 pkgdesc+=" - documentation"
82 mv -v $pkgname/* "$pkgdir"