diff options
Diffstat (limited to 'office/xournalpp/xournalpp.SlackBuild')
-rw-r--r-- | office/xournalpp/xournalpp.SlackBuild | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/office/xournalpp/xournalpp.SlackBuild b/office/xournalpp/xournalpp.SlackBuild index 2c8d00aa0d..90792edb9a 100644 --- a/office/xournalpp/xournalpp.SlackBuild +++ b/office/xournalpp/xournalpp.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for xournalpp @@ -22,10 +22,13 @@ # 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=xournalpp -VERSION=${VERSION:-1.0.16} +VERSION=${VERSION:-1.2.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,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} @@ -69,22 +79,31 @@ 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 {} \; +# Set the right Lua version to use, otherwise it will use an older +# version, if more than one installed. +# Thanks to fourtysixandtwo (fourtysixandtwo@sliderr.net) +sed -i 's/^find_package(Lua/find_package(Lua 5.3/' CMakeLists.txt + mkdir -p build cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_SUFFIX=${LIBDIRSUFFIX} \ -DCMAKE_BUILD_TYPE=Release .. - make + cmake --build . --target pot + cmake --build . --target translations + cmake --build . make install 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 -find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true +mv $PKG/usr/share/man $PKG/usr + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION @@ -95,4 +114,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 |