diff options
author | physkets | 2019-03-18 22:38:38 +0530 |
---|---|---|
committer | physkets | 2019-03-18 22:38:38 +0530 |
commit | e0498b08487a58bfb696878569ed2e4f95bf4189 (patch) | |
tree | 7063444b503881f2ee1005ff053cf13f374da1d4 /PKGBUILD | |
parent | 5edd31bfab85c12d9adc692eed22ea8a320974ce (diff) | |
download | aur-e0498b08487a58bfb696878569ed2e4f95bf4189.tar.gz |
change optional build procedure
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 32 |
1 files changed, 24 insertions, 8 deletions
@@ -1,11 +1,22 @@ # Maintainer: physkets <physkets // at // tutanota dot com> # Contributor: xpt <user.xpt@gmail.com> + +### BUILD OPTIONS +# Set these variables to '1' to enable them +# Doing so will add the requisite build commands, +# as well as add the needed dependencies + +# HTML documentation +_BUILD_DOC=0 +# KIM package +_ENABLE_KIM=0 + _pkgname=lammps pkgname=${_pkgname}-beta pkgver=20190228 _pkgver="28Feb2019" #_pkgver=$(date -d ${pkgver} +%-d%b%Y) -pkgrel=3 +pkgrel=4 pkgdesc="Large-scale Atomic/Molecular Massively Parallel Simulator" url="https://lammps.sandia.gov/" arch=('x86_64') @@ -17,9 +28,14 @@ provides=('lammps') source=("${_pkgname}-${_pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/patch_${_pkgver}.tar.gz") sha512sums=('dc264ec43a5a917a0a7905f89076c2e10e8d5613bb710fb970eb388721860d7d409db7d988803bde823ddd74691c4b3bdf5bf4a72713476dad5a4b0833a4dbd0') -_BUILD_DOC=false -# Set the above to 'true' if you want to build documentation -if $_BUILD_DOC ; then makedepends+=( 'python-sphinx' 'lammpsdoc') ; fi +# process the build settings from above +if (( $_BUILD_DOC )); then + makedepends+=('python-sphinx' 'lammpsdoc') +fi +if (( $_ENABLE_KIM )); then + depends+=('kim-api') + _feature_args+=('-DPKG_KIM=yes') +fi prepare(){ cd "${_pkgname}-patch_${_pkgver}" @@ -31,14 +47,14 @@ build() { cmake ../cmake \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_INSTALL_LIBDIR="lib" \ - -DCMAKE_INSTALL_LIBEXECDIR="/usr/lib" #\ - #-DPKG_KIM=yes # KIM package. Also install 'kim-api' from the AUR + -DCMAKE_INSTALL_LIBEXECDIR="/usr/lib" \ + "${_feature_args[@]}" #\ # Add options for additional packages #-DPKG_<NAME>=yes make - if $_BUILD_DOC ; then + if (( $_BUILD_DOC )) ; then # Generate ReStructuredText from Text files mkdir -p rst @@ -60,7 +76,7 @@ build() { package() { cd "${_pkgname}-patch_${_pkgver}/build" make DESTDIR="${pkgdir}" install - if $_BUILD_DOC ; then + if (( $_BUILD_DOC )) ; then install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html" "html/"*.html install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html" "html/"*.js install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_images" "html/_images/"* |