summaryrefslogtreecommitdiffstats
path: root/office/gnucash/gnucash.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/gnucash/gnucash.SlackBuild')
-rw-r--r--office/gnucash/gnucash.SlackBuild31
1 files changed, 22 insertions, 9 deletions
diff --git a/office/gnucash/gnucash.SlackBuild b/office/gnucash/gnucash.SlackBuild
index 05e1dd5e52..1257563bab 100644
--- a/office/gnucash/gnucash.SlackBuild
+++ b/office/gnucash/gnucash.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for gnucash
# Copyright 2015 Trayan Denev, tdenev@gmail.com
-# This version Copyright 2018 Lenard Spencer <lspencer31@cfl.rr.com>
+# This version Copyright 2018 Lenard Spencer <lenardrspencer@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,12 +24,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=gnucash
-VERSION=${VERSION:-3.8}
+VERSION=${VERSION:-3.11}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-SRCVERSION="${VERSION}b"
-
+PACKAGER=${PACKAGER:-"Just Another Slacker"}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -71,7 +70,7 @@ if [ -e /usr/bin/gnucash ]; then
fi
if [ "$DBI" = "yes" ]; then
- DBIARGS="-DWITH_SQL=ON -DGNC_DBD_DIR=/usr/lib${LIBDIRSUFFIX}/dbd/ "
+ DBIARGS="-DWITH_SQL=ON -DGNC_DBD_DIR=/usr/lib${LIBDIRSUFFIX}/dbd/"
echo " building with SQL integration enabled"
sleep 1
else
@@ -79,7 +78,7 @@ else
fi
if [ "$OFX" = "yes" ]; then
- OFXBANKING="DWITH_OFX=ON"
+ OFXBANKING="-DWITH_OFX=ON"
echo " building with OFX enabled"
sleep 1
else
@@ -108,7 +107,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-${VERSION}.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -117,6 +116,14 @@ 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 {} \;
+# New option to build with ninja:
+if [ "${NINJA:-no}" = "yes" ]; then
+ echo "building using Ninja:"
+ NINJABUILD="-GNinja"
+else
+ NINJABUILD=""
+fi
+
mkdir -p build
cd build
cmake \
@@ -130,10 +137,16 @@ cd build
$W_PYTHON \
$OFXBANKING \
$AQBANKING \
+ $NINJABUILD \
+ -DGNUCASH_BUILD_ID="$VERSION-`date -I` by $PACKAGER" \
-DCMAKE_BUILD_TYPE=release ..
-make
-make -j1 install DESTDIR=$PKG docdir=/usr/doc/$PRGNAM-$VERSION
+if [ $NINJA = "yes" ]; then
+ DESTDIR="$PKG" ninja install
+else
+ make
+ make -j1 install DESTDIR=$PKG docdir=/usr/doc/$PRGNAM-$VERSION
+fi
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