diff options
Diffstat (limited to 'office/kbibtex/kbibtex.SlackBuild')
-rw-r--r-- | office/kbibtex/kbibtex.SlackBuild | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/office/kbibtex/kbibtex.SlackBuild b/office/kbibtex/kbibtex.SlackBuild index 712fd85897..5f3ea62116 100644 --- a/office/kbibtex/kbibtex.SlackBuild +++ b/office/kbibtex/kbibtex.SlackBuild @@ -1,9 +1,8 @@ -#!/bin/sh -# vim: et ts=2 sw=2 +#!/bin/bash # Slackware build script for kbibtex -# Copyright (c) 2011 Gregory J.L. Tourte (artourter@gmail.com) +# Copyright (c) 2011-2023 Gregory J. L. Tourte (artourter@gmail.com) # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,10 +22,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=kbibtex -VERSION=${VERSION:-0.7} +VERSION=${VERSION:-0.10.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +SRCVER=v$VERSION if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,7 +40,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -60,9 +71,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$SRCVER +tar xvf $CWD/$PRGNAM-$SRCVER.tar.bz2 +cd $PRGNAM-$SRCVER chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -70,15 +81,17 @@ 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 {} \; +patch -p1 < $CWD/desktop_perms.patch + mkdir -p build cd build cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_SUFFIX=${LIBDIRSUFFIX} \ - -DMANDIR=/usr/man \ + -DCMAKE_INSTALL_MANDIR=/usr/man \ + -DKDE_INSTALL_DOCBUNDLEDIR=/usr/doc/HTML \ -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=OFF \ -Wno-dev \ .. @@ -92,7 +105,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README LICENSE TODO $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.md LICENSE TODO.md ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -100,4 +113,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |