summaryrefslogtreecommitdiff
path: root/source/n/rp-pppoe/rp-pppoe.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/rp-pppoe/rp-pppoe.SlackBuild')
-rwxr-xr-xsource/n/rp-pppoe/rp-pppoe.SlackBuild29
1 files changed, 23 insertions, 6 deletions
diff --git a/source/n/rp-pppoe/rp-pppoe.SlackBuild b/source/n/rp-pppoe/rp-pppoe.SlackBuild
index 6549149b..f392cbef 100755
--- a/source/n/rp-pppoe/rp-pppoe.SlackBuild
+++ b/source/n/rp-pppoe/rp-pppoe.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2012, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2012, 2015, 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)
+
PKGNAM=rp-pppoe
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -34,6 +36,14 @@ if [ -z "$ARCH" ]; then
esac
fi
+# 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
+
NUMJOBS=${NUMJOBS:-" -j7 "}
if [ "$ARCH" = "i586" ]; then
@@ -46,7 +56,6 @@ else
SLKCFLAGS="-O2"
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-rp-pppoe
@@ -55,7 +64,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf rp-pppoe-$VERSION
tar xvf $CWD/rp-pppoe-$VERSION.tar.?z* || exit 1
-cd rp-pppoe-$VERSION/src || exit 1
+cd rp-pppoe-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -63,12 +72,20 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+zcat $CWD/rp-pppoe-3.12-ip-allocation.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/rp-pppoe-3.12-plugin.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/rp-pppoe-3.12-pluginpath.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/rp-pppoe-manpages.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/rp-pppoe-3.12-bz1469960-new-kernel-header.patch.gz | patch -p1 --verbose || exit 1
+
+cd src
+
CFLAGS="$SLKCFLAGS" \
./configure \
--enable-plugin=/ppp-2.4.4 \
--prefix=/usr \
--mandir=/usr/man \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install docdir=/usr/doc/rp-pppoe-$VERSION DESTDIR=$PKG install || exit 1