[arch-commits] Commit in hepmc/trunk (PKGBUILD)
Konstantin Gizdov
kgizdov at archlinux.org
Sun Jan 31 18:43:38 UTC 2021
Date: Sunday, January 31, 2021 @ 18:43:38
Author: kgizdov
Revision: 838466
upgpkg: hepmc 3.2.3-1
Modified:
hepmc/trunk/PKGBUILD
----------+
PKGBUILD | 41 +++++++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 8 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-01-31 18:43:36 UTC (rev 838465)
+++ PKGBUILD 2021-01-31 18:43:38 UTC (rev 838466)
@@ -1,24 +1,27 @@
# Maintainer: Konstantin Gizdov <arch at kge dot pw>
# Contributor: Frank Siegert <frank dot siegert at googlemail dot com>
-pkgname=hepmc
+
+pkgbase=hepmc
+pkgname=("${pkgbase}" "${pkgbase}-docs")
_pkgname=HepMC3
-pkgver=3.2.2
-pkgrel=3
+pkgver=3.2.3
+pkgrel=1
pkgdesc="A particle physics package for storing collision events from Monte Carlo generators"
arch=('x86_64')
url="http://hepmc.web.cern.ch/"
-license=('GPL2')
+license=('GPL3')
depends=('bash')
-makedepends=('cmake' 'root' 'pythia8' 'python')
+makedepends=('cmake' 'doxygen' 'hepmc2' 'gcc-fortran' 'graphviz' 'root' 'pythia8' 'python')
optdepends=('root: ROOT I/O'
'pythia8: Pythia support'
'python: Python interface')
-source=("${pkgname}-${pkgver}.tar.gz::http://hepmc.web.cern.ch/${pkgname}/releases/${_pkgname}-${pkgver}.tar.gz")
-sha256sums=('0e8cb4f78f804e38f7d29875db66f65e4c77896749d723548cc70fb7965e2d41')
+source=("${pkgbase}-${pkgver}.tar.gz::http://hepmc.web.cern.ch/${pkgbase}/releases/${_pkgname}-${pkgver}.tar.gz")
+sha256sums=('8caadacc2c969883cd1f994b622795fc885fb4b15dad8c8ae64bcbdbf0cbd47d')
build() {
mkdir build
cd build
+ PYTHIA8_ROOT_DIR=/usr \
cmake "${srcdir}/${_pkgname}-${pkgver}" \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DHEPMC3_PYTHON_VERSIONS='3.X' \
@@ -26,11 +29,13 @@
-DHEPMC3_BUILD_DOCS=ON \
-DHEPMC3_BUILD_EXAMPLES=ON \
-DHEPMC3_INSTALL_INTERFACES=ON \
+ -DUSE_INTERFACE_FROM_PYTHIA8=ON \
+ -DPYTHIA8_XMLDOC_DIR=/usr/share/pythia8/xmldoc \
-Dmomentum=GEV -Dlength=MM
make
}
-package() {
+package_hepmc() {
cd "${srcdir}/build"
make DESTDIR="${pkgdir}/" install
# fix CMake
@@ -38,4 +43,24 @@
mv "${pkgdir}/usr/share/HepMC3/cmake" "${pkgdir}/usr/lib/cmake/${_pkgname}"
sed -i 's@${CMAKE_CURRENT_LIST_DIR}/../../../@/usr@' \
"${pkgdir}/usr/lib/cmake/${_pkgname}/${_pkgname}Config.cmake"
+ # drop docs
+ rm -rf "${pkgdir}"/usr/share/doc
}
+
+package_hepmc-docs() {
+ depends=()
+ pkgdesc="A particle physics package for storing collision events from Monte Carlo generators (Documentation)"
+ arch=('any')
+ cd "${srcdir}/build"
+ make DESTDIR="${pkgdir}/" install
+ # fix CMake
+ install -d "${pkgdir}/usr/lib/cmake"
+ mv "${pkgdir}/usr/share/HepMC3/cmake" "${pkgdir}/usr/lib/cmake/${_pkgname}"
+ sed -i 's@${CMAKE_CURRENT_LIST_DIR}/../../../@/usr@' \
+ "${pkgdir}/usr/lib/cmake/${_pkgname}/${_pkgname}Config.cmake"
+ # drop everything, but docs
+ rm -rf "${pkgdir}"/usr/bin
+ rm -rf "${pkgdir}"/usr/include
+ rm -rf "${pkgdir}"/usr/lib
+ rm -rf "${pkgdir}"/usr/share/HepMC3
+}
More information about the arch-commits
mailing list