X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=calibre.spec;h=b131121bb80eb9c6d9080551917c45df3d266eb5;hb=872559af798b9973be11184b3e5bb2c1917b43e7;hp=92f73be1efe1b59ea5038bd0860f7c15d2a07e3f;hpb=6d15f615eb4a014e6402f9b22a6f4884adc1aa0d;p=packages%2Fcalibre.git diff --git a/calibre.spec b/calibre.spec index 92f73be..b131121 100644 --- a/calibre.spec +++ b/calibre.spec @@ -1,29 +1,56 @@ -# TODO -# - Upstream packages some unfree fonts which we cannot redistribute - use -# tarball from fc or rip their script. +# +# TODO: - xdg stuff (put desktops and icons in proper place) +# +# NOTE: +# Upstream packages some unfree fonts which we cannot redistribute, +# so when upgrading calibre we should download upstream tarball by hand from +# http://downloads.sourceforge.net/calibre and run generate-tarball.sh script +# included as SourceX. +# Summary: E-book converter and library management +Summary(pl.UTF-8): Konwerter oraz biblioteka dla e-booków Name: calibre -Version: 0.6.53 -Release: 0.1 +Version: 0.7.42 +Release: 1 License: GPL v3+ Group: Applications/Multimedia -Source0: http://status.calibre-ebook.com/dist/src/%{name}-%{version}.tar.gz -# Source0-md5: 42255d2eb55d1a047d74d3dbb0d0f355 +Source0: %{name}-%{version}-nofonts.tar.xz +# Source0-md5: 818ea85266429cdbde29650f21cc190d +Source1: generate-tarball.sh Patch0: %{name}-prefix.patch +Patch1: %{name}-manpages.patch +Patch2: %{name}-no-update.patch +Patch3: %{name}-env_module.patch +Patch4: %{name}-locales.patch URL: http://www.calibre-ebook.com/ -BuildRequires: ImageMagick-devel +BuildRequires: ImageMagick-devel >= 6.6.4.7 BuildRequires: chmlib-devel +BuildRequires: libicu-devel +BuildRequires: pkgconfig BuildRequires: podofo-devel BuildRequires: poppler-Qt-devel BuildRequires: python-BeautifulSoup +BuildRequires: python-PIL BuildRequires: python-PyQt4-devel -BuildRequires: python-cssutils +BuildRequires: python-cssutils >= 1:0.9.7 +BuildRequires: python-dateutil BuildRequires: python-lxml BuildRequires: python-mechanize BuildRequires: python-modules-sqlite BuildRequires: python-sip-devel BuildRequires: rpm-pythonprov +BuildRequires: rpmbuild(macros) >= 1.586 +BuildRequires: sed >= 4.0 +BuildRequires: sqlite3-devel +BuildRequires: tar >= 1:1.22 +BuildRequires: xdg-utils +BuildRequires: xz >= 1:4.999.7 +Requires: ImageMagick-coder-jpeg +Requires: ImageMagick-coder-png +Requires: python-BeautifulSoup +Requires: python-PIL Requires: python-cssutils +Requires: python-dateutil Requires: python-lxml Requires: python-mechanize Requires: python-modules-sqlite @@ -43,9 +70,38 @@ dozen different ebook formats. Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML, CBR, CBZ, RTF, TXT, PDF and LRS. +%description -l pl.UTF-8 +Calibre to bardzo dobry i darmowy program do czytania e-książek. + +Calibre umożliwia zarówno czytanie e-książek jak i konwersję wielu +formatów do ich postaci. Program obsługuje następujące typy plików: +import: LRF, PDF, LIT, RTF, OPF, MOBI, PRC, EPUB, FB2, IMP, RB i HTML +eksport: Mobi, LRF i EPUB oraz do aplikacji iPhone-reader i Stanza. + +Ten czytnik e-książek oferuje również pobieranie okładek, komiksów i +najnowszych wiadomości z serwisów poświęconym e-książkom. Twórcy +dołączyli również aplikację, którą użytkownik może wykorzystać jako +swój własny serwer darmowych książek. + +%package -n bash-completion-calibre +Summary: bash-completion for calibre +Summary(pl.UTF-8): bashowe uzupełnianie nazw dla calibre +Group: Applications/Shells +Requires: %{name} = %{version}-%{release} + +%description -n bash-completion-calibre +bash-completion for calibre. + +%description -n bash-completion-calibre -l pl.UTF-8 +Pakiet ten dostarcza bashowe uzupełnianie nazw dla calibre. + %prep %setup -q -n %{name} %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %{__python} setup.py build @@ -54,14 +110,64 @@ CBR, CBZ, RTF, TXT, PDF and LRS. rm -rf $RPM_BUILD_ROOT %{__python} setup.py install \ - --root=$RPM_BUILD_ROOT + --root=$RPM_BUILD_ROOT \ + --libdir="%{_libdir}" + +# move manpages and locales to proper place +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/man $RPM_BUILD_ROOT%{_mandir} +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/localization/locales $RPM_BUILD_ROOT%{_datadir}/locale + +# set proper filenames for locales (TODO: switch to patch if possible) +for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/messages.mo; do + lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:') + mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/messages.mo \ + $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo +done; +for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/iso639.mo; do + lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:') + mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/iso639.mo \ + $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_iso639.mo +done; +for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/qt.qm; do + lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:') + mv $file $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.$lang.qm +done; + +%{__rm} $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall + +%find_lang %{name} --all-name --with-qm %clean rm -rf $RPM_BUILD_ROOT -%files +%files -f %{name}.lang %defattr(644,root,root,755) -%doc COPYRIGHT README -%attr(755,root,root) %{_bindir}/* +%doc Changelog.yaml COPYRIGHT README +%attr(755,root,root) %{_bindir}/calibre +%attr(755,root,root) %{_bindir}/calibre-complete +%attr(755,root,root) %{_bindir}/calibre-customize +%attr(755,root,root) %{_bindir}/calibre-debug +%attr(755,root,root) %{_bindir}/calibre-parallel +%attr(755,root,root) %{_bindir}/calibre-server +%attr(755,root,root) %{_bindir}/calibre-smtp +%attr(755,root,root) %{_bindir}/calibredb +%attr(755,root,root) %{_bindir}/ebook-convert +%attr(755,root,root) %{_bindir}/ebook-device +%attr(755,root,root) %{_bindir}/ebook-meta +%attr(755,root,root) %{_bindir}/ebook-viewer +%attr(755,root,root) %{_bindir}/epub-fix +%attr(755,root,root) %{_bindir}/fetch-ebook-metadata +%attr(755,root,root) %{_bindir}/librarything +%attr(755,root,root) %{_bindir}/lrf2lrs +%attr(755,root,root) %{_bindir}/lrfviewer +%attr(755,root,root) %{_bindir}/lrs2lrf +%attr(755,root,root) %{_bindir}/markdown-calibre +%attr(755,root,root) %{_bindir}/pdfmanipulate +%attr(755,root,root) %{_bindir}/web2disk %{_datadir}/%{name} %{_libdir}/%{name} +%{_mandir}/man1/*.1* + +%files -n bash-completion-calibre +%defattr(644,root,root,755) +%{_sysconfdir}/bash_completion.d/*