diff options
Diffstat (limited to 'source/n/dhcp/dhcp.SlackBuild')
-rwxr-xr-x | source/n/dhcp/dhcp.SlackBuild | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source/n/dhcp/dhcp.SlackBuild b/source/n/dhcp/dhcp.SlackBuild index ba3b6392..62e65e55 100755 --- a/source/n/dhcp/dhcp.SlackBuild +++ b/source/n/dhcp/dhcp.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2011, 2012, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,12 +20,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) PKGNAM=dhcp # Leave this one .gz as other compressors do not help much and we can keep # the original upstream .asc VERSION=${VERSION:-$(basename $(echo $PKGNAM-*.tar.gz | cut -f 2- -d -) .tar.gz)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} PKG_VERSION=$(echo $VERSION | tr - _) @@ -41,7 +42,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 "$PKGNAM-$PKG_VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + TMP=${TMP:-/tmp} PKG=$TMP/package-dhcp @@ -99,7 +107,8 @@ CFLAGS="$SLKCFLAGS" \ --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \ --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases \ --with-cli-lease-file=/var/state/dhcp/dhclient.leases \ - --with-cli6-lease-file=/var/state/dhcp/dhclient6.leases + --with-cli6-lease-file=/var/state/dhcp/dhclient6.leases || exit 1 + # Default pid dir is still /var/run, so no need to declare it make $NUMJOBS || make || exit 1 |