diff options
Diffstat (limited to 'libraries/libconfig/libconfig.SlackBuild')
-rw-r--r-- | libraries/libconfig/libconfig.SlackBuild | 63 |
1 files changed, 29 insertions, 34 deletions
diff --git a/libraries/libconfig/libconfig.SlackBuild b/libraries/libconfig/libconfig.SlackBuild index b0d52872d8..4cb4e94962 100644 --- a/libraries/libconfig/libconfig.SlackBuild +++ b/libraries/libconfig/libconfig.SlackBuild @@ -2,8 +2,9 @@ # Slackware build script for libconfig -# Copyright 2017 Manuel Argüelles <manuel.arguelles@gmail.com> -# Copyright 2017-2018 Jason Graham <jgraha8@gmail.com> +# Copyright 2017 Manuel Argüelles <email removed> +# Copyright 2017-2018 Jason Graham <email removed> +# Copyright 2023 B. Watson # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,11 +24,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20231127 bkw: +# - update for v1.7.3. +# - take over maintenance. +# - add doinst.sh and douninst.sh for GNU info file. +# - remove the EXAMPLE option; the examples are tiny, always include them. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=libconfig -VERSION=${VERSION:-1.7.2} -BUILD=${BUILD:-2} +VERSION=${VERSION:-1.7.3} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -39,9 +46,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 @@ -65,9 +69,6 @@ else LIBDIRSUFFIX="" fi -DOC=${DOC:-no} -EXAMPLES=${EXAMPLES:-no} - set -e rm -rf $PKG @@ -77,11 +78,8 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + autoreconf -if @@ -100,34 +98,31 @@ CXXFLAGS="$SLKCFLAGS" \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG - -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 +make install-strip DESTDIR=$PKG rm -f $PKG/usr/info/dir gzip -9 $PKG/usr/info/*.info* -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING.LIB INSTALL ChangeLog LICENSE README TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -if [ "${DOC}" = "yes" ]; then - make html pdf - cp -a doc/libconfig.{html,pdf} $PKG/usr/doc/$PRGNAM-$VERSION/ -fi - -if [ "${EXAMPLES}" = "yes" ]; then - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples/{c,c++} - cp -a examples/c/*.{cfg,c} $PKG/usr/doc/$PRGNAM-$VERSION/examples/c/ - cp -a examples/c++/*.{cfg,cpp} $PKG/usr/doc/$PRGNAM-$VERSION/examples/c++/ +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC/examples/{c,c++} +cp -a AUTHORS COPYING.LIB ChangeLog LICENSE README TODO $PKGDOC +cp -a examples/c/*.{cfg,c} $PKG/usr/doc/$PRGNAM-$VERSION/examples/c/ +cp -a examples/c++/*.{cfg,cpp} $PKG/usr/doc/$PRGNAM-$VERSION/examples/c++/ +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +INCLUDES="does NOT include" +if [ "${DOC:-no}" = "yes" ]; then + make html pdf + cp -a doc/libconfig.{html,pdf} $PKGDOC + INCLUDES="includes" fi rm -f $PKG/usr/lib*/*.la mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +sed "s,@INCLUDES@,$INCLUDES," < $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/doinst.sh > $PKG/install/douninst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |