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