diff options
Diffstat (limited to 'source/n/dhcpcd/dhcpcd.SlackBuild')
-rwxr-xr-x | source/n/dhcpcd/dhcpcd.SlackBuild | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/source/n/dhcpcd/dhcpcd.SlackBuild b/source/n/dhcpcd/dhcpcd.SlackBuild index f8b937d3..56c33a42 100755 --- a/source/n/dhcpcd/dhcpcd.SlackBuild +++ b/source/n/dhcpcd/dhcpcd.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2008, 2009, 2010, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2013, 2014, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,9 +20,11 @@ # 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) -VERSION=${VERSION:-$(echo dhcpcd-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +PKGNAM=dhcpcd +VERSION=${VERSION:-$(echo dhcpcd-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:-" -j7 "} @@ -36,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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + TMP=${TMP:-/tmp} PKG=$TMP/package-dhcpcd @@ -58,7 +67,7 @@ rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf dhcpcd-$VERSION -tar xvf $CWD/dhcpcd-$VERSION.tar.?z* || exit 1 +tar xvf $CWD/dhcpcd-$VERSION.tar.?z || exit 1 cd dhcpcd-$VERSION chown -R root:root . find . \ @@ -68,6 +77,8 @@ find . \ -exec chmod 644 {} \; patch -p1 < $CWD/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch || exit 1 +patch -p1 < $CWD/patches/use-hostname_short-in-dhcpcd.conf.patch || exit 1 +patch -p1 < $CWD/patches/dhcpcd.conf-request_ntp_server_by_default.patch || exit 1 # At this point, it should be safe to assume that /var will be mounted by the # time dhcpcd is called, as all non-root local filesystems are mounted from @@ -84,8 +95,8 @@ CFLAGS="$SLKCFLAGS" \ --dbdir=/var/lib/dhcpcd \ --libexecdir=/lib/dhcpcd \ --mandir=/usr/man \ - --rundir=/run/dhcpcd \ - --build=$ARCH-slackware-linux + --rundir=/run \ + --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG HOOKSCRIPTS="50-ntp.conf 50-yp.conf" || exit 1 |