diff options
author | B. Watson <yalhcru@gmail.com> | 2014-12-22 23:57:16 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-12-22 23:57:16 +0700 |
commit | be2d8d211fb2d37be85633ce204d10373671db51 (patch) | |
tree | 88d7667ea43280224906f4744309e0dac0450c04 /network/tribler | |
parent | be9c1849b69415ae1036310159daef5bf1878651 (diff) | |
download | slackbuilds-be2d8d211fb2d37be85633ce204d10373671db51.tar.gz |
network/tribler: Added (video streaming and bittorrent client).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/tribler')
-rw-r--r-- | network/tribler/README | 12 | ||||
-rw-r--r-- | network/tribler/doinst.sh | 3 | ||||
-rw-r--r-- | network/tribler/git2tarxz.sh | 27 | ||||
-rw-r--r-- | network/tribler/slack-desc | 19 | ||||
-rw-r--r-- | network/tribler/squelch_dht_exceptions.diff | 12 | ||||
-rw-r--r-- | network/tribler/tribler.SlackBuild | 115 | ||||
-rw-r--r-- | network/tribler/tribler.info | 10 |
7 files changed, 198 insertions, 0 deletions
diff --git a/network/tribler/README b/network/tribler/README new file mode 100644 index 0000000000..3d6c901e68 --- /dev/null +++ b/network/tribler/README @@ -0,0 +1,12 @@ +tribler (anonymous search engine, video streaming, bittorrent client) + +Tribler is a Bittorrent-based video streaming client. You can watch +video files, while you are still downloading them. It relies on VLC +for playback of videos. Tribler also includes fast keyword search and +thumbnail-based navigation. Tribler does not require websites or any +central server to find and watch interesting content. + +Without vlc installed, tribler is a fully functional torrent client +and search engine. If you want to stream videos, you will need vlc +installed. This is an optional runtime dependency; you don't need to +rebuild tribler if you decide to install vlc later on. diff --git a/network/tribler/doinst.sh b/network/tribler/doinst.sh new file mode 100644 index 0000000000..5fb28930db --- /dev/null +++ b/network/tribler/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/network/tribler/git2tarxz.sh b/network/tribler/git2tarxz.sh new file mode 100644 index 0000000000..a8cec7dc06 --- /dev/null +++ b/network/tribler/git2tarxz.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# get git tag of of Tribler project release, turn into a src tarball. +# needed because their source archive release is broken (it's +# missing some of its own python libraries). + +PRGNAM=tribler +VERSION=6.4.0 + +GITURL="https://github.com/Tribler/tribler.git" + +OUTDIR=$PRGNAM-$VERSION +TARBALL=$OUTDIR.tar.xz + +rm -rf $OUTDIR $TARBALL + +git clone --branch v$VERSION --recursive --depth 1 "$GITURL" $OUTDIR +find $OUTDIR -name '.git*' -print0 | xargs -0 rm -rf + +# there is absolutely no reason to include a giant windows executable. +rm -f $OUTDIR/ffmpeg.exe + +tar cvfJ $TARBALL $OUTDIR + +# a reminder to myself... +md5sum $TARBALL +echo "Don't forget to update the MD5SUM= line in the .info file" diff --git a/network/tribler/slack-desc b/network/tribler/slack-desc new file mode 100644 index 0000000000..78da2bd272 --- /dev/null +++ b/network/tribler/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +tribler: tribler (anonymous video streaming and bittorrent client) +tribler: +tribler: Tribler is a Bittorrent-based video streaming client. You can watch +tribler: video files, while you are still downloading them. It relies on VLC +tribler: for playback of videos. Tribler also includes fast keyword search +tribler: and thumbnail-based navigation. Tribler does not require websites +tribler: or any central server to find and watch interesting content. +tribler: +tribler: +tribler: +tribler: diff --git a/network/tribler/squelch_dht_exceptions.diff b/network/tribler/squelch_dht_exceptions.diff new file mode 100644 index 0000000000..fbc9dba39f --- /dev/null +++ b/network/tribler/squelch_dht_exceptions.diff @@ -0,0 +1,12 @@ +diff -Naur tribler-6.4.0/Tribler/Core/Libtorrent/LibtorrentDownloadImpl.py tribler-6.4.0.patched/Tribler/Core/Libtorrent/LibtorrentDownloadImpl.py +--- tribler-6.4.0/Tribler/Core/Libtorrent/LibtorrentDownloadImpl.py 2014-12-21 02:24:05.000000000 -0500 ++++ tribler-6.4.0.patched/Tribler/Core/Libtorrent/LibtorrentDownloadImpl.py 2014-12-21 03:45:45.000000000 -0500 +@@ -845,7 +845,7 @@ + public = self.tdef and not isinstance(self.tdef, TorrentDefNoMetainfo) and not self.tdef.is_private() + + result = self.tracker_status.copy() +- result['[DHT]'] = [dht_peers, 'Working' if ltsession.is_dht_running() and public else 'Disabled'] ++ result['[DHT]'] = [dht_peers, 'Working' if dht_peers > 0 else 'Not Working'] + result['[PeX]'] = [pex_peers, 'Working' if not self.get_anon_mode() else 'Disabled'] + return result + diff --git a/network/tribler/tribler.SlackBuild b/network/tribler/tribler.SlackBuild new file mode 100644 index 0000000000..1c69eb9809 --- /dev/null +++ b/network/tribler/tribler.SlackBuild @@ -0,0 +1,115 @@ +#!/bin/sh + +# Slackware build script for tribler + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# Notes: + +# The squelch_dht_exceptions patch is my own. I'm not a Python expert so if +# you've got a better solution, please let me know. + +# Python dependency hell. Of the stuff in REQUIRES=, only gmpy could be +# optional. However if it's not installed, the application complains about it, +# and says upstream doesn't actually test their fallback code much. + +# I didn't list vlc as a required dep, because without vlc installed, tribler +# is still a perfectly usable search engine and torrent client. Also vlc +# can be installed later and will work (it's a runtime dep). + +# Don't be put off by the use of a tarball made from a git checkout. The +# release zipfile on upstream's site is incomplete (is missing the dispersy/ +# subdirectory, for one thing). My source is from their v6.4.0 git tag, not +# from HEAD. See git2tarxz.sh. + +PRGNAM=tribler +VERSION=${VERSION:-6.4.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +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 {} \; + +# This patch stops tribler from spewing 20 or so lines of stack trace +# every second. +patch -p1 < $CWD/squelch_dht_exceptions.diff + +B=Tribler/Main/Build +mkdir -p $PKG/usr/share/pixmaps $PKG/usr/share/applications \ + $PKG/usr/man/man1 $PKG/usr/bin +cat $B/Ubuntu/${PRGNAM}_big.xpm > $PKG/usr/share/pixmaps/$PRGNAM.xpm +gzip -9c < $B/Ubuntu/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + +# make .desktop file validate. +sed \ + -e 's,Application;,,' \ + -e '/\(Categories\|MimeType\)/s,$,;,' \ + $B/Ubuntu/$PRGNAM.desktop \ + > $PKG/usr/share/applications/$PRGNAM.desktop + +# Upstream's wrapper script wants to redirect stdout to a temp file, and +# never cleans them up. So /tmp would end up with lots of log files that +# nobody cares about. I'm getting rid of the redirect, so it just goes +# to stdout. Users who need the debug output can launch it from a terminal +# like any other GUI application. +sed 's, *>.*,,' debian/bin/$PRGNAM > $PKG/usr/bin/$PRGNAM +chmod 755 $PKG/usr/bin/$PRGNAM + +# ditch this stuff, we don't need it in the installed package. +rm -rf $B debian mac win + +# no compiling, pure python. +mkdir -p $PKG/usr/share/$PRGNAM +cp -a * $PKG/usr/share/$PRGNAM + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/tribler/tribler.info b/network/tribler/tribler.info new file mode 100644 index 0000000000..92c59ea3e4 --- /dev/null +++ b/network/tribler/tribler.info @@ -0,0 +1,10 @@ +PRGNAM="tribler" +VERSION="6.4.0" +HOMEPAGE="http://www.tribler.org/" +DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/tribler-6.4.0.tar.xz" +MD5SUM="979de2e5a22a4c5f13d3e78c77a8bbb2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="wxPython apsw python-twisted pyasn1 pycrypto python-requests netifaces gmpy libtorrent-rasterbar PyXML" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" |