summaryrefslogtreecommitdiffstats
path: root/source/ap/lxc/lxc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/lxc/lxc.SlackBuild')
-rwxr-xr-xsource/ap/lxc/lxc.SlackBuild32
1 files changed, 18 insertions, 14 deletions
diff --git a/source/ap/lxc/lxc.SlackBuild b/source/ap/lxc/lxc.SlackBuild
index e674fe362..d17479520 100755
--- a/source/ap/lxc/lxc.SlackBuild
+++ b/source/ap/lxc/lxc.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,12 +21,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified by Matteo Bernardini <ponce@slackbuilds.org> (2014)
+# Modified for LXC 4.0.x by Matthew Chamley <mcgchamley@yahoo.co.uk> (2021)
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=lxc
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | rev | cut -f 2- -d -)}
-BUILD=${BUILD:-8}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -80,19 +81,18 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-# Add the template file:
-cat $CWD/lxc-slackware.in > templates/lxc-slackware.in
-
# Our python package is not split:
-sed -i "s|PKG_CHECK_MODULES(\[PYTHONDEV.*||" configure.ac || exit 1
+#sed -i "s|PKG_CHECK_MODULES(\[PYTHONDEV.*||" configure.ac || exit 1
if [ ! -r configure ]; then
NOCONFIGURE=1 ./autogen.sh
fi
-# Enable python stuff only if python3 is installed
+# Enable python stuff only if python3 is installed.
python=""
-[ -x /usr/bin/python3 ] && export PYTHON=/usr/bin/python3 && python="--enable-python"
+# Python bindings don't seem to be part of the standard package at this time,
+# so we'll comment this next line out for now:
+#[ -x /usr/bin/python3 ] && export PYTHON=/usr/bin/python3 && python="--enable-python"
# Configure:
# lua is autodetected
@@ -107,11 +107,11 @@ CFLAGS="$SLKCFLAGS" \
--infodir=/usr/info \
--with-global-conf=/etc/lxc/lxc.conf \
--with-rootfs-path=/var/lib/rootfs-lxc \
- --enable-cgmanager=no \
--disable-werror \
--disable-apparmor \
--disable-static \
$python \
+ --enable-pam \
--build=$ARCH-slackware-linux || exit 1
# Build and install:
@@ -121,6 +121,10 @@ make install DESTDIR=$PKG || exit 1
# Don't ship .la files:
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+# Add the template file:
+cat $CWD/lxc-slackware.in > $PKG/usr/share/lxc/templates/lxc-slackware
+chmod 755 $PKG/usr/share/lxc/templates/lxc-slackware
+
# Add the modified Slackware startup scripts:
mkdir -p $PKG/usr/share/lxc/scripts/slackware
cp -a $CWD/scripts/*.lxc $PKG/usr/share/lxc/scripts/slackware
@@ -128,7 +132,7 @@ chown root:root $PKG/usr/share/lxc/scripts/slackware/*
chmod 644 $PKG/usr/share/lxc/scripts/slackware/*
# Make the default configuration directories and an empty rootfs folder:
-mkdir -p $PKG/var/lib/lxc $PKG/etc/lxc $PKG/var/lib/rootfs-lxc
+mkdir -p $PKG/var/lib/lxc $PKG/etc/lxc $PKG/var/lib/rootfs-lxc $PKG/var/lib/misc
# Create a sample default configuration file:
echo "lxcpath = /var/lib/lxc" > $PKG/etc/lxc/lxc.conf.sample
@@ -145,8 +149,6 @@ mkdir -p $PKG/usr/share/bash-completion/completions/
mv $PKG/etc/bash_completion.d/lxc \
$PKG/usr/share/bash-completion/completions/lxc
rmdir --parents $PKG/etc/bash_completion.d 2>/dev/null
-# Replace illegal characters in the bash completion file:
-sed -i "s/lxc-generic-/lxc_generic_/g" $PKG/usr/share/bash-completion/completions/lxc
# Strip binaries:
( cd $PKG
@@ -157,7 +159,7 @@ sed -i "s/lxc-generic-/lxc_generic_/g" $PKG/usr/share/bash-completion/completion
# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
- AUTHORS CONTRIBUTING COPYING* INSTALL MAINTAINERS NEWS README* TODO \
+ AUTHORS* CONTRIBUTING* COPYING* INSTALL* MAINTAINERS* NEWS* README* TODO* \
doc/FAQ.txt \
$PKG/usr/doc/${PKGNAM}-$VERSION
@@ -191,10 +193,12 @@ if [ -r ChangeLog ]; then
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
+# Remove empty documentation files:
+find $PKG/usr/doc/${PKGNAM}-${VERSION} -size 0 -exec rm "{}" \;
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
-