summaryrefslogtreecommitdiffstats
path: root/source/l/libproxy/libproxy.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/libproxy/libproxy.SlackBuild')
-rwxr-xr-xsource/l/libproxy/libproxy.SlackBuild64
1 files changed, 37 insertions, 27 deletions
diff --git a/source/l/libproxy/libproxy.SlackBuild b/source/l/libproxy/libproxy.SlackBuild
index 4bbfe603e..410befdd1 100755
--- a/source/l/libproxy/libproxy.SlackBuild
+++ b/source/l/libproxy/libproxy.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 2009, 2010, 2011 Robby Workman Northport, AL, USA
-# Copyright 2013, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2013, 2018, 2023, 2024 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=libproxy
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -62,9 +62,6 @@ else
LIBDIRSUFFIX=""
fi
-PYTHONLIB=$( python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' )
-PYTHON3LIB=$( python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' )
-
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
@@ -78,38 +75,51 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-cmake . \
- -DCMAKE_C_FLAGS="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DMODULE_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX}/libproxy/${VERSION}/modules \
- -DPERL_VENDORINSTALL=yes || exit 1
-
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-# Generate .pyc files
-python -m compileall "${PKG}$PYTHONLIB"
-python -O -m compileall "${PKG}$PYTHONLIB"
-python3 -m compileall "${PKG}$PYTHON3LIB"
-python3 -O -m compileall "${PKG}$PYTHON3LIB"
+# Configure, build, and install:
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+mkdir meson-build
+cd meson-build
+meson setup \
+ --prefix=/usr \
+ --libdir=lib${LIBDIRSUFFIX} \
+ --libexecdir=/usr/libexec \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --includedir=/usr/include \
+ --datadir=/usr/share \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --buildtype=release \
+ -Dpacrunner-duktape=true \
+ -Ddocs=false \
+ .. || exit 1
+ "${NINJA:=ninja}" $NUMJOBS || exit 1
+ DESTDIR=$PKG $NINJA install || exit 1
+cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# Compress manual pages:
+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
+
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- AUTHORS COPYING* INSTALL NEWS README* \
+ CHANGELOG.md AUTHORS* COPYING* NEWS* README* \
$PKG/usr/doc/$PKGNAM-$VERSION
-# If there's a ChangeLog, installing at least part of the recent history
+# If there's a CHANGELOG.md, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
-if [ -r ChangeLog ]; then
+if [ -r CHANGELOG.md ]; then
DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
- cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
- touch -r ChangeLog $DOCSDIR/ChangeLog
+ cat CHANGELOG.md | head -n 1000 > $DOCSDIR/CHANGELOG.md
+ touch -r CHANGELOG.md $DOCSDIR/CHANGELOG.md
fi
mkdir -p $PKG/install