diff options
Diffstat (limited to 'libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild')
-rw-r--r-- | libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild | 76 |
1 files changed, 39 insertions, 37 deletions
diff --git a/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild b/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild index 738af258b4..88aecdbe4e 100644 --- a/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild +++ b/libraries/libtorrent-rasterbar/libtorrent-rasterbar.SlackBuild @@ -1,7 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for libtorrent (rasterbar) +# Copyright 2022-2023 Logan Rathbone, Province of Ontario, Canada +# Copyright 2019-2020 Donald Cooley, South Haven, Indiana, USA # Copyright 2009-2015 Erik W. Hanson, Minneapolis, MN, USA # All rights reserved. # @@ -22,15 +24,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=libtorrent-rasterbar -VERSION=${VERSION:-1.1.12} -BUILD=${BUILD:-2} +VERSION=${VERSION:-1.2.19} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -40,6 +40,15 @@ if [ -z "$ARCH" ]; then esac fi +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -65,43 +74,36 @@ 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 \ + -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 {} \; - -# https://github.com/qbittorrent/qBittorrent/issues/6383#issuecomment-281535787 -sed -i -e "s/+ target_specific(),/+ target_specific() + ['-std=c++11'],/" \ - bindings/python/setup.py + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ EXAMPLES=${EXAMPLES:-no} -[ "$EXAMPLES" = "yes" ] && examples="--enable-examples" - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS -std=c++11" \ -LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var/lib \ - --disable-static \ - --enable-python-binding \ - --enable-encryption \ - $examples \ - --with-boost-libdir=/usr/lib${LIBDIRSUFFIX} \ - --disable-debug \ - --build=$ARCH-slackware-linux - -make -make install-strip DESTDIR=$PKG +[ "$EXAMPLES" = "yes" ] && examples="-Dbuild_examples=ON" + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR:PATH=lib${LIBDIRSUFFIX} \ + -Dpython-bindings=ON \ + -Dpython-egg-info=ON \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog NEWS docs/ tools/ \ +cp -a AUTHORS COPYING LICENSE ChangeLog NEWS README* docs/ tools/ \ $PKG/usr/doc/$PRGNAM-$VERSION if [ "$EXAMPLES" = "yes" ]; then cp -a examples/ $PKG/usr/doc/$PRGNAM-$VERSION - cp -a ed25519/ $PKG/usr/doc/$PRGNAM-$VERSION fi find $PKG \ @@ -114,4 +116,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |