aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2023-07-06 15:11:02 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-07-08 16:42:13 +0700
commitd9c6c1ccd95064088195fcd20f3c24c6350f96c8 (patch)
tree8354b0ba1b5c251abfdee6062d42dc4f71012fc9 /libraries
parentfcdedd4cecaf685e44ac1d20e207b9be1289021c (diff)
libraries/serd: Make docs building optional.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/serd/README4
-rw-r--r--libraries/serd/serd.SlackBuild7
2 files changed, 10 insertions, 1 deletions
diff --git a/libraries/serd/README b/libraries/serd/README
index c04d76c994259..bf73b46bc8330 100644
--- a/libraries/serd/README
+++ b/libraries/serd/README
@@ -1,2 +1,6 @@
Serd is a lightweight C library for RDF syntax which supports reading
and writing Turtle and NTriples.
+
+By default docs aren't built: if you like to include them be sure
+to have the optional dependency Sphinx installed and pass the script
+the parameter DOCS=yes
diff --git a/libraries/serd/serd.SlackBuild b/libraries/serd/serd.SlackBuild
index cb906c29cd611..5a8066f13b080 100644
--- a/libraries/serd/serd.SlackBuild
+++ b/libraries/serd/serd.SlackBuild
@@ -65,6 +65,8 @@ else
LIBDIRSUFFIX=""
fi
+doc="-Ddocs=disabled" ; [ "${DOCS:-no}" != "no" ] && doc="-Ddocs=enabled"
+
set -e
rm -rf $PKG
@@ -80,6 +82,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+sed -i doc/meson.build -e "s|^docdir.*|docdir = '/usr/doc/$PRGNAM-$VERSION'|"
+
mkdir build
cd build
CFLAGS="$SLKCFLAGS" \
@@ -92,6 +96,7 @@ cd build
--mandir=/usr/man \
--prefix=/usr \
--sysconfdir=/etc \
+ $doc \
-Dstrip=true
"${NINJA:=ninja}"
DESTDIR=$PKG $NINJA install
@@ -100,7 +105,7 @@ cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-find $PKG/usr/man -type f -exec gzip -9 {} \;
+[ "${DOCS:-no}" != "no" ] && find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING NEWS README* \