[fatrat] rebase the package: (1.2.0_beta1)

jvcelak jvcelak at fedoraproject.org
Wed Nov 30 15:08:39 UTC 2011


commit 025d8cdec2d0d0df246a0ad2c13cc7cc43493c20
Author: Jan Vcelak <jvcelak at redhat.com>
Date:   Fri Nov 18 15:38:10 2011 +0100

    rebase the package: (1.2.0_beta1)
    
    - new features:
      + new AJAX web interface
      + support for plugins written in Java
    - removed all bundled plugins, will be packaged separately due to
      diversion in version numbering

 .gitignore                        |    5 +-
 fatrat-boost-cygwin.patch         |   27 +++++++
 fatrat-cmake-libs.patch           |   16 ++++
 fatrat-czshare-libdir.patch       |   14 ----
 fatrat-headers.patch              |   15 ++++
 fatrat-opensubtitles-libdir.patch |   14 ----
 fatrat-plugins-path.patch         |   14 ----
 fatrat.spec                       |  149 ++++++++++++-------------------------
 sources                           |    4 +-
 9 files changed, 108 insertions(+), 150 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d73a0d2..94a71da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1 @@
-/fatrat-1.1.3.tar.gz
-/fatrat-czshare-1.1.2.tar.gz
-/fatrat-opensubtitles-1.1.3.tar.gz
-/fatrat-czshare-1.1.3.tar.gz
+/fatrat-1.2.0_beta1.tar.gz
diff --git a/fatrat-boost-cygwin.patch b/fatrat-boost-cygwin.patch
new file mode 100644
index 0000000..889e113
--- /dev/null
+++ b/fatrat-boost-cygwin.patch
@@ -0,0 +1,27 @@
+Resolve boost filesystem incompatibility between fatrat and pion-net.
+Disable checkCygwinPath, which caused the problem. We do not have to care
+under Linux.
+
+Author: Jan Vcelak <jvcelak at redhat.com>
+
+diff -u a/src/remote/pion/FileService.cpp b/src/remote/pion/FileService.cpp
+--- a/src/remote/pion/FileService.cpp
++++ b/src/remote/pion/FileService.cpp
+@@ -52,7 +52,7 @@ void FileService::setOption(const std::s
+ {
+ 	if (name == "directory") {
+ 		m_directory = value;
+-		PionPlugin::checkCygwinPath(m_directory, value);
++		//PionPlugin::checkCygwinPath(m_directory, value);
+ 		// make sure that the directory exists
+ 		if (! boost::filesystem::exists(m_directory) )
+ 			throw DirectoryNotFoundException(value);
+@@ -60,7 +60,7 @@ void FileService::setOption(const std::s
+ 			throw NotADirectoryException(value);
+ 	} else if (name == "file") {
+ 		m_file = value;
+-		PionPlugin::checkCygwinPath(m_file, value);
++		//PionPlugin::checkCygwinPath(m_file, value);
+ 		// make sure that the directory exists
+ 		if (! boost::filesystem::exists(m_file) )
+ 			throw FileNotFoundException(value);
diff --git a/fatrat-cmake-libs.patch b/fatrat-cmake-libs.patch
new file mode 100644
index 0000000..73afef4
--- /dev/null
+++ b/fatrat-cmake-libs.patch
@@ -0,0 +1,16 @@
+Fix CMakeList.txt to take pion-net link libraries as detected by cmake.
+
+Author: Jan Vcelak <jvcelak at redhat.com>
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -574,7 +574,7 @@ add_executable(fatrat ${fatrat_SRCS} ${f
+ ${fatrat_QRC_H} ${lrelease_outputs})
+ add_executable(fatrat-conf src/fatrat-conf.cpp)
+ 
+-STRING(REPLACE "-mt" "" pion-net_LIBRARIES "${pion-net_LIBRARIES}")
++#STRING(REPLACE "-mt" "" pion-net_LIBRARIES "${pion-net_LIBRARIES}")
+ #message(STATUS ${pion-net_LIBRARIES})
+ target_link_libraries(fatrat -ldl ${QT_LIBRARIES} ${libtorrent_LDFLAGS} ${gloox_LDFLAGS} ${curl_LDFLAGS} ${Boost_LIBRARIES} ${pion-net_LIBRARIES} ${QT_ADDITIONAL_LIBS} ${XATTR_LIBRARIES} -export-dynamic)
+ target_link_libraries(fatrat-conf ${QT_LIBRARIES})
diff --git a/fatrat-headers.patch b/fatrat-headers.patch
new file mode 100644
index 0000000..7075069
--- /dev/null
+++ b/fatrat-headers.patch
@@ -0,0 +1,15 @@
+Add missing header file which is needed to build some plugins.
+
+Author: Jan Vcelak <jvcelak at redhat.com>
+
+diff a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -601,6 +601,7 @@ set(fatrat_DEV_HEADERS_ENGINES
+ 	${CMAKE_CURRENT_SOURCE_DIR}/src/engines/CurlPoller.h
+ 	${CMAKE_CURRENT_SOURCE_DIR}/src/engines/CurlStat.h
+ 	${CMAKE_CURRENT_SOURCE_DIR}/src/engines/UrlClient.h
++	${CMAKE_CURRENT_SOURCE_DIR}/src/engines/StaticTransferMessage.h
+ 	)
+ 
+ install(FILES
diff --git a/fatrat.spec b/fatrat.spec
index b47bddd..46adb4b 100644
--- a/fatrat.spec
+++ b/fatrat.spec
@@ -1,43 +1,41 @@
 Name: fatrat
-Version: 1.1.3
-Release: 6%{?dist}
+Version: 1.2.0_beta1
+Release: 1%{?dist}
 Summary: Feature-rich download manager
 Group: Applications/Internet
 License: GPLv2+
-URL: http://fatrat.dolezel.info/
+URL: http://fatrat.dolezel.info
 Source0: http://www.dolezel.info/download/data/fatrat/fatrat-%{version}.tar.gz
-Source1: http://www.dolezel.info/download/data/fatrat-czshare/fatrat-czshare-%{version}.tar.gz
-Source2: http://www.dolezel.info/download/data/fatrat-opensubtitles/fatrat-opensubtitles-%{version}.tar.gz
 
-Patch0: fatrat-plugins-path.patch
-Patch100: fatrat-czshare-libdir.patch
-Patch200: fatrat-opensubtitles-libdir.patch
+Patch0: fatrat-cmake-libs.patch
+Patch1: fatrat-headers.patch
+Patch2: fatrat-boost-cygwin.patch
 
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-BuildRequires: cmake, qt4-devel >= 4.4, qt-sqlite
+BuildRequires: cmake, qt4-devel, qt-sqlite
 BuildRequires: libcurl-devel >= 7.18.2
-BuildRequires: rb_libtorrent-devel => 0.14.5, asio-devel, qt-webkit-devel
+BuildRequires: rb_libtorrent-devel >= 0.15.7, asio-devel, qt-webkit-devel
 BuildRequires: gloox-devel >= 0.9
+BuildRequires: pion-net-devel >= 3.0
+BuildRequires: java-1.6.0-openjdk-devel
 BuildRequires: desktop-file-utils
 
 %description
 FatRat is download manager written in C++ and build on top of the Qt4 library.
 It is rich in features and is continuously extended. Main characteristics:
 
-- HTTP(S)/FTP downloads
+- Segmented HTTP(S)/FTP downloads
 - FTP uploads
+- Support for SOCKS5 and HTTP proxies
 - RSS feed support + special functions for TV shows and podcasts
 - BitTorrent support (including torrent creating, DHT, UPnP, encryption etc.)
-- Torrent search
-- Support for SOCKS5 and HTTP proxies
-- RapidShare.com FREE downloads
+- Torrent search on mayor torrent sites
+- RapidShare.com FREE and premium downloads
 - RapidShare.com uploads
 - RapidShare.com link verification and folder extraction
 - RapidSafe link decoding
 - MD4/MD5/SHA1 hash computing
 - Remote control via Jabber
-- Remote control via a web interface
+- Remote control via an AJAX web interface
 - Subtitle search
 - Scheduler
 - Clipboard monitor
@@ -45,7 +43,7 @@ It is rich in features and is continuously extended. Main characteristics:
 %package devel
 Summary: Development libraries for fatrat
 Group: Development/Libraries
-Requires: fatrat = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
 
 %description devel
 FatRat is download manager written in C++ and build on top of the Qt4 library.
@@ -53,121 +51,70 @@ It is rich in features and is continuously extended.
 
 This package contains header files needed for development of FatRat plugins.
 
-%package czshare
-Summary: FatRat plugin enabling CZShare.com downloads and uploads
-Group: Applications/Internet
-Requires: fatrat = %{version}-%{release}
-
-%description czshare
-FatRat is download manager written in C++ and build on top of the Qt4 library.
-It is rich in features and is continuously extended.
-
-This package contains plugin for downloading and uploading to CZshare.com.
-
-%package opensubtitles
-Summary: FatRat plugin enabling OpenSubtitles.org integration
-Group: Applications/Internet
-Requires: fatrat = %{version}-%{release}
-
-%description opensubtitles
-FatRat is download manager written in C++ and build on top of the Qt4 library.
-It is rich in features and is continuously extended.
-
-This package contains plugin for integration with OpenSubtitles.org (easy
-subtitle searching).
 
 %prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
-# setup include dir for plugins compilation
-mkdir include
-ln -s ../fatrat-%{version}/src include/fatrat
-
-# unpack all archives
-%setup -q -b 1 -b 2
-
-# patches for main application
-%patch0 -p1 -b plugins-path
-
-# patches for plugins
-cd ../fatrat-czshare-%{version}
-%patch100 -p1 -b libdir
-
-cd ../fatrat-opensubtitles-%{version}
-%patch200 -p1 -b opensubtitles
 
 %build
-# workaround: rb_libtorrent incompatibility with new boost (#678772)
-CXXFLAGS="%{optflags} -DBOOST_FILESYSTEM_VERSION=2"
-
-# build main application
-
+export JAVA_HOME="%{java_home}"
 %{cmake} . \
-	-DWITH_EVERYTHING=ON \
-	-DCMAKE_EXE_LINKER_FLAGS="-Wl,-lpthread,-ldl,-lboost_system-mt,-lboost_filesystem-mt"
-
+	-DCMAKE_EXE_LINKER_FLAGS="-lpthread -lssl -lcrypto -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -llog4cpp" \
+	-DWITH_NSL=ON \
+	-DWITH_CURL=ON \
+	-DWITH_BITTORRENT=ON \
+	-DWITH_JABBER=ON \
+	-DWITH_DOCUMENTATION=ON \
+	-DWITH_WEBINTERFACE=ON \
+	-DWITH_JPLUGINS=ON
 make %{?_smp_mflags}
 
-# build plugins
-
-for plugin in czshare opensubtitles; do
-	cd %{_builddir}/fatrat-${plugin}-%{version}
-	%{cmake} . -DFATRAT_INCLUDE_DIR=%{_builddir}/include
-	make %{?_smp_mflags}
-done
 
 %install
-rm -rf %{buildroot}
-
-# install main application
 make install DESTDIR=%{buildroot}
-
-# update desktop file
-sed -i '/^Categories=/s/Application;//g;/^Icon=/s/\.png$//' %{buildroot}/%{_datadir}/applications/fatrat.desktop
 desktop-file-validate %{buildroot}/%{_datadir}/applications/fatrat.desktop
 
-# install plugins
-for plugin in czshare opensubtitles; do
-	cd %{_builddir}/fatrat-${plugin}-%{version}
-	make install DESTDIR=%{buildroot}
-done
-
-# documentation will be installed by doc macro
-rm -rf %{buildroot}/%{_docdir}
+# install documentation to proper locations
+# (leave symlinks for About dialog)
 
-# fatrat requires documentation in it's datadir
-for file in AUTHORS INSTALL LICENSE README TRANSLATIONS; do
-	rm -f %{buildroot}/%{_datadir}/fatrat/${file}
-	[ $file == INSTALL ] && continue
-	ln -s %{_docdir}/fatrat-%{version}/${file} %{buildroot}/%{_datadir}/fatrat/${file}
+install -d -m 0755 %{buildroot}%{_docdir}/fatrat-%{version}
+for file in AUTHORS LICENSE README TRANSLATIONS; do
+	mv %{buildroot}%{_datadir}/fatrat/${file} %{buildroot}%{_docdir}/fatrat-%{version}/
+	ln -s %{_docdir}/fatrat-%{version}/${file} %{buildroot}%{_datadir}/fatrat/${file}
 done
 
-%clean
-rm -rf %{buildroot}
+# create directory for plugins
+install -d -m 0755 %{buildroot}%{_libdir}/fatrat/plugins
+
 
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS LICENSE README TRANSLATIONS
 %{_bindir}/fatrat
+%{_bindir}/fatrat-conf
 %{_datadir}/fatrat
 %{_mandir}/man1/*
 %{_datadir}/applications/fatrat.desktop
 %{_datadir}/pixmaps/fatrat.png
+%dir %{_libdir}/fatrat
+%dir %{_libdir}/fatrat/plugins
 
 %files devel
 %defattr(-,root,root,-)
 %{_includedir}/fatrat
 
-%files czshare
-%defattr(-,root,root,-)
-%doc ../fatrat-czshare-%{version}/data/TRANSLATIONS
-%{_libdir}/fatrat/plugins/libfatrat-czshare.so
-
-%files opensubtitles
-%defattr(-,root,root,-)
-%doc ../fatrat-opensubtitles-%{version}/data/TRANSLATIONS
-%{_libdir}/fatrat/plugins/libfatrat-opensubtitles.so
 
 %changelog
+* Tue Nov 22 2011 Jan Vcelak <jvcelak at redhat.com> 1.2.0_beta1-1
+- rebase the package:
+  + new AJAX web interface
+  + support for plugins written in Java
+- removed all plugins, will be packaged separately due to diversion
+  in version numbering
+
 * Sun Nov 20 2011 Thomas Spura <tomspur at fedoraproject.org> - 1.1.3-6
 - rebuild for https://fedoraproject.org/wiki/Features/F17Boost148
 
diff --git a/sources b/sources
index c01b671..2ee5b30 100644
--- a/sources
+++ b/sources
@@ -1,3 +1 @@
-bd7467367825960557dd26127535b353  fatrat-czshare-1.1.3.tar.gz
-980a3eb56a835d51f379f193f3b875a5  fatrat-opensubtitles-1.1.3.tar.gz
-6d4a00cdd0b59a05b1521184508d4637  fatrat-1.1.3.tar.gz
+7ce4d5e6318361f36ba5ac86a5755da9  fatrat-1.2.0_beta1.tar.gz


More information about the scm-commits mailing list