|
|
@ -2,10 +2,12 @@ |
|
|
|
|
|
|
|
# Slackware build script for SLiM |
|
|
|
|
|
|
|
# Copyright 2006 Martin Lefebvre <dadexter@gmail.com> |
|
|
|
# Copyright 2007-2009 Frank Caraballo <fecaraballo{at}gmail{dot}com> |
|
|
|
# Copyright 2006 Martin Lefebvre |
|
|
|
# Copyright 2007-2009 Frank Caraballo |
|
|
|
# Copyright 2010,2013 Niels Horn, Rio de Janeiro, Brazil |
|
|
|
# Copyright 2014 Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org |
|
|
|
# Copyright 2014 Ryan P.C. McQuen | Everett, WA |
|
|
|
# Formerly maintained by David Spencer |
|
|
|
# Copyright 2024 B. Watson <urchlay@slackware.uk> |
|
|
|
# All rights reserved. |
|
|
|
# |
|
|
|
# Redistribution and use of this script, with or without modification, is |
|
|
@ -24,14 +26,17 @@ |
|
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
|
|
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
|
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
|
|
# |
|
|
|
# Maintained by David Spencer <baildon.research@googlemail.com> |
|
|
|
|
|
|
|
# 20240924 bkw: BUILD=4 |
|
|
|
# - take over maintenance. |
|
|
|
# - make /etc/slimlock.conf a .new config file. |
|
|
|
# - get useless INSTALL out of doc dir. |
|
|
|
|
|
|
|
cd $(dirname $0) ; CWD=$(pwd) |
|
|
|
|
|
|
|
PRGNAM=slim |
|
|
|
VERSION=${VERSION:-1.3.6} |
|
|
|
BUILD=${BUILD:-3} |
|
|
|
BUILD=${BUILD:-4} |
|
|
|
TAG=${TAG:-_SBo} |
|
|
|
PKGTYPE=${PKGTYPE:-tgz} |
|
|
|
|
|
|
@ -43,9 +48,6 @@ 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" |
|
|
|
exit 0 |
|
|
@ -78,11 +80,8 @@ rm -rf $PRGNAM-$VERSION |
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz |
|
|
|
cd $PRGNAM-$VERSION |
|
|
|
chown -R root:root . |
|
|
|
find -L . \ |
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ |
|
|
|
-o -perm 511 \) -exec chmod 755 {} \; -o \ |
|
|
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ |
|
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; |
|
|
|
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ |
|
|
|
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + |
|
|
|
|
|
|
|
# Correct the path used for suspend and a few things about sessions |
|
|
|
patch -p1 < $CWD/patches/slim-1.3.6-config.diff |
|
|
@ -98,7 +97,7 @@ patch -p1 < $CWD/patches/slim-1.3.6-gcc11.patch |
|
|
|
patch -p1 < $CWD/patches/slim-1.3.6-envcpy-bad-pointer-arithmetic.patch |
|
|
|
|
|
|
|
# Fix location of man-pages |
|
|
|
sed "s/share\/man/man/" -i CMakeLists.txt |
|
|
|
sed -i "s,share/man,man," CMakeLists.txt |
|
|
|
|
|
|
|
mkdir -p build |
|
|
|
cd build |
|
|
@ -111,7 +110,7 @@ cd build |
|
|
|
-DUSE_CONSOLEKIT=no \ |
|
|
|
-DCMAKE_BUILD_TYPE=Release .. |
|
|
|
make |
|
|
|
make install DESTDIR=$PKG |
|
|
|
make install/strip DESTDIR=$PKG |
|
|
|
cd .. |
|
|
|
|
|
|
|
# Don't overwrite existing config file: |
|
|
@ -133,18 +132,15 @@ rm -rf $PKG/lib |
|
|
|
install -m 0644 -D $CWD/files/Xsession $PKG/usr/share/slim/Xsession |
|
|
|
install -m 0644 -D $CWD/files/slim.pam $PKG/etc/pam.d/slim/slim.pam |
|
|
|
install -m 0644 -D $CWD/files/slimlock.pam $PKG/etc/pam.d/slimlock/slimlock.pam |
|
|
|
install -m 0644 -D slimlock.conf $PKG/etc/slimlock.conf |
|
|
|
|
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ |
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |
|
|
|
install -m 0644 -D slimlock.conf $PKG/etc/slimlock.conf.new |
|
|
|
|
|
|
|
find $PKG/usr/man -type f -exec gzip -9 {} \; |
|
|
|
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done |
|
|
|
gzip -9 $PKG/usr/man/man*/* |
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION |
|
|
|
cp -a ChangeLog COPYING INSTALL README THEMES TODO xinitrc.sample $PKG/usr/doc/$PRGNAM-$VERSION |
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |
|
|
|
cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE |
|
|
|
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION |
|
|
|
mkdir -p $PKGDOC |
|
|
|
cp -a ChangeLog COPYING README THEMES TODO xinitrc.sample $PKGDOC |
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild |
|
|
|
cat $CWD/README.SLACKWARE > $PKGDOC/README.SLACKWARE |
|
|
|
|
|
|
|
mkdir -p $PKG/install |
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc |
|
|
|