summaryrefslogtreecommitdiff
path: root/source/n/ppp/ppp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/ppp/ppp.SlackBuild')
-rwxr-xr-xsource/n/ppp/ppp.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/n/ppp/ppp.SlackBuild b/source/n/ppp/ppp.SlackBuild
index 8c1a9dd9..13b21fb3 100755
--- a/source/n/ppp/ppp.SlackBuild
+++ b/source/n/ppp/ppp.SlackBuild
@@ -86,13 +86,25 @@ zcat $CWD/0028-pppoe-include-netinet-in.h-before-linux-in.h.patch.gz | patch -p1
zcat $CWD/ppp.glibc228.diff.gz | patch -p1 --verbose || exit 1
+# Choose correct options depending on whether PAM is installed:
+if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
+ PAM_OPTIONS="USE_PAM=y"
+else
+ unset PAM_OPTIONS
+fi
+
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} || exit 1
-make $NUMJOBS || make || exit 1
+make $PAM_OPTIONS $NUMJOBS || make || exit 1
make install DESTDIR=$PKG/usr || exit 1
+if [ ! -z "$PAM_OPTIONS" ]; then
+ mkdir -p $PKG/etc/pam.d
+ cat pppd/ppp.pam > $PKG/etc/pam.d/ppp.new
+fi
+
# Install PPP config files:
mkdir -p $PKG/etc/ppp
cp -a etc.ppp/* $PKG/etc/ppp