From 3a75a9377a658b0a3a7a0a2d5d5daaea955ed625 Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Sat, 18 Nov 2017 15:16:24 +0300 Subject: [PATCH] KTorrent: add recipe for version 5.1.0 --- .../additional-files/ktorrent.rdef.in | 20 +++ net-p2p/ktorrent/ktorrent-5.1.0.recipe | 170 ++++++++++++++++++ 2 files changed, 190 insertions(+) create mode 100644 net-p2p/ktorrent/additional-files/ktorrent.rdef.in create mode 100644 net-p2p/ktorrent/ktorrent-5.1.0.recipe diff --git a/net-p2p/ktorrent/additional-files/ktorrent.rdef.in b/net-p2p/ktorrent/additional-files/ktorrent.rdef.in new file mode 100644 index 000000000..0dc484599 --- /dev/null +++ b/net-p2p/ktorrent/additional-files/ktorrent.rdef.in @@ -0,0 +1,20 @@ + +resource app_flags B_MULTIPLE_LAUNCH; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_FINAL, + internal = 0, + + short_info = "Ktorrent", + long_info = "@LONG_INFO@" +}; + +resource app_signature "@APP_SIGNATURE@"; + +resource file_types message { + "types" = "application/x-bittorrent" +}; diff --git a/net-p2p/ktorrent/ktorrent-5.1.0.recipe b/net-p2p/ktorrent/ktorrent-5.1.0.recipe new file mode 100644 index 000000000..8a783a979 --- /dev/null +++ b/net-p2p/ktorrent/ktorrent-5.1.0.recipe @@ -0,0 +1,170 @@ +SUMMARY="A powerful BitTorrent client" +DESCRIPTION="TThis package contains KTorrent, a BitTorrent peer-to-peer \ +network client, that is based on the KDE platform. Obviously, KTorrent \ +supports such basic features as downloading, uploading and seeding files \ +on the BitTorrent network. However, lots of other additional features and \ +intuitive GUI should make KTorrent a good choice for everyone. Some features \ +are available as plugins hence you should make sure you have the ones you \ +need enabled. + + - Support for HTTP and UDP trackers, trackerless DHT (mainline) and webseeds. + - Alternative UI support including Web interface and Plasma widget. + - Torrent grouping, speed capping, various download prioritization + capabilities on both torrent and file level as well as bandwidth + scheduling. + - Support for fetching torrent files from many sources including any local + file or remote URL, RSS feeds (with filtering) or actively monitored + directory etc. + - Integrated and customizable torrent search on the Web. + - Various security features like IP blocking and protocol encryption. + - Disk space preallocation to reduce fragmentation. + - uTorrent compatible peer exchange. + - Autoconfiguration for LANs like Zeroconf extension and port forwarding via + uPnP. + - Scripting support via Kross and interprocess control via DBus interface. + - SOCKSv4 and SOCKSv5 proxy, IPv6 support. + - Lots of other useful built-in features and plugins." +HOMEPAGE="https://www.kde.org/applications/internet/ktorrent/" +COPYRIGHT="2010-2017 KDE Organisation" +LICENSE="GNU LGPL v2" +REVISION="1" +SOURCE_URI="https://github.com/KDE/ktorrent/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="369cd6705bd6f14702338c4594f57e626dca529280dc9ed7e56ce6ce7d5855c0" +ADDITIONAL_FILES="ktorrent.rdef.in" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="!x86_gcc2 x86" + +PROVIDES=" + ktorrent$secondaryArchSuffix = $portVersion + app:KTorrent$secondaryArchSuffix = $portVersion + cmd:ktmagnetdownloader$secondaryArchSuffix = $portVersion + cmd:ktupnptest$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libgcrypt$secondaryArchSuffix + lib:libgmp$secondaryArchSuffix + lib:libKF5Archive$secondaryArchSuffix + lib:libKF5Auth$secondaryArchSuffix + lib:libKF5Bookmarks$secondaryArchSuffix + lib:libKF5Codecs$secondaryArchSuffix + lib:libKF5Completion$secondaryArchSuffix + lib:libKF5ConfigCore$secondaryArchSuffix + lib:libKF5ConfigGui$secondaryArchSuffix + lib:libKF5ConfigWidgets$secondaryArchSuffix + lib:libKF5CoreAddons$secondaryArchSuffix + lib:libKF5Crash$secondaryArchSuffix + lib:libKF5DBusAddons$secondaryArchSuffix + lib:libKF5I18n$secondaryArchSuffix + lib:libKF5IconThemes$secondaryArchSuffix + lib:libKF5ItemViews$secondaryArchSuffix + lib:libKF5JobWidgets$secondaryArchSuffix + lib:libKF5KCMUtils$secondaryArchSuffix + lib:libKF5KIOCore$secondaryArchSuffix + lib:libKF5KIOFileWidgets$secondaryArchSuffix + lib:libKF5KIOWidgets$secondaryArchSuffix + lib:libKF5Notifications$secondaryArchSuffix + lib:libKF5NotifyConfig$secondaryArchSuffix + lib:libKF5Parts$secondaryArchSuffix + lib:libKF5Service$secondaryArchSuffix + lib:libKF5Solid$secondaryArchSuffix + lib:libKF5SonnetUi$secondaryArchSuffix + lib:libKF5TextWidgets$secondaryArchSuffix + lib:libKF5Torrent$secondaryArchSuffix + lib:libKF5WidgetsAddons$secondaryArchSuffix + lib:libKF5WindowSystem$secondaryArchSuffix + lib:libKF5XmlGui$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5DBus$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Network$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + lib:libQt5Xml$secondaryArchSuffix + " + +BUILD_REQUIRES=" + extra_cmake_modules >= 5.39 + haiku${secondaryArchSuffix}_devel + devel:libKF5Archive$secondaryArchSuffix + devel:libKF5Auth$secondaryArchSuffix + devel:libKF5Bookmarks$secondaryArchSuffix + devel:libKF5Codecs$secondaryArchSuffix + devel:libKF5Completion$secondaryArchSuffix + devel:libKF5ConfigCore$secondaryArchSuffix + devel:libKF5ConfigWidgets$secondaryArchSuffix + devel:libKF5CoreAddons$secondaryArchSuffix + devel:libKF5Crash$secondaryArchSuffix + devel:libKF5DBusAddons$secondaryArchSuffix + devel:libKF5I18n$secondaryArchSuffix + devel:libKF5IconThemes$secondaryArchSuffix + devel:libKF5ItemViews$secondaryArchSuffix + devel:libKF5JobWidgets$secondaryArchSuffix + devel:libKF5KCMUtils$secondaryArchSuffix + devel:libKF5KIOCore$secondaryArchSuffix + devel:libKF5Notifications$secondaryArchSuffix + devel:libKF5NotifyConfig$secondaryArchSuffix + devel:libKF5Parts$secondaryArchSuffix + devel:libKF5Service$secondaryArchSuffix + devel:libKF5Solid$secondaryArchSuffix + devel:libKF5SonnetUi$secondaryArchSuffix + devel:libKF5TextWidgets$secondaryArchSuffix + devel:libKF5Torrent$secondaryArchSuffix + devel:libKF5WidgetsAddons$secondaryArchSuffix + devel:libKF5WindowSystem$secondaryArchSuffix + devel:libKF5XmlGui$secondaryArchSuffix + devel:libQt5Core$secondaryArchSuffix >= 5.7 + devel:libboost_system$secondaryArchSuffix + devel:libgcrypt$secondaryArchSuffix + devel:libgmp$secondaryArchSuffix + devel:libqca$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:python2 + " + +BUILD() +{ + # disable docs generation until libxml package is fixed + sed -i s/kdoctools/#kdoctool/g CMakeLists.txt + + mkdir -p build + cd build + cmake .. \ + -DCMAKE_INSTALL_PREFIX=$prefix \ + -DSHARE_INSTALL_PREFIX=$dataDir \ + -DCMAKE_INSTALL_PREFIX=$appsDir/Ktorrent \ + -DCMAKE_INSTALL_DATAROOTDIR=$dataDir \ + -DECM_DIR=/system/data/cmake/Modules/ECM/cmake + make $jobArgs +} + +INSTALL() +{ + cd build + make install + mv $appsDir/KTorrent/bin/* $appsDir/KTorrent + mv $appsDir/KTorrent/ktorrent $appsDir/KTorrent/KTorrent + rm -rf $appsDir/KTorrent/bin + + APP_SIGNATURE="application/x-vnd.ktorrent" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" + local LONG_INFO="$SUMMARY" + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/ktorrent.rdef.in > ktorrent.rdef + + addResourcesToBinaries ktorrent.rdef $appsDir/KTorrent/KTorrent + addAppDeskbarSymlink $appsDir/KTorrent/KTorrent +}