Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • npl/internetserver/dhcp/dhcp.SlackBuild.orig

    • Property mode changed from 100755 to 100644
    rebc5ae5 r39a3656  
    1 #!/bin/sh
     1#!/bin/bash
    22
    3 # Copyright 2008, 2009, 2010, 2011, 2012  Patrick J. Volkerding, Sebeka, MN, USA
     3# Copyright 2008, 2009, 2010, 2011, 2012, 2017, 2018, 2020, 2021  Patrick J. Volkerding, Sebeka, MN, USA
    44# All rights reserved.
    55#
     
    2121#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2222
     23cd $(dirname $0) ; CWD=$(pwd)
    2324
    2425PKGNAM=dhcp
     
    3031PKG_VERSION=$(echo $VERSION | tr - _)
    3132
    32 NUMJOBS=${NUMJOBS:-" -j7 "}
     33NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
    3334
    3435# Automatically determine the architecture we're building on:
     
    4243fi
    4344
    44 CWD=$(pwd)
     45# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
     46# the name of the created package would be, and then exit. This information
     47# could be useful to other scripts.
     48if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
     49  echo "$PKGNAM-$PKG_VERSION-$ARCH-$BUILD.txz"
     50  exit 0
     51fi
     52
    4553TMP=${TMP:-/tmp}
    4654PKG=$TMP/package-dhcp
    4755
    4856if [ "$ARCH" = "i586" ]; then
    49   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
     57  SLKCFLAGS="-O2 -march=i586 -mtune=i686 -fcommon"
    5058  LIBDIRSUFFIX=""
    5159elif [ "$ARCH" = "s390" ]; then
    52   SLKCFLAGS="-O2"
     60  SLKCFLAGS="-O2 -fcommon"
    5361  LIBDIRSUFFIX=""
    5462elif [ "$ARCH" = "x86_64" ]; then
    55   SLKCFLAGS="-O2 -fPIC"
     63  SLKCFLAGS="-O2 -fPIC -fcommon"
    5664  LIBDIRSUFFIX="64"
    5765else
    58   SLKCFLAGS="-O2"
     66  SLKCFLAGS="-O2 -fcommon"
    5967  LIBDIRSUFFIX=""
    6068fi
     
    7179find . \
    7280  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
    73   -exec chmod 755 {} \; -o \
     81  -exec chmod 755 {} \+ -o \
    7482  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
    75   -exec chmod 644 {} \;
    76 
    77 cat $CWD/dhcommon-getifaddrs.patch | patch -p1 || exit 1
     83  -exec chmod 644 {} \+
    7884
    7985# Add PATH setting to /sbin/dhclient-script
    8086zcat $CWD/dhclient-script.PATH.diff.gz | patch -p1 || exit 1
    81 
    8287
    8388# Fix paths in manual pages
     
    103108  --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases \
    104109  --with-cli-lease-file=/var/state/dhcp/dhclient.leases \
    105   --with-cli6-lease-file=/var/state/dhcp/dhclient6.leases
     110  --with-cli6-lease-file=/var/state/dhcp/dhclient6.leases || exit 1
     111
    106112# Default pid dir is still /var/run, so no need to declare it
    107113
     
    163169  LICENSE README RELNOTES \
    164170  $PKG/usr/doc/dhcp-$VERSION
    165 #mv $PKG/etc/dhcpd.conf $PKG/etc/dhclient.conf \
    166 #  $PKG/usr/doc/dhcp-$VERSION/examples
     171mv $PKG/etc/dhcpd.conf $PKG/etc/dhclient.conf \
     172  $PKG/usr/doc/dhcp-$VERSION/examples || true
    167173
    168174# If there's a ChangeLog, installing at least part of the recent history
Note: See TracChangeset for help on using the changeset viewer.