|
@@ -1,8 +1,7 @@
|
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
-%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
|
|
Name: deluge
|
|
|
-Version: 1.3.1
|
|
|
+Version: 1.3.3
|
|
|
Release: 1%{?_dist_release}
|
|
|
Summary: A GTK+ BitTorrent client with support for DHT, UPnP, and PEX
|
|
|
Summary(ja): DHT・UPnP・PEX をサポートした GTK+ BitTorrent クライアント
|
|
@@ -10,12 +9,13 @@ Group: Applications/Internet
|
|
|
License: GPLv3 with exceptions
|
|
|
URL: http://deluge-torrent.org/
|
|
|
|
|
|
-Source0: http://download.deluge-torrent.org/source/%{version}/%{name}-%{version}.tar.gz
|
|
|
+Source0: http://download.deluge-torrent.org/source/%{version}/%{name}-%{version}.tar.lzma
|
|
|
+Source1: deluge-daemon-init
|
|
|
|
|
|
## The scalable icon needs to be installed to the proper place.
|
|
|
Patch0: %{name}-scalable-icon-dir.diff
|
|
|
Patch1: 010_new_release_check.patch
|
|
|
-Patch10: workaround_build.patch
|
|
|
+Patch10: workaround_build.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
BuildArch: noarch
|
|
@@ -26,20 +26,19 @@ BuildRequires: python-setuptools
|
|
|
## The build script checks for the libtorrent module and skips compiling the
|
|
|
## in-tarball one if this is found.
|
|
|
BuildRequires: libtorrent-rasterbar-python >= 0.14.9
|
|
|
+BuildRequires: intltool
|
|
|
|
|
|
-Requires: gnome-python
|
|
|
-## Required for the proper ownership of icon dirs.
|
|
|
-Requires: hicolor-icon-theme
|
|
|
-Requires: notify-python
|
|
|
-Requires: pygtk2-libglade
|
|
|
-Requires: pyOpenSSL
|
|
|
-Requires: python-chardet
|
|
|
-Requires: python-mako
|
|
|
-Requires: python-setuptools
|
|
|
-Requires: python-simplejson
|
|
|
-Requires: python-twisted
|
|
|
-Requires: pyxdg
|
|
|
-Requires: libtorrent-rasterbar-python >= 0.14.9
|
|
|
+## add Requires to make into Meta package
|
|
|
+Requires: %{name}-common = %{version}-%{release}
|
|
|
+Requires: %{name}-gtk = %{version}-%{release}
|
|
|
+Requires: %{name}-images = %{version}-%{release}
|
|
|
+Requires: %{name}-console = %{version}-%{release}
|
|
|
+Requires: %{name}-web = %{version}-%{release}
|
|
|
+Requires: %{name}-daemon = %{version}-%{release}
|
|
|
+
|
|
|
+# removal of flags
|
|
|
+Provides: deluge-flags = %{version}-%{release}
|
|
|
+Obsoletes: deluge-flags < 1.3.1-3
|
|
|
|
|
|
%description
|
|
|
Deluge is a new BitTorrent client, created using Python and GTK+. It is
|
|
@@ -52,31 +51,106 @@ GNOME や Xfce のような Linux の GTK+ デスクトップ環境にネイテ
|
|
|
クライアントを提供することを意図しています。
|
|
|
|
|
|
|
|
|
-%package flags
|
|
|
-Summary: Country flags for peer location display in Deluge
|
|
|
-Group: Applications/Internet
|
|
|
-License: GPLv3
|
|
|
-Requires: %{name} = %{version}-%{release}
|
|
|
-
|
|
|
-%description flags
|
|
|
-The %{name}-flags package contains optional country flags which are used to
|
|
|
-display the location of peers in the "Peers" information tab.
|
|
|
+%package common
|
|
|
+Summary: Files common to Deluge sub packages
|
|
|
+Summary(ja): Deluge サブパッケージに共通するファイル
|
|
|
+Group: Applications/Internet
|
|
|
+License: GPLv3 with exceptions
|
|
|
+Requires: python-setuptools
|
|
|
+Requires: pyOpenSSL
|
|
|
+Requires: python-chardet
|
|
|
+Requires: python-simplejson
|
|
|
+Requires: pyxdg
|
|
|
+Requires: libtorrent-rasterbar-python >= 0.14.9
|
|
|
+Requires: python-twisted
|
|
|
+
|
|
|
+%description common
|
|
|
+Common files needed by the Deluge bittorrent client sub packages
|
|
|
+
|
|
|
+%package gtk
|
|
|
+Summary: The gtk UI to Deluge
|
|
|
+Summary(ja): Deluge の gtk ユーザーインターフェイス
|
|
|
+Group: Applications/Internet
|
|
|
+License: GPLv3 with exceptions
|
|
|
+Requires: %{name}-common = %{version}-%{release}
|
|
|
+Requires: %{name}-images = %{version}-%{release}
|
|
|
+Requires: %{name}-daemon = %{version}-%{release}
|
|
|
+Requires: gnome-python
|
|
|
+## Required for the proper ownership of icon dirs.
|
|
|
+Requires: hicolor-icon-theme
|
|
|
+Requires: notify-python
|
|
|
+Requires: pygtk2-libglade
|
|
|
+
|
|
|
+%description gtk
|
|
|
+Deluge bittorent client GTK graphical user interface
|
|
|
+
|
|
|
+%package images
|
|
|
+Summary: Image files for Deluge
|
|
|
+Summary(ja): Deluge の画像ファイル
|
|
|
+Group: Applications/Internet
|
|
|
+License: GPLv3 with exceptions
|
|
|
+
|
|
|
+%description images
|
|
|
+Data files used by the GTK and web user interface for Deluge bittorent client
|
|
|
+
|
|
|
+%package console
|
|
|
+Summary: CLI to Deluge
|
|
|
+Summary(ja): Deluge のコマンドラインインターフェイス
|
|
|
+Group: Applications/Internet
|
|
|
+License: GPLv3 with exceptions
|
|
|
+Requires: %{name}-common = %{version}-%{release}
|
|
|
+Requires: %{name}-daemon = %{version}-%{release}
|
|
|
+
|
|
|
+%description console
|
|
|
+Deluge bittorent client command line interface
|
|
|
+
|
|
|
+%package web
|
|
|
+Summary: Web interface to Deluge
|
|
|
+Summary(ja): Deluge の Web インターフェイス
|
|
|
+Group: Applications/Internet
|
|
|
+License: GPLv3 with exceptions
|
|
|
+Requires: python-mako
|
|
|
+Requires: %{name}-common = %{version}-%{release}
|
|
|
+Requires: %{name}-images = %{version}-%{release}
|
|
|
+Requires: %{name}-daemon = %{version}-%{release}
|
|
|
+
|
|
|
+%description web
|
|
|
+Deluge bittorent client web interface
|
|
|
+
|
|
|
+%package daemon
|
|
|
+Summary: The Deluge daemon
|
|
|
+Summary(ja): Deluge デーモン
|
|
|
+Group: Applications/Internet
|
|
|
+License: GPLv3 with exceptions
|
|
|
+Requires: %{name}-common = %{version}-%{release}
|
|
|
+Requires(pre): shadow-utils
|
|
|
+Requires(post): chkconfig
|
|
|
+Requires(preun): chkconfig
|
|
|
+Requires(preun): initscripts
|
|
|
+Requires(postun): initscripts
|
|
|
+
|
|
|
+%description daemon
|
|
|
+Files for the Deluge daemon
|
|
|
|
|
|
|
|
|
%prep
|
|
|
%setup -qn "%{name}-%{version}"
|
|
|
-#%patch0 -p0 -b .fix-scalable-icon-dir
|
|
|
+%patch0 -p0 -b .fix-scalable-icon-dir
|
|
|
%patch1 -p1
|
|
|
-%patch10 -p1
|
|
|
+#%patch10 -p1
|
|
|
|
|
|
|
|
|
%build
|
|
|
CFLAGS="%{optflags}" %{__python} setup.py build
|
|
|
|
|
|
-
|
|
|
%install
|
|
|
rm -rf %{buildroot}
|
|
|
+mkdir -p %{buildroot}%{_initddir}
|
|
|
+install -m755 %{SOURCE1} %{buildroot}%{_initddir}/%{name}-daemon
|
|
|
+mkdir -p %{buildroot}/var/lib/%{name}
|
|
|
+
|
|
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
+
|
|
|
desktop-file-install --vendor vine \
|
|
|
--dir %{buildroot}%{_datadir}/applications \
|
|
|
--copy-name-to-generic-name \
|
|
@@ -93,70 +167,138 @@ desktop-file-install --vendor vine \
|
|
|
## cannot (unfortunately) call find-lang directly since it's not on a
|
|
|
## "$PREFIX/share/locale/"-ish directory tree.
|
|
|
pushd %{buildroot}
|
|
|
- find -type f -o -type l \
|
|
|
- | sed '
|
|
|
- s:%{buildroot}%{python_sitelib}::
|
|
|
- s:^\.::
|
|
|
- s:\(.*/deluge/i18n/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
|
|
|
- s:^\([^%].*\)::
|
|
|
- s:%lang(C) ::
|
|
|
- /^$/d' \
|
|
|
- > %{name}.filelist
|
|
|
-
|
|
|
-## We've got the .mo files now; but we need the rest of the files in those
|
|
|
-## dirs. We can't just glob in the %%files, as that would add duplicate
|
|
|
-## entries for the .mo files which we've already marked with appropriate
|
|
|
-## %%lang-fu.
|
|
|
- find ./%{python_sitelib}/%{name} -not -iname '%{name}.mo' -type f \
|
|
|
- | grep -v 'pixmaps/flags' | sed -e 's:^\./::' -e 's| |*|g' >> %{name}.filelist
|
|
|
- find ./%{python_sitelib}/%{name} -type d | grep -v 'pixmaps/flags' \
|
|
|
- | sed 's:^\./:%%dir :' >> %{name}.filelist
|
|
|
+ find -type f -o -type l \
|
|
|
+ | sed '
|
|
|
+ s:%{buildroot}%{python_sitelib}::
|
|
|
+ s:^\.::
|
|
|
+ s:\(.*/deluge/i18n/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
|
|
|
+ s:^\([^%].*\)::
|
|
|
+ s:%lang(C) ::
|
|
|
+ /^$/d' \
|
|
|
+ > %{name}.lang
|
|
|
|
|
|
## Now we move that list back to our sources, so that '%%files -f' can find it
|
|
|
## properly.
|
|
|
-popd && mv %{buildroot}/%{name}.filelist .
|
|
|
-
|
|
|
+popd && mv %{buildroot}/%{name}.lang .
|
|
|
+
|
|
|
+#fix non exec script errors in two files
|
|
|
+for lib in "%{buildroot}%{python_sitelib}/%{name}/ui/web/gen_gettext.py" "%{buildroot}%{python_sitelib}/%{name}/ui/Win32IconImagePlugin.py" ; do
|
|
|
+ sed '/\/usr\/bin/d' $lib > $lib.new &&
|
|
|
+ touch -r $lib $lib.new &&
|
|
|
+ mv $lib.new $lib
|
|
|
+done
|
|
|
+
|
|
|
+#Removing unneeded .order files.
|
|
|
+rm -f %{buildroot}%{python_sitelib}/%{name}/ui/web/js/deluge-all/.order
|
|
|
+rm -f %{buildroot}%{python_sitelib}/%{name}/ui/web/js/deluge-all/add/.order
|
|
|
+rm -f %{buildroot}%{python_sitelib}/%{name}/ui/web/js/deluge-all/data/.order
|
|
|
+rm -f %{buildroot}%{python_sitelib}/%{name}/ui/web/js/deluge-all/.build
|
|
|
+rm -f %{buildroot}%{python_sitelib}/%{name}/ui/web/js/deluge-all/.build_data
|
|
|
|
|
|
%clean
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
|
-%files -f %{name}
|
|
|
-%defattr(-,root,root,-)
|
|
|
+%files
|
|
|
+
|
|
|
+%files common -f %{name}.lang
|
|
|
%doc ChangeLog LICENSE README
|
|
|
-%{python_sitelib}/
|
|
|
+%{python_sitelib}/%{name}-%{version}-py?.?.egg-info/
|
|
|
+
|
|
|
+%dir %{python_sitelib}/%{name}
|
|
|
+%{python_sitelib}/%{name}/*.py*
|
|
|
+%{python_sitelib}/%{name}/plugins
|
|
|
+%{python_sitelib}/%{name}/core
|
|
|
+
|
|
|
+%dir %{python_sitelib}/%{name}/ui
|
|
|
+%{python_sitelib}/%{name}/ui/*.py*
|
|
|
+
|
|
|
+# includes %%name.pot too
|
|
|
+%dir %{python_sitelib}/%{name}/i18n
|
|
|
+%dir %{python_sitelib}/%{name}/i18n/*
|
|
|
+%dir %{python_sitelib}/%{name}/i18n/*/LC_MESSAGES
|
|
|
+
|
|
|
+%files images
|
|
|
+# only pixmaps dir is in data so I own it all
|
|
|
+%{python_sitelib}/%{name}/data
|
|
|
+# if someone decides to only install images
|
|
|
+%dir %{python_sitelib}/%{name}
|
|
|
+%{_datadir}/icons/hicolor/*/apps/%{name}.*
|
|
|
+%{_datadir}/pixmaps/%{name}.*
|
|
|
+
|
|
|
+%files gtk
|
|
|
%{_bindir}/%{name}
|
|
|
-%{_bindir}/%{name}-*
|
|
|
-%{_bindir}/%{name}d
|
|
|
+%{_bindir}/%{name}-gtk
|
|
|
%{_datadir}/applications/vine-%{name}.desktop
|
|
|
-%{_datadir}/pixmaps/%{name}.*
|
|
|
-%{_datadir}/icons/hicolor/*/apps/%{name}.*
|
|
|
-%{_datadir}/icons/scalable/apps/
|
|
|
-%{_mandir}/man?/%{name}*
|
|
|
+%{python_sitelib}/%{name}/ui/gtkui
|
|
|
+%{_mandir}/man?/%{name}-gtk*
|
|
|
+%{_mandir}/man?/%{name}.1*
|
|
|
+
|
|
|
+%files console
|
|
|
+%{_bindir}/%{name}-console
|
|
|
+%{python_sitelib}/%{name}/ui/console
|
|
|
+%{_mandir}/man?/%{name}-console*
|
|
|
+
|
|
|
+%files web
|
|
|
+%{_bindir}/%{name}-web
|
|
|
+%{python_sitelib}/%{name}/ui/web
|
|
|
+%{_mandir}/man?/%{name}-web*
|
|
|
+
|
|
|
+%files daemon
|
|
|
+%{_bindir}/%{name}d
|
|
|
+%{_initddir}/%{name}-daemon
|
|
|
+%attr(-,%{name}, %{name})/var/lib/%{name}/
|
|
|
+%{_mandir}/man?/%{name}d*
|
|
|
+
|
|
|
+%pre daemon
|
|
|
+getent group %{name} >/dev/null || groupadd -r %{name}
|
|
|
+getent passwd %{name} >/dev/null || \
|
|
|
+useradd -r -g %{name} -d /var/lib/%{name} -s /sbin/nologin \
|
|
|
+ -c "deluge daemon account" %{name}
|
|
|
+exit 0
|
|
|
|
|
|
-%files flags
|
|
|
-%defattr(-,root,root,-)
|
|
|
-%doc LICENSE
|
|
|
-%{python_sitelib}/%{name}/data/pixmaps/flags/
|
|
|
|
|
|
+%post daemon
|
|
|
+/sbin/chkconfig --add %{name}-daemon
|
|
|
|
|
|
-%post
|
|
|
-update-desktop-database &>/dev/null ||:
|
|
|
-touch --no-create %{_datadir}/icons/hicolor
|
|
|
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
|
|
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
|
|
|
+%post gtk
|
|
|
+update-desktop-database &> /dev/null || :
|
|
|
+
|
|
|
+%post images
|
|
|
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
+
|
|
|
+%preun daemon
|
|
|
+if [ $1 = 0 ] ; then
|
|
|
+ /sbin/service %{name}-daemon stop >/dev/null 2>&1
|
|
|
+ /sbin/chkconfig --del %{name}-daemon
|
|
|
+fi
|
|
|
+
|
|
|
+%postun daemon
|
|
|
+if [ "$1" -ge "1" ] ; then
|
|
|
+ /sbin/service %{name}-daemon condrestart >/dev/null 2>&1 || :
|
|
|
fi
|
|
|
|
|
|
+%postun gtk
|
|
|
+update-desktop-database &> /dev/null || :
|
|
|
|
|
|
-%postun
|
|
|
-update-desktop-database &> /dev/null ||:
|
|
|
-touch --no-create %{_datadir}/icons/hicolor
|
|
|
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
|
|
|
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:
|
|
|
+%postun images
|
|
|
+if [ $1 -eq 0 ] ; then
|
|
|
+ touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
|
|
+ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
fi
|
|
|
|
|
|
+%posttrans images
|
|
|
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
+
|
|
|
|
|
|
%changelog
|
|
|
+* Wed Sep 21 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.3.3-1
|
|
|
+- new upstream release
|
|
|
+- splitted -common, -gtk, -images, -console, -web, -daemon packages
|
|
|
+ - imported source1 from Fedora develoment
|
|
|
+- changed source archive
|
|
|
+- added BuildRequires: intltool
|
|
|
+
|
|
|
* Sat Dec 25 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.3.1-1
|
|
|
- new upstream release
|
|
|
- added patch10 to work around building problem
|