]> git.pld-linux.org Git - packages/calibre.git/blame - calibre.spec
- drop calibre-uninstall binary
[packages/calibre.git] / calibre.spec
CommitLineData
17e051e1 1#
2# NOTE:
3# Upstream packages some unfree fonts which we cannot redistribute,
4# so when upgrading calibre we should download upstream tarball by hand from
3c9d3d2b 5# http://downloads.sourceforge.net/calibre and run generate-tarball.sh script
6# included as SourceX.
17e051e1 7#
02229893 8Summary: E-book converter and library management
0e501b81 9Name: calibre
10Version: 0.6.53
bdbd4238 11Release: 0.1
6d15f615 12License: GPL v3+
02229893 13Group: Applications/Multimedia
17e051e1 14Source0: %{name}-%{version}-nofonts.tar.bz2
08290bfe 15# Source0-md5: 7ed89159bbd97db0d2dcf850bb1dd867
3c9d3d2b 16Source1: generate-tarball.sh
0e501b81 17Patch0: %{name}-prefix.patch
7b500ff7 18Patch1: %{name}-manpages.patch
804e0619 19Patch2: %{name}-no-update.patch
73a1f5ed 20Patch3: %{name}-env_module.patch
ddb4b081 21Patch4: %{name}-locales.patch
02229893 22URL: http://www.calibre-ebook.com/
0e501b81 23BuildRequires: ImageMagick-devel
24BuildRequires: chmlib-devel
25BuildRequires: podofo-devel
26BuildRequires: poppler-Qt-devel
bdbd4238 27BuildRequires: python-BeautifulSoup
307ba398 28BuildRequires: python-PIL
0e501b81 29BuildRequires: python-PyQt4-devel
30BuildRequires: python-cssutils
307ba398 31BuildRequires: python-dateutil
0e501b81 32BuildRequires: python-lxml
33BuildRequires: python-mechanize
6d15f615 34BuildRequires: python-modules-sqlite
0e501b81 35BuildRequires: python-sip-devel
36BuildRequires: rpm-pythonprov
ddb4b081 37BuildRequires: rpmbuild(find_lang) >= 1.23
38BuildRequires: sed >= 4.0
3c9d3d2b 39BuildRequires: xdg-utils
2f356583 40Requires: python-PIL
6d15f615 41Requires: python-cssutils
2f356583 42Requires: python-dateutil
6d15f615 43Requires: python-lxml
44Requires: python-mechanize
45Requires: python-modules-sqlite
0e501b81 46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
02229893
ER
49Calibre is meant to be a complete e-library solution. It includes
50library management, format conversion, news feeds to ebook conversion
51as well as e-book reader sync features.
52
53Calibre is primarily a ebook cataloging program. It manages your ebook
54collection for you. It is designed around the concept of the logical
55book, i.e. a single entry in the database that may correspond to
56ebooks in several formats. It also supports conversion to and from a
57dozen different ebook formats.
58
59Supported input formats are: MOBI, LIT, PRC, EPUB, CHM, ODT, HTML,
60CBR, CBZ, RTF, TXT, PDF and LRS.
0e501b81 61
62%prep
63%setup -q -n %{name}
64%patch0 -p1
7b500ff7 65%patch1 -p1
804e0619 66%patch2 -p1
73a1f5ed 67%patch3 -p1
ddb4b081 68%patch4 -p1
0e501b81 69
70%build
5c163f25 71%{__python} setup.py build
0e501b81 72
73%install
74rm -rf $RPM_BUILD_ROOT
75
76%{__python} setup.py install \
9c8cebf1 77 --root=$RPM_BUILD_ROOT \
5c163f25 78 --libdir="%{_libdir}"
0e501b81 79
ddb4b081 80# move manpages and locales to proper place
7b500ff7 81mv $RPM_BUILD_ROOT%{_datadir}/%{name}/man $RPM_BUILD_ROOT%{_mandir}
ddb4b081 82mv $RPM_BUILD_ROOT%{_datadir}/%{name}/localization/locales $RPM_BUILD_ROOT%{_datadir}/locale
83
f927ac4b 84# set proper filenames for locales (TODO: switch to patch if possible)
ddb4b081 85for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/messages.mo; do
86 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
87 mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/messages.mo \
88 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo
89done;
90for file in $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/iso639.mo; do
91 lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
92 mv $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/iso639.mo \
93 $RPM_BUILD_ROOT%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_iso639.mo
94done;
95
96# unsupported?
97rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/qt.qm
f927ac4b 98rm -f $RPM_BUILD_ROOT%{_bindir}/%{name}-uninstall
ddb4b081 99
100%find_lang %{name} --all-name
7b500ff7 101
0e501b81 102%clean
103rm -rf $RPM_BUILD_ROOT
104
ddb4b081 105%files -f %{name}.lang
0e501b81 106%defattr(644,root,root,755)
107%doc COPYRIGHT README
108%attr(755,root,root) %{_bindir}/*
109%{_datadir}/%{name}
110%{_libdir}/%{name}
7b500ff7 111%{_mandir}/man1/*.1*
This page took 0.639496 seconds and 4 git commands to generate.