aboutsummaryrefslogtreecommitdiff
path: root/libraries/serd
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/serd')
-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 c04d76c99425..bf73b46bc833 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 cb906c29cd61..5a8066f13b08 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* \