diff options
author | physkets | 2019-03-18 12:45:18 +0530 |
---|---|---|
committer | physkets | 2019-03-18 12:45:18 +0530 |
commit | 525368d9280d05c786febc4abaf3303d7649c763 (patch) | |
tree | 666218dd8f154cf90f428420ead633c03502f8fb | |
parent | eb94ed7f1073cc5d896f46fcd63847f054770ead (diff) | |
download | aur-525368d9280d05c786febc4abaf3303d7649c763.tar.gz |
not building doc by default
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 65 |
2 files changed, 39 insertions, 32 deletions
@@ -1,16 +1,16 @@ pkgbase = lammps-beta - pkgdesc = Large-scale Atomic/Molecular Massively Parallel Simulator + pkgdesc = Large-scale Atomic/Molecular Massively Parallel Simulator. pkgver = 20190228 pkgrel = 3 url = http://lammps.sandia.gov/ arch = x86_64 license = GPL makedepends = cmake - makedepends = python-sphinx - makedepends = lammpsdoc depends = fftw depends = openmpi optdepends = kim-api: support for OpenKIM potentials + optdepends = python-sphinx: install to build documentation + optdepends = lammpsdoc: install to build documentation provides = lammps conflicts = lammps source = lammps-28Feb2019.tar.gz::https://github.com/lammps/lammps/archive/patch_28Feb2019.tar.gz @@ -5,18 +5,26 @@ pkgname=${_pkgname}-beta pkgver=20190228 _pkgver=$(date -d ${pkgver} +%-d%b%Y) pkgrel=3 -pkgdesc="Large-scale Atomic/Molecular Massively Parallel Simulator" +pkgdesc="Large-scale Atomic/Molecular Massively Parallel Simulator." url="http://lammps.sandia.gov/" arch=('x86_64') license=('GPL') depends=('fftw' 'openmpi') -makedepends=('cmake' 'python-sphinx' 'lammpsdoc') -optdepends=('kim-api: support for OpenKIM potentials') +makedepends=('cmake') +optdepends=('kim-api: support for OpenKIM potentials' + 'python-sphinx: install to build documentation' + 'lammpsdoc: install to build documentation') conflicts=('lammps') 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 local documentation +# You will also have to install the relevant optional dependencies +# 'python-sphinx' is in the repos, +# while lammpsdoc is available via the AUR package 'lammpsdoc-git' + prepare(){ cd "${_pkgname}-patch_${_pkgver}" mkdir -p build @@ -34,38 +42,37 @@ build() { make - # The rest of this script generates the documentation - # If you don't want that, comment out the rest of this build() section - # as well as the 'install' line in package() - # Also remove 'python-sphinx' & 'lammpsdoc' from makedepends() - - # Generate ReStructuredText from Text files - mkdir -p rst + if _BUILD_DOC ; then + # Generate ReStructuredText from Text files + mkdir -p rst - for file in ../doc/src/*.txt - do - tmp=${file%.*} # Strips the '.txt' extension - fname=${tmp##*/} # Strips the path prefixing the file-name - txt2rst ${file} > "rst/${fname}.rst" - done + for file in ../doc/src/*.txt + do + tmp=${file%.*} # Strips the '.txt' extension + fname=${tmp##*/} # Strips the path prefixing the file-name + txt2rst ${file} > "rst/${fname}.rst" + done - # Generate HTML from ReStructuredText files - mkdir -p html - cp -r ../doc/src/* rst/ + # Generate HTML from ReStructuredText files + mkdir -p html + cp -r ../doc/src/* rst/ - sphinx-build -b html -c "../doc/utils/sphinx-config" -d "doctrees" "rst" html + sphinx-build -b html -c "../doc/utils/sphinx-config" -d "doctrees" "rst" html + fi } package() { cd "${_pkgname}-patch_${_pkgver}/build" make DESTDIR="${pkgdir}" install - 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/"* - install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static" "html/_static/"*.png - install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static" "html/_static/"*.gif - install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static" "html/_static/"*.js - install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static/css" "html/_static/css/"*.css - install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static/fonts" "html/_static/fonts/"* - install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static/js" "html/_static/js/"*.js + 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/"* + install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static" "html/_static/"*.png + install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static" "html/_static/"*.gif + install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static" "html/_static/"*.js + install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static/css" "html/_static/css/"*.css + install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static/fonts" "html/_static/fonts/"* + install -Dm644 -t "${pkgdir}/usr/share/doc/${_pkgname}/html/_static/js" "html/_static/js/"*.js + fi } |