summaryrefslogtreecommitdiff
path: root/source/l/popt
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/popt')
-rwxr-xr-xsource/l/popt/popt.SlackBuild29
-rw-r--r--source/l/popt/slack-desc12
2 files changed, 26 insertions, 15 deletions
diff --git a/source/l/popt/popt.SlackBuild b/source/l/popt/popt.SlackBuild
index e9f74921..30cf3c76 100755
--- a/source/l/popt/popt.SlackBuild
+++ b/source/l/popt/popt.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2006, 2007, 2008, 2009, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2013, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,28 +20,36 @@
# 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)
PKGNAM=popt
VERSION=${VERSION:-1.16}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine architecture for build & packaging:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -59,7 +67,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
-cd ${PKGNAM}-$VERSION
+cd ${PKGNAM}-$VERSION || exit 1
# Make sure ownerships and permissions are sane:
chown -R root:root .
@@ -78,12 +86,15 @@ CFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
# Build and install:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
# Move the binary and shared library to /sbin and /lib(64)
mkdir -p $PKG/lib${LIBDIRSUFFIX}
( cd $PKG/usr/lib${LIBDIRSUFFIX}
diff --git a/source/l/popt/slack-desc b/source/l/popt/slack-desc
index 46e60e6d..9ea6f558 100644
--- a/source/l/popt/slack-desc
+++ b/source/l/popt/slack-desc
@@ -1,18 +1,18 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
popt: popt (command line parsing library)
popt:
-popt: Popt is a C library for parsing command line parameters. Popt was
+popt: Popt is a C library for parsing command line parameters. Popt was
popt: heavily influenced by the getopt() and getopt_long() functions, but it
-popt: improves on them by allowing more powerful argument expansion. Popt
+popt: improves on them by allowing more powerful argument expansion. Popt
popt: can parse arbitrary argv[] style arrays and automatically set
-popt: variables based on command line arguments. Popt allows command line
+popt: variables based on command line arguments. Popt allows command line
popt: arguments to be aliased via configuration files and includes utility
popt: functions for parsing arbitrary strings into argv[] arrays using
popt: shell-like rules.