summaryrefslogtreecommitdiffstats
path: root/libraries/librsync/librsync.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/librsync/librsync.SlackBuild')
-rw-r--r--libraries/librsync/librsync.SlackBuild41
1 files changed, 19 insertions, 22 deletions
diff --git a/libraries/librsync/librsync.SlackBuild b/libraries/librsync/librsync.SlackBuild
index 5f5a6e9b11..5b5dad2811 100644
--- a/libraries/librsync/librsync.SlackBuild
+++ b/libraries/librsync/librsync.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for librsync.
# Written by Lyle Sigurdson <lyle_s@myrealbox.com>.
# Copyright 2020 Ricardo J. Barberis <ricardo.barberis@gmail.com>
+# Copyright 2022-2023 Isaac Yu <isaacyu@protonmail.com>
#
# Free for any use; no warranty.
@@ -11,8 +12,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=librsync
-VERSION=${VERSION:-0.9.7}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-2.3.4}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -24,9 +25,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
@@ -65,30 +63,29 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --enable-shared \
- --enable-static \
- --disable-dependency-tracking
+mkdir build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ..
-make
-make install-strip DESTDIR=$PKG
+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
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+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/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog NEWS README THANKS TODO \
+cp -a AUTHORS CONTRIBUTING.md COPYING NEWS.md README.md THANKS TODO.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-rm -f $PKG/usr/lib*/*.la
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc