Browse Source

updated calibre

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@5899 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 years ago
parent
commit
0dd737861f
1 changed files with 24 additions and 39 deletions
  1. 24 39
      c/calibre/calibre-vl.spec

+ 24 - 39
c/calibre/calibre-vl.spec

@@ -1,8 +1,8 @@
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 Name:           calibre
-Version:        0.7.50
-Release:        2%{?_dist_release}
+Version:        0.8.41
+Release:        1%{?_dist_release}
 Summary:        E-book converter and library management
 Group:          Applications/Multimedia
 License:        GPLv3
@@ -21,17 +21,18 @@ Source1:        generate-tarball.sh
 Source2:	calibre-mount-helper
 Patch0:         %{name}-manpages.patch
 Patch1:         %{name}-no-update.patch
-#Patch2:         %{name}-0.6.53-mounthelper.patch
+Patch2:		calibre-0.8.21-poppler.patch
+Patch10:	calibre-0.8.41-python27.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
 
-BuildRequires:	python >= 2.6
-BuildRequires:	python-devel >= 2.6
+BuildRequires:	python >= 2.7.1
+BuildRequires:	python-devel >= 2.7.1
 BuildRequires:	ImageMagick-devel >= 6.5.9
 BuildRequires:	python-setuptools
-BuildRequires:	qt4-devel >= 4.6.0
-BuildRequires:  PyQt4-devel >= 4.7.0
+BuildRequires:	qt4-devel >= 4.7.0
+BuildRequires:  PyQt4-devel >= 4.8.2
 BuildRequires:	poppler-qt4-devel >= 0.12
-BuildRequires:	podofo-devel
+BuildRequires:	podofo-devel >= 0.8.2
 BuildRequires:	desktop-file-utils
 BuildRequires:	python-mechanize >= 0.1.1
 BuildRequires:	python-lxml >= 2.2.1
@@ -46,7 +47,7 @@ BuildRequires:	libwmf-devel >= 0.2.8
 BuildRequires:	chmlib-devel >= 0.40
 BuildRequires:  python-cssutils > 0.9.6
 BuildRequires:  sqlite3-devel
-BuildRequires:	libicu-devel
+BuildRequires:	libicu-devel >= 4.4
 
 Requires:	PyQt4
 Requires:	pyPdf
@@ -89,6 +90,12 @@ RTF, TXT, PDF and LRS.
 # don't check for new upstream version (that's what packagers do)
 %patch1 -p1 -b .no-update
 
+# modify poppler checks
+%patch2 -p1 -b .poppler
+
+# use python2.7
+%patch10 -p1 -b .vine
+
 # dos2unix newline conversion
 %{__sed} -i 's/\r//' src/calibre/web/feeds/recipes/*
 
@@ -98,14 +105,13 @@ RTF, TXT, PDF and LRS.
 %{__sed} -i -e '/^#![ ]*\//, 1d' src/calibre/*/*.py
 %{__sed} -i -e '/^#!\//, 1d' src/calibre/*.py
 %{__sed} -i -e '/^#!\//, 1d' src/templite/*.py
-%{__sed} -i -e '/^#!\//, 1d' resources/recipes/*
 %{__sed} -i -e '/^#!\//, 1d' resources/default_tweaks.py
+%{__sed} -i -e '/^#!\//, 1d' resources/catalog/section_list_templates.py
 
 %{__chmod} -x src/calibre/*/*/*/*.py
 %{__chmod} -x src/calibre/*/*/*.py
 %{__chmod} -x src/calibre/*/*.py
 %{__chmod} -x src/calibre/*.py
-%{__chmod} -x resources/recipes/*
 
 %build
 OVERRIDE_CFLAGS="%{optflags}" QMAKE=%{_libdir}/qt4/bin/qmake python setup.py build
@@ -196,35 +202,12 @@ desktop-file-validate \
 # man pages
 %__mv %{buildroot}%{_datadir}/%{name}/man %{buildroot}%{_mandir}
 
-# move locales
-%__mv %{buildroot}%{_datadir}/%{name}/localization/locales \
-    %{buildroot}%{_datadir}/locale
-for file in %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/messages.mo; do
-    lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
-    %__mv %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/messages.mo \
-	%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/%{name}.mo
-done;
-for file in %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/iso639.mo; do
-    lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
-    %__mv %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/iso639.mo \
-	%{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_iso639.mo
-done;
-for file in %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/qt.qm; do
-    lang=$(echo $file|%{__sed} 's:.*locale/\(.*\)/LC_MESSAGES.*:\1:')
-    %__mv $file %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/%{name}_$lang.qm
-done;
-
-%find_lang %{name} --with-qt --all-name
-
-# locales should be looked for in the proper place
-%{__sed} -i -e "s:P('localization/locales:('/usr/share/locale:" \
-	-e "s/messages.mo/calibre.mo/" \
-	-e "s/iso639.mo/calibre_iso639.mo/" \
-	%{buildroot}%{_libdir}/%{name}/%{name}/utils/localization.py
+# delete locales, calibre stores them in a zip file now
+rm -rf %{buildroot}%{_datadir}/%{name}/localization/locales/
 
 %{__rm} -f %{buildroot}%{_bindir}/%{name}-uninstall
 
-%__cp -a %{SOURCE2} %{buildroot}%{_bindir}/
+%__install -m 755 %{SOURCE2} %{buildroot}%{_bindir}/calibre-mount-helper
 
 %clean
 %{__rm} -rf %{buildroot}
@@ -245,7 +228,7 @@ if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
     %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
 fi
 
-%files -f %{name}.lang
+%files
 %defattr(-,root,root,-)
 %doc COPYRIGHT LICENSE Changelog.yaml
 %{_bindir}/calibre
@@ -263,7 +246,6 @@ fi
 %{_bindir}/ebook-viewer
 %{_bindir}/epub-fix
 %{_bindir}/fetch-ebook-metadata
-%{_bindir}/librarything
 %{_bindir}/lrf2lrs
 %{_bindir}/lrfviewer
 %{_bindir}/lrs2lrf
@@ -282,6 +264,9 @@ fi
 %{_mandir}/man1/*
 
 %changelog
+* Sun Mar 11 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.8.41-1
+- new upstream release
+
 * Sun Mar 11 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.50-2
 - rebuild with ImageMagick-6.7.5.10