diff options
author | Steven Voges | 2022-10-01 02:21:39 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo | 2022-10-01 04:01:17 +0200 |
commit | 5b6917d5a458b02c8f0b6df121a734646bc81a9b (patch) | |
tree | bd2d7406e78cbf458bf5ad8d293d08653c6f99db /libraries/flatbuffers/flatbuffers.SlackBuild | |
parent | 92c5d90d28f57287ae90b98bc510b1b589f09dd9 (diff) | |
download | slackbuilds-5b6917d5a458b02c8f0b6df121a734646bc81a9b.tar.gz |
libraries/flatbuffers: Updated for version 22.9.24.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/flatbuffers/flatbuffers.SlackBuild')
-rw-r--r-- | libraries/flatbuffers/flatbuffers.SlackBuild | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/libraries/flatbuffers/flatbuffers.SlackBuild b/libraries/flatbuffers/flatbuffers.SlackBuild index ce9fa731ec..671d380b12 100644 --- a/libraries/flatbuffers/flatbuffers.SlackBuild +++ b/libraries/flatbuffers/flatbuffers.SlackBuild @@ -1,7 +1,8 @@ #!/bin/bash -# Slackware build script for Google Flatbuffers +# Slackware build script for flatbuffers +# Copyright 2022 Steven Voges <Oregon, USA> # Copyright 2016 Andre Barboza, Belo Horizonte - Brazil # All rights reserved. # @@ -25,7 +26,9 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=flatbuffers -VERSION=${VERSION:-1.12.0} +VERSION=${VERSION:-22.9.24} +DOCS=${DOCS:-no} +SAMPLES=${SAMPLES:-no} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -38,9 +41,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -82,11 +82,8 @@ find -L . \ mkdir -p build cd build cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \ -DFLATBUFFERS_BUILD_FLATC=ON \ -DFLATBUFFERS_BUILD_FLATHASH=ON \ -DFLATBUFFERS_BUILD_FLATLIB=ON \ @@ -95,27 +92,31 @@ cd build -DFLATBUFFERS_BUILD_TESTS=OFF \ -DFLATBUFFERS_CODE_COVERAGE=OFF \ -DFLATBUFFERS_INSTALL=ON \ - .. + -DCMAKE_BUILD_TYPE=Release .. make - make install DESTDIR=$PKG + make install/strip DESTDIR=$PKG 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 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -find docs/ -type f -exec chmod 644 {} \; -find samples/ -type f -exec chmod 644 {} \; -( cd docs/source - doxygen -) -rm docs/source/CONTRIBUTING.md -cp -rav docs/html docs/source/*.{md,txt} samples/ \ - CONTRIBUTING.md LICENSE.txt \ - $PKG/usr/doc/$PRGNAM-$VERSION -install -m644 readme.md $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + *.md LICENSE.txt \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +if [ "$DOCS" = "yes" ]; then + cd docs/source + doxygen + cd ../.. + cp -rav docs/html $PKG/usr/doc/$PRGNAM-$VERSION +fi + +if [ "$SAMPLES" = "yes" ]; then + cp -a samples $PKG/usr/doc/$PRGNAM-$VERSION +fi + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |