diff options
Diffstat (limited to 'libraries/skalibs/skalibs.SlackBuild')
-rw-r--r-- | libraries/skalibs/skalibs.SlackBuild | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/libraries/skalibs/skalibs.SlackBuild b/libraries/skalibs/skalibs.SlackBuild index 125d6212fc..e2078191dc 100644 --- a/libraries/skalibs/skalibs.SlackBuild +++ b/libraries/skalibs/skalibs.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for skalibs @@ -23,10 +23,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=skalibs -VERSION=${VERSION:-2.9.2.0} +VERSION=${VERSION:-2.14.1.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,7 +39,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} @@ -55,19 +65,20 @@ else LIBDIRSUFFIX="" fi -# Upstream recommends building skarnet.org softwares using the static -# version of skalibs so we are going to build just the static version of skalibs by default -# If you need to build the shared libraries, just pass BUILD_SHARED=yes to this script +# Upstream recommends building skarnet.org software with static libraries, as +# most of skarnet.org software are small enough that shared libraries are +# generally not worth using. Therefore, we will only build the static libraries +# by default. BUILD_STATIC=${BUILD_STATIC:-yes} BUILD_SHARED=${BUILD_SHARED:-no} +[ "$BUILD_STATIC" = "no" ] && LIBS_CONF="--disable-static" +[ "$BUILD_SHARED" = "no" ] && LIBS_CONF="--disable-shared $LIBS_CONF" -if [ "$BUILD_STATIC" = "no" ]; then - LIBS_CONF="--disable-static" -fi - -if [ "$BUILD_SHARED" = "no" ]; then - LIBS_CONF="--disable-shared $LIBS_CONF" -fi +# The execvep() function from skalibs (used by all skarnet.org software) has a +# default executable search path that will be used if the PATH environment +# variable is undefined. The default is /usr/bin:/bin. Pass +# DEF_PATH=some:path:list to this script if you want to change it. +DEF_PATH=${DEF_PATH:-/usr/bin:/bin} set -e @@ -92,6 +103,7 @@ CXXFLAGS="$SLKCFLAGS" \ --includedir=/usr/include \ --sysdepdir=/usr/lib${LIBDIRSUFFIX}/skalibs/sysdeps \ --datadir=/etc \ + --with-default-path=${DEF_PATH} \ $LIBS_CONF make @@ -99,11 +111,11 @@ make strip make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING INSTALL NEWS README doc $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING NEWS README doc $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc 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 |