]> git.pld-linux.org Git - packages/calibre.git/blame - calibre.spec
- BR: python-PyQt4-devel-tools
[packages/calibre.git] / calibre.spec
CommitLineData
17e051e1 1#
0d2e0555 2# TODO: - xdg stuff (put desktops and icons in proper place)
5d93136a 3# - rewrite generate-tarball.sh script to provide locales.zip handling (if needed)
b856ebb4 4#
17e051e1 5# NOTE:
6# Upstream packages some unfree fonts which we cannot redistribute,
7# so when upgrading calibre we should download upstream tarball by hand from
3c9d3d2b 8# http://downloads.sourceforge.net/calibre and run generate-tarball.sh script
9# included as SourceX.
17e051e1 10#
02229893 11Summary: E-book converter and library management
cee72504 12Summary(pl.UTF-8): Konwerter oraz biblioteka dla e-booków
0e501b81 13Name: calibre
b0e4d610 14Version: 0.8.10
96b45332 15Release: 1
6d15f615 16License: GPL v3+
02229893 17Group: Applications/Multimedia
23304c7f 18Source0: %{name}-%{version}-nofonts.tar.xz
b0e4d610 19# Source0-md5: 7dc60321f7a10bfb79f3da67aa7943b4
3c9d3d2b 20Source1: generate-tarball.sh
5cf7f03b 21Source2: %{name}-mount-helper
0e501b81 22Patch0: %{name}-prefix.patch
7b500ff7 23Patch1: %{name}-manpages.patch
804e0619 24Patch2: %{name}-no-update.patch
73a1f5ed 25Patch3: %{name}-env_module.patch
f6f5b3d6 26Patch4: %{name}-locales.patch
27Patch5: shebang-python-fix.patch
02229893 28URL: http://www.calibre-ebook.com/
3b8cf9a9 29BuildRequires: ImageMagick-devel >= 6.6.4.7
0e501b81 30BuildRequires: chmlib-devel
212c1324 31BuildRequires: libicu-devel
f0879852 32BuildRequires: pkgconfig
0e501b81 33BuildRequires: podofo-devel
64b69419 34BuildRequires: poppler-Qt-devel
bdbd4238 35BuildRequires: python-BeautifulSoup
307ba398 36BuildRequires: python-PIL
0e501b81 37BuildRequires: python-PyQt4-devel
18642ddc 38BuildRequires: python-PyQt4-devel-tools
7b88f8fb 39BuildRequires: python-cssutils >= 1:0.9.7
307ba398 40BuildRequires: python-dateutil
72cd9da3 41BuildRequires: python-devel >= 1:2.7.1
0e501b81 42BuildRequires: python-lxml
43BuildRequires: python-mechanize
6d15f615 44BuildRequires: python-modules-sqlite
0e501b81 45BuildRequires: python-sip-devel
46BuildRequires: rpm-pythonprov
23304c7f 47BuildRequires: rpmbuild(macros) >= 1.586
ddb4b081 48BuildRequires: sed >= 4.0
212c1324 49BuildRequires: sqlite3-devel
23304c7f 50BuildRequires: tar >= 1:1.22
f6f5b3d6 51BuildRequires: unzip
3c9d3d2b 52BuildRequires: xdg-utils
23304c7f 53BuildRequires: xz >= 1:4.999.7
e27d2bb7 54Requires: ImageMagick-coder-jpeg
0b8a8150 55Requires: ImageMagick-coder-png
82b553c6 56Requires: python-BeautifulSoup
2f356583 57Requires: python-PIL
6d15f615 58Requires: python-cssutils
2f356583 59Requires: python-dateutil
6d15f615 60Requires: python-lxml
61Requires: python-mechanize
62Requires: python-modules-sqlite
0e501b81 63BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65%description
02229893
ER
66Calibre is meant to be a complete e-library solution. It includes
67library management, format conversion, news feeds to ebook conversion
68as well as e-book reader sync features.
69
70Calibre is primarily a ebook cataloging program. It manages your ebook
71collection for you. It is designed around the concept of the logical
72book, i.e. a single entry in the database that may correspond to
73ebooks in several formats. It also supports conversion to and from a
74dozen different ebook formats.
75
76Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML,
77CBR, CBZ, RTF, TXT, PDF and LRS.
0e501b81 78
cee72504 79%description -l pl.UTF-8
80Calibre to bardzo dobry i darmowy program do czytania e-książek.
81
82Calibre umożliwia zarówno czytanie e-książek jak i konwersję wielu
83formatów do ich postaci. Program obsługuje następujące typy plików:
84import: LRF, PDF, LIT, RTF, OPF, MOBI, PRC, EPUB, FB2, IMP, RB i HTML
85eksport: Mobi, LRF i EPUB oraz do aplikacji iPhone-reader i Stanza.
86
87Ten czytnik e-książek oferuje również pobieranie okładek, komiksów i
88najnowszych wiadomości z serwisów poświęconym e-książkom. Twórcy
89dołączyli również aplikację, którą użytkownik może wykorzystać jako
90swój własny serwer darmowych książek.
91
62c1bf99 92%package -n bash-completion-calibre
93Summary: bash-completion for calibre
94Summary(pl.UTF-8): bashowe uzupełnianie nazw dla calibre
95Group: Applications/Shells
96Requires: %{name} = %{version}-%{release}
956f97d9 97Requires: bash-completion
62c1bf99 98
99%description -n bash-completion-calibre
100bash-completion for calibre.
101
102%description -n bash-completion-calibre -l pl.UTF-8
103Pakiet ten dostarcza bashowe uzupełnianie nazw dla calibre.
104
0e501b81 105%prep
106%setup -q -n %{name}
107%patch0 -p1
7b500ff7 108%patch1 -p1
804e0619 109%patch2 -p1
73a1f5ed 110%patch3 -p1
ddb4b081 111%patch4 -p1
f6f5b3d6 112%patch5 -p1
113
933d2d03 114# upstream decides to store locale files in a single zip file but we prefer separate .mo
f6f5b3d6 115mkdir resources/localization/locales
116unzip resources/localization/locales.zip -d resources/localization/locales
117chmod 755 resources/localization/locales/*
933d2d03 118rm -f resources/localization/locales.zip
0e501b81 119
120%build
5c163f25 121%{__python} setup.py build
0e501b81 122
123%install
124rm -rf $RPM_BUILD_ROOT
125
126%{__python} setup.py install \
9c8cebf1 127 --root=$RPM_BUILD_ROOT \
ab1a9c7b 128 --libdir="%{_libdir}"
0e501b81 129
e154a7c1
JP
130%py_ocomp $RPM_BUILD_ROOT%{_libdir}/%{name}
131%py_comp $RPM_BUILD_ROOT%{_libdir}/%{name}
132%py_postclean %{_libdir}/%{name}
133
ddb4b081 134# move manpages and locales to proper place
7b500ff7 135mv $RPM_BUILD_ROOT%{_datadir}/%{name}/man $RPM_BUILD_ROOT%{_mandir}
f6f5b3d6 136mv $RPM_BUILD_ROOT%{_datadir}/%{name}/localization/locales $RPM_BUILD_ROOT%{_datadir}/locale
137
138# set proper filenames for locales (TODO: switch to patch if possible)
933d2d03 139for file in $RPM_BUILD_ROOT%{_datadir}/locale/*; do
140 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\).*:\1:')
141 mkdir $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES
142 mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/*.mo \
143 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES
144done;
f6f5b3d6 145for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/messages.mo; do
146 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
147 mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/messages.mo \
148 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo
149done;
150for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/iso639.mo; do
151 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
152 mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/iso639.mo \
153 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_iso639.mo
154done;
ddb4b081 155
e9035516 156%{__rm} $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall
ddb4b081 157
f6f5b3d6 158# unsupported
159%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/ltg
933d2d03 160%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/en_AU
f6f5b3d6 161
d383d054
MM
162install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}
163
933d2d03 164%find_lang %{name} --all-name
165
0e501b81 166%clean
167rm -rf $RPM_BUILD_ROOT
168
933d2d03 169%files -f %{name}.lang
0e501b81 170%defattr(644,root,root,755)
23304c7f 171%doc Changelog.yaml COPYRIGHT README
172%attr(755,root,root) %{_bindir}/calibre
173%attr(755,root,root) %{_bindir}/calibre-complete
174%attr(755,root,root) %{_bindir}/calibre-customize
175%attr(755,root,root) %{_bindir}/calibre-debug
d383d054 176%attr(755,root,root) %{_bindir}/calibre-mount-helper
23304c7f 177%attr(755,root,root) %{_bindir}/calibre-parallel
178%attr(755,root,root) %{_bindir}/calibre-server
179%attr(755,root,root) %{_bindir}/calibre-smtp
180%attr(755,root,root) %{_bindir}/calibredb
181%attr(755,root,root) %{_bindir}/ebook-convert
182%attr(755,root,root) %{_bindir}/ebook-device
183%attr(755,root,root) %{_bindir}/ebook-meta
184%attr(755,root,root) %{_bindir}/ebook-viewer
185%attr(755,root,root) %{_bindir}/epub-fix
186%attr(755,root,root) %{_bindir}/fetch-ebook-metadata
23304c7f 187%attr(755,root,root) %{_bindir}/lrf2lrs
188%attr(755,root,root) %{_bindir}/lrfviewer
189%attr(755,root,root) %{_bindir}/lrs2lrf
190%attr(755,root,root) %{_bindir}/markdown-calibre
191%attr(755,root,root) %{_bindir}/pdfmanipulate
192%attr(755,root,root) %{_bindir}/web2disk
0e501b81 193%{_datadir}/%{name}
194%{_libdir}/%{name}
7b500ff7 195%{_mandir}/man1/*.1*
62c1bf99 196
197%files -n bash-completion-calibre
198%defattr(644,root,root,755)
199%{_sysconfdir}/bash_completion.d/*
This page took 0.556866 seconds and 4 git commands to generate.