summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorphyskets2019-03-18 12:45:18 +0530
committerphyskets2019-03-18 12:45:18 +0530
commit525368d9280d05c786febc4abaf3303d7649c763 (patch)
tree666218dd8f154cf90f428420ead633c03502f8fb /PKGBUILD
parenteb94ed7f1073cc5d896f46fcd63847f054770ead (diff)
downloadaur-525368d9280d05c786febc4abaf3303d7649c763.tar.gz
not building doc by default
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD65
1 files changed, 36 insertions, 29 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0f9769b2bfb7..5fd1901119a0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}