forked from pool/ktorrent
OBS-URL: https://build.opensuse.org/request/show/569400 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ktorrent?expand=0&rev=108
170 lines
5.0 KiB
RPMSpec
170 lines
5.0 KiB
RPMSpec
#
|
|
# spec file for package ktorrent
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: ktorrent
|
|
Version: 5.1.0
|
|
Release: 0
|
|
Summary: KDE BitTorrent Client
|
|
License: GPL-2.0+
|
|
Group: Productivity/Networking/File-Sharing
|
|
Url: http://ktorrent.org/
|
|
Source0: http://download.kde.org/stable/ktorrent/5.1/%{name}-%{version}.tar.xz
|
|
Source2: ktorrent.1
|
|
Source3: ktupnptest.1
|
|
# PATCH-FIX-OPENSUSE initial-preference.diff cmorve69@yahoo.es -- InitialPreference to set it as the default torrent downloader
|
|
Patch0: initial-preference.diff
|
|
# PATCH-FIX-OPENSUSE fix-build-with-qt5.6.patch -- make it build with Qt < 5.7.0 (i.e. on Leap 42.x)
|
|
Patch1: fix-build-with-qt5.6.patch
|
|
%if 0%{?suse_version} > 1325
|
|
BuildRequires: libboost_headers-devel
|
|
%else
|
|
BuildRequires: boost-devel
|
|
%endif
|
|
BuildRequires: extra-cmake-modules
|
|
BuildRequires: fdupes
|
|
BuildRequires: karchive-devel
|
|
BuildRequires: kcmutils-devel
|
|
BuildRequires: kcompletion-devel
|
|
BuildRequires: kconfig-devel
|
|
BuildRequires: kconfigwidgets-devel
|
|
BuildRequires: kcoreaddons-devel
|
|
BuildRequires: kcrash-devel
|
|
BuildRequires: kdbusaddons-devel
|
|
BuildRequires: kdewebkit-devel
|
|
BuildRequires: kdnssd-framework-devel
|
|
BuildRequires: kdoctools-devel
|
|
BuildRequires: ki18n-devel
|
|
BuildRequires: kiconthemes-devel
|
|
BuildRequires: kio-devel
|
|
BuildRequires: kitemviews-devel
|
|
BuildRequires: knotifications-devel
|
|
BuildRequires: knotifyconfig-devel
|
|
BuildRequires: kparts-devel
|
|
BuildRequires: kplotting-devel
|
|
BuildRequires: kross-devel
|
|
BuildRequires: kservice-devel
|
|
BuildRequires: ktextwidgets-devel
|
|
BuildRequires: kwidgetsaddons-devel
|
|
BuildRequires: kwindowsystem-devel
|
|
BuildRequires: kxmlgui-devel
|
|
BuildRequires: libktorrent-devel >= 2.1
|
|
BuildRequires: phonon4qt5-devel
|
|
BuildRequires: plasma5-workspace-devel
|
|
BuildRequires: solid-devel
|
|
BuildRequires: syndication-devel
|
|
BuildRequires: update-desktop-files
|
|
BuildRequires: pkgconfig(Qt5Core)
|
|
BuildRequires: pkgconfig(Qt5DBus)
|
|
BuildRequires: pkgconfig(Qt5Network)
|
|
BuildRequires: pkgconfig(Qt5Script)
|
|
BuildRequires: pkgconfig(Qt5Widgets)
|
|
BuildRequires: pkgconfig(taglib)
|
|
%if 0%{?suse_version} < 1330
|
|
%if 0%{?sle_version} < 120300
|
|
BuildRequires: gcc5
|
|
BuildRequires: gcc5-c++
|
|
%else
|
|
BuildRequires: gcc7
|
|
BuildRequires: gcc7-c++
|
|
%endif
|
|
#!BuildIgnore: libgcc_s1
|
|
%endif
|
|
Recommends: %{name}-lang = %{version}
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
KTorrent is a BitTorrent application by KDE which allows you to download files
|
|
using the BitTorrent protocol. It enables you to run multiple torrents at the
|
|
same time and comes with extended features to make it a full-featured client
|
|
for BitTorrent.
|
|
|
|
%lang_package
|
|
%prep
|
|
%setup -q
|
|
%patch0
|
|
%if 0%{?suse_version} < 1330
|
|
%patch1 -p1
|
|
%endif
|
|
|
|
%build
|
|
%if 0%{?suse_version} < 1330
|
|
%if 0%{?sle_version} < 120300
|
|
%cmake_kf5 -d build -- -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5
|
|
%else
|
|
%cmake_kf5 -d build -- -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7
|
|
%endif
|
|
%else
|
|
%cmake_kf5 -d build
|
|
%endif
|
|
%make_jobs
|
|
|
|
%install
|
|
%kf5_makeinstall -C build
|
|
|
|
# Not needed, fix "devel-file-in-non-devel-package" rpmlint warning
|
|
rm -f %{buildroot}%{_libdir}/libktcore.so
|
|
|
|
# Add man pages from help2man edited.
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
cp -a %{SOURCE2} %{buildroot}%{_mandir}/man1
|
|
cp -a %{SOURCE3} %{buildroot}%{_mandir}/man1
|
|
|
|
# Fix any .py files with shebangs and wrong permissions.
|
|
if test -z `find %{buildroot} -name *.py -perm 0644 -print0|xargs -0r grep -l '#!'`; \
|
|
then break;
|
|
else chmod -f 0755 `find %{buildroot} -name *.py -perm 0644 -print0|xargs -0r grep -l '#!'`; \
|
|
fi
|
|
|
|
%suse_update_desktop_file -r org.kde.ktorrent Qt KDE Network P2P
|
|
|
|
%fdupes -s %{buildroot}
|
|
|
|
%find_lang %{name}
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc COPYING ChangeLog RoadMap
|
|
%doc %{_mandir}/man1/ktorrent.1%{ext_man}
|
|
%doc %{_mandir}/man1/ktupnptest.1%{ext_man}
|
|
%_bindir/ktorrent
|
|
%_bindir/ktmagnetdownloader
|
|
%_bindir/ktupnptest
|
|
%_libdir/libktcore.so.*
|
|
%_kf5_plugindir/
|
|
%_kf5_applicationsdir/org.kde.ktorrent.desktop
|
|
%_kf5_iconsdir/hicolor/*/*/*.png
|
|
%_kf5_iconsdir/hicolor/*/*/*.svgz
|
|
%_kf5_notifydir/ktorrent.notifyrc
|
|
%_kf5_kxmlguidir/ktorrent/
|
|
%_kf5_htmldir/en/ktorrent/
|
|
%_kf5_sharedir/ktorrent/
|
|
%dir %_kf5_appstreamdir
|
|
%_kf5_appstreamdir/org.kde.ktorrent.appdata.xml
|
|
|
|
%files lang -f %{name}.lang
|
|
%defattr(-,root,root,-)
|
|
%_kf5_htmldir/*/ktorrent/
|
|
%dir %_kf5_htmldir/pt_BR
|
|
%exclude %_kf5_htmldir/en/ktorrent/
|
|
|
|
%changelog
|