summaryrefslogtreecommitdiff
path: root/source/a/libcgroup/libcgroup.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/libcgroup/libcgroup.SlackBuild')
-rwxr-xr-xsource/a/libcgroup/libcgroup.SlackBuild12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/a/libcgroup/libcgroup.SlackBuild b/source/a/libcgroup/libcgroup.SlackBuild
index 00fc2be8..e5ff9b4c 100755
--- a/source/a/libcgroup/libcgroup.SlackBuild
+++ b/source/a/libcgroup/libcgroup.SlackBuild
@@ -80,6 +80,15 @@ zcat $CWD/libcgroup.conf.diff.gz | patch -p1 --verbose || exit 1
# Apply combined patches from git, including for an infinate loop bug:
zcat $CWD/libcgroup.loop.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="--enable-pam --enable-pam-module-dir=/lib/security"
+ unset SHADOW_OPTIONS
+else
+ unset PAM_OPTIONS
+ SHADOW_OPTIONS="--disable-pam"
+fi
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -97,7 +106,8 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--infodir=/usr/info \
- --disable-pam \
+ $PAM_OPTIONS \
+ $SHADOW_OPTIONS \
--disable-static \
--build=$ARCH-slackware-linux || exit 1