[arch-commits] Commit in hepmc/trunk (PKGBUILD)

Konstantin Gizdov kgizdov at archlinux.org
Mon May 25 16:29:07 UTC 2020


    Date: Monday, May 25, 2020 @ 16:29:06
  Author: kgizdov
Revision: 634676

upgpkg: hepmc 3.2.1-1

Modified:
  hepmc/trunk/PKGBUILD

----------+
 PKGBUILD |   28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-25 16:28:35 UTC (rev 634675)
+++ PKGBUILD	2020-05-25 16:29:06 UTC (rev 634676)
@@ -1,21 +1,32 @@
 # Maintainer: Konstantin Gizdov <arch at kge dot pw>
 # Contributor: Frank Siegert <frank dot siegert at googlemail dot com>
 pkgname=hepmc
-pkgver=2.06.10
-pkgrel=7
+_pkgname=HepMC3
+pkgver=3.2.1
+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')
 depends=('bash')
-makedepends=('cmake')
-source=("${pkgname}-${pkgver}.tar.gz::http://hepmc.web.cern.ch/${pkgname}/releases/${pkgname}${pkgver}.tgz")
-sha256sums=('5adedd9e3f7447e1e5fc01b72f745ab87da2c1611df89208bb3d7c6ea94c11a4')
+makedepends=('cmake' '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=('6e4e4bb5708af105d4bf74efc2745e6efe704e942d46a8042f7dcae37a4739fe')
 
 build() {
     mkdir build
     cd build
-    cmake "${srcdir}/HepMC-${pkgver}" -DCMAKE_INSTALL_PREFIX:PATH=/usr -Dmomentum=GEV -Dlength=MM
+    cmake "${srcdir}/${_pkgname}-${pkgver}" \
+      -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+      -DHEPMC3_PYTHON_VERSIONS='3.X' \
+      -DHEPMC3_ENABLE_TEST=ON \
+      -DHEPMC3_BUILD_DOCS=ON \
+      -DHEPMC3_BUILD_EXAMPLES=ON \
+      -DHEPMC3_INSTALL_INTERFACES=ON \
+      -Dmomentum=GEV -Dlength=MM
     make
 }
 
@@ -22,4 +33,9 @@
 package() {
     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"
 }


More information about the arch-commits mailing list