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