diff options
Diffstat (limited to 'network/transmission/transmission.SlackBuild')
-rw-r--r-- | network/transmission/transmission.SlackBuild | 115 |
1 files changed, 51 insertions, 64 deletions
diff --git a/network/transmission/transmission.SlackBuild b/network/transmission/transmission.SlackBuild index 60ff05296a..5ccebeb9b7 100644 --- a/network/transmission/transmission.SlackBuild +++ b/network/transmission/transmission.SlackBuild @@ -24,6 +24,16 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20231219 bkw: update for v4.0.5, minor man page tweaks. +# 20230912 bkw: update for v4.0.4. +# 20230510 bkw: update for v4.0.3. remove the warning about D-Bus from README, +# it no longer applies (transmission-gtk works without it). +# 20230320 bkw: update for v4.0.2. add -DREBUILD_WEB=OFF to allow building +# without using the network, if nodejs is installed. thanks +# to Ruben Schuller for pointing this out. +# 20230208 bkw: update for v4.0.0, which has only been out for about 5 hours. +# - Disable the qt5 UI by default. There's no reason to build both GUIs +# by default. User can still say GTK=no QT=yes to get only the qt UI. # 20210926 bkw: BUILD=2, restore Qt5 build. 15.0 not yet released, but "soon". # 20200525 bkw: update for v3.00. # Drop Qt GUI and QT=yes, due to 14.2's old gcc/libstdc++. @@ -42,8 +52,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=transmission -VERSION=${VERSION:-3.00} -BUILD=${BUILD:-2} +VERSION=${VERSION:-4.0.5} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -64,8 +74,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -DOCS="AUTHORS COPYING NEWS.md README.md" - if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -83,7 +91,7 @@ fi set -e GTK="${GTK:-yes}" -QT="${QT:-yes}" +QT="${QT:-no}" CLI="${CLI:-yes}" DAEMON="${DAEMON:-yes}" @@ -99,10 +107,13 @@ EOF exit 1 fi -# anything but lowercase "yes" is considered a no! -[ "$GTK" != "yes" ] && GTKOPT="no" || GTKOPT="yes" -[ "$CLI" != "yes" ] && CLIOPT="dis" || CLIOPT="en" -[ "$DAEMON" != "yes" ] && DAEMOPT="dis" || DAEMOPT="en" +# Anything but lowercase "yes" is considered a no! +# cmake didn't used to be case-sensitive about on and off. +# It feels like BDSM, and not in a good way. +[ "$QT" != "yes" ] && QTOPT="OFF" || QTOPT="ON" +[ "$GTK" != "yes" ] && GTKOPT="OFF" || GTKOPT="ON" +[ "$CLI" != "yes" ] && CLIOPT="OFF" || CLIOPT="ON" +[ "$DAEMON" != "yes" ] && DAEMOPT="OFF" || DAEMOPT="ON" rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -115,67 +126,43 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -sed -i -e 's%-g -O3 -funroll-loops %%g' configure.ac -sed -i -e 's%-ggdb3 %%g' configure.ac - -# fix for -current (does no harm on stable). ref: -# https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c13b5e88c6e9c7bd2698d844cb5ed127ed809f7e -rm -f m4/glib-gettext.m4 - -CC=gcc CXX=g++ \ -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --disable-static \ - --verbose \ - --with-gtk=$GTKOPT \ - --${CLIOPT}able-cli \ - --${DAEMOPT}able-daemon \ - --build=$ARCH-slackware-linux \ - --host=$ARCH-slackware-linux - -# Build daemon, GTK and cli client (unless disabled). This also builds -# the tools (transmission-create and friends). -make -make install-strip DESTDIR=$PKG - -if [ "$QT" = "yes" ]; then - # build the Qt client (transmission-qt) unless disabled - # Fix hard-coded path of man file of Qt client - sed -i "s|share/man/|man/|" qt/qtr.pro - - # Needed when using Qt4 - # https://trac.transmissionbt.com/ticket/5700#comment:2 - echo "QMAKE_CXXFLAGS += -std=c++11" >> qt/qtr.pro - - cd $TMP/$PRGNAM-$VERSION/qt - qmake-qt5 \ - QMAKE_CXXFLAGS+="$SLKCFLAGS" \ - QMAKE_CFLAGS+="$SLKCFLAGS" \ - qtr.pro - sed -i -e 's% -g % %g' Makefile - make - INSTALL_ROOT=$PKG/usr make install - - mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps - install -m644 transmission-qt.desktop $PKG/usr/share/applications/transmission-qt.desktop - install -m644 icons/transmission.png $PKG/usr/share/pixmaps/transmission-qt.png - cd - -fi +# 20231219 bkw: make the man pages slightly nicer looking: replace +# 'BSD General Commands Manual' with 'SlackBuilds.org', and replace +# the 'BSD' at the bottom with the version number. +for i in $( find . -maxdepth 2 -name 'transmission*.1' ); do + sed -i -e '/^\.Os/d' \ + -e '/^\.Dt/s,1 *$,\\\&1 "SlackBuilds.org",' \ + -e '/^\.Dt/a.Os '$VERSION \ + $i +done + +mkdir -p build +cd build + cmake \ + -DREBUILD_WEB=OFF \ + -DENABLE_DAEMON=$DAEMOPT \ + -DENABLE_QT=$QTOPT \ + -DENABLE_GTK=$GTKOPT \ + -DENABLE_CLI=$CLIOPT \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DCMAKE_INSTALL_MANDIR=/usr/man \ + -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \ + -DCMAKE_BUILD_TYPE=Release .. + make VERBOSE=1 + make install/strip DESTDIR=$PKG +cd .. gzip -9 $PKG/usr/man/man?/* -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install -sed "s,@opts@,GTK=$GTK QT=$QT CLI=$CLI QT=$QT DAEMON=$DAEMON," $CWD/slack-desc > $PKG/install/slack-desc +sed "s,@opts@,GTK=$GTK QT=$QT CLI=$CLI DAEMON=$DAEMON," \ + $CWD/slack-desc \ + > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG |