diff options
Diffstat (limited to 'libraries/libctl/libctl.SlackBuild')
-rw-r--r-- | libraries/libctl/libctl.SlackBuild | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/libraries/libctl/libctl.SlackBuild b/libraries/libctl/libctl.SlackBuild index 9169f4aca1..6043ec01b7 100644 --- a/libraries/libctl/libctl.SlackBuild +++ b/libraries/libctl/libctl.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for libctl @@ -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=libctl -VERSION=${VERSION:-4.4.0} +VERSION=${VERSION:-4.5.1} 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} @@ -54,13 +64,13 @@ else LIBDIRSUFFIX="" fi +set -e + # change annoying underscores into hyphens SVERSION=$(echo $VERSION | tr '_' '-') # make a custom list of doc files in advance DOCFILES="AUTHORS COPYING COPYRIGHT NEWS.md README.md doc/docs/*.md " -set -e - rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -74,7 +84,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 {} \; + LOCALCONFIGS="--enable-shared" +XDBFILE=/etc/sbo_pkg_options.conf +if [ -f ${XDBFILE} ] ; then + LOCALCONFIGS=${LOCALCONFIGS}" "$(grep "^${PRGNAM}:" ${XDBFILE} | grep -v '^#' | awk -F: '{print$2}') + echo Build options selected by file: LOCALCONFIGS=${LOCALCONFIGS} +fi +if [ -n "${SBOPTIONS_LIBCTL}" ] ; then + LOCALCONFIGS=${LOCALCONFIGS}" "${SBOPTIONS_LIBCTL} + echo Build options selected by environment: LOCALCONFIGS=${LOCALCONFIGS} +fi CFLAGS="$SLKCFLAGS" \ CPPFLAGS="$SLKCFLAGS" \ @@ -100,8 +120,11 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr 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 +rm -f $PKG/usr/lib*/*.la + 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 |