[packages/djview4] - updated to 4.10.5 - updated link patch, removed outdated desktop patch - binary is now named just

qboosh qboosh at pld-linux.org
Sun Jan 10 11:24:25 CET 2016


commit acb8c8859768064619ca38deac8aaf9ef417aa01
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jan 10 11:26:29 2016 +0100

    - updated to 4.10.5
    - updated link patch, removed outdated desktop patch
    - binary is now named just djview
    - added qt5 bcond

 djview4-desktop.patch | 27 --------------
 djview4-link.patch    | 23 ++++++------
 djview4.spec          | 97 ++++++++++++++++++++++++++++++++++++---------------
 3 files changed, 80 insertions(+), 67 deletions(-)
---
diff --git a/djview4.spec b/djview4.spec
index 89ad9e8..2b2ee7a 100644
--- a/djview4.spec
+++ b/djview4.spec
@@ -1,46 +1,73 @@
-Summary:	DjVu viewer based on Qt4
-Summary(hu.UTF-8):	DjVu nézegető Qt4 alapon
-Summary(pl.UTF-8):	Przeglądarka DjVu oparta na Qt4
+#
+# Conditional build:
+%bcond_with	qt5	# Qt 5 instead of Qt 4
+#
+Summary:	DjVu viewer based on Qt 4+
+Summary(hu.UTF-8):	DjVu nézegető Qt 4+ alapon
+Summary(pl.UTF-8):	Przeglądarka DjVu oparta na Qt 4+
 Name:		djview4
-Version:	4.9
+Version:	4.10.5
 Release:	1
 License:	GPL v2+
 Group:		X11/Applications/Graphics
 Source0:	http://downloads.sourceforge.net/djvu/djview-%{version}.tar.gz
-# Source0-md5:	0390cb133ffc7d3054f2184629e5b336
+# Source0-md5:	ae6c5b9b7292558d024eb21e8769bd03
 Patch0:		%{name}-opt.patch
-Patch1:		%{name}-desktop.patch
 Patch2:		%{name}-link.patch
 URL:		http://djvu.sourceforge.net/
-BuildRequires:	QtGui-devel >= 4.4
-BuildRequires:	QtNetwork-devel >= 4.4
 BuildRequires:	autoconf >= 2.67
-BuildRequires:	automake
+BuildRequires:	automake >= 1.6
 BuildRequires:	djvulibre-devel >= 3.5.19
+# rsvg tool
+BuildRequires:	librsvg
 BuildRequires:	libstdc++-devel
 BuildRequires:	libtiff-devel
 BuildRequires:	libtool >= 2:2.0
 BuildRequires:	pkgconfig
-BuildRequires:	qt4-build >= 4.0
-BuildRequires:	qt4-linguist
-BuildRequires:	qt4-qmake >= 4.0
-BuildRequires:	rpmbuild(macros) >= 1.357
-BuildRequires:	xorg-lib-libXt-devel
+BuildRequires:	rpmbuild(macros) >= 1.596
+BuildRequires:	xorg-lib-libX11-devel
+%if %{with qt5}
+BuildRequires:	Qt5Core-devel >= 5
+BuildRequires:	Qt5Gui-devel >= 5
+BuildRequires:	Qt5Network-devel >= 5
+BuildRequires:	Qt5OpenGL-devel >= 5
+BuildRequires:	Qt5PrintSupport-devel >= 5
+BuildRequires:	Qt5Widgets-devel >= 5
+BuildRequires:	qt5-build >= 5
+BuildRequires:	qt5-linguist >= 5
+BuildRequires:	qt5-qmake >= 5
+%else
+BuildRequires:	QtCore-devel >= 4.4
+BuildRequires:	QtGui-devel >= 4.4
+BuildRequires:	QtNetwork-devel >= 4.4
+BuildRequires:	QtOpenGL-devel >= 4.4
+BuildRequires:	qt4-build >= 4.4
+BuildRequires:	qt4-linguist >= 4.4
+BuildRequires:	qt4-qmake >= 4.4
+%endif
+Requires(post,postun):	desktop-file-utils
+Requires(post,postun):	gtk-update-icon-cache
+%if %{without qt5}
+Requires:	QtGui >= 4.4
+Requires:	QtNetwork >= 4.4
+Requires:	QtOpenGL >= 4.4
+%endif
 Requires:	djvulibre >= 3.5.19
+Requires:	hicolor-icon-theme
 Obsoletes:	djvulibre-djview
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 DjView4 is a viewer and browser plugin for DjVu documents, based on
-the DjVuLibre-3.5 library and the Qt4 toolkit.
+the DjVuLibre-3.5 library and the Qt 4+ toolkit.
 
 %description -l hu.UTF-8
 DjView4 egy nézegető és böngésző plugin DjVu dokumentumokhoz, a
-DjVuLibre-3.5 könyvtárra és a Qt4 készletre épülve.
+DjVuLibre-3.5 könyvtárra és a Qt 4+ készletre épülve.
 
 %description -l pl.UTF-8
 DjView4 to przeglądarka i wtyczka dla przeglądarek do oglądania
-dokumentów DjVu, oparta na bibliotece DjVuLibre-3.5 i toolkicie Qt4.
+dokumentów DjVu, oparta na bibliotece DjVuLibre-3.5 i toolkicie Qt 4+.
 
 %package -n browser-plugin-%{name}
 Summary:	DjView4 browser plugin
@@ -69,22 +96,27 @@ DjView4 plugin Mozilla és Mozilla-alapú böngészőkhöz.
 Wtyczka DjView4 do przeglądarek zgodnych z Mozillą.
 
 %prep
-%setup -q -n djview4-%{version}
+%setup -q -n djview-%{version}
 %patch0 -p1
-%patch1 -p1
 %patch2 -p1
 
 %build
-%{__rm} config/{libtool,lt*}.m4
 %{__libtoolize}
 %{__aclocal} -I config
 %{__autoconf}
+%{__autoheader}
+%{__automake}
+%if %{with qt5}
+export QTDIR=%{_libdir}/qt5
+%else
 export QTDIR=%{_libdir}/qt4
-%configure
+%endif
+%configure \
+	--disable-silent-rules
+# --enable-npdjvu - new experimental plugin?
 
 %{__make} \
-	CXX="%{__cxx}" \
-	LFLAGS="%{rpmldflags}"
+	V=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -92,14 +124,21 @@ install -d $RPM_BUILD_ROOT%{_browserpluginsdir}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT \
-	plugindir=%{_browserpluginsdir}
+	pluginsdir=%{_browserpluginsdir}
 
-rm -f $RPM_BUILD_ROOT%{_mandir}/man1/djview.1
-echo '.so djview4.1' > $RPM_BUILD_ROOT%{_mandir}/man1/djview.1
+%{__rm} $RPM_BUILD_ROOT%{_browserpluginsdir}/nsdejavu.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+%update_desktop_database_post
+%update_icon_cache hicolor
+
+%postun
+%update_desktop_database_postun
+%update_icon_cache hicolor
+
 %post -n browser-plugin-%{name}
 %update_browser_plugins
 
@@ -112,19 +151,19 @@ fi
 %defattr(644,root,root,755)
 %doc COPYRIGHT NEWS README
 %attr(755,root,root) %{_bindir}/djview
-%attr(755,root,root) %{_bindir}/djview4
 %{_mandir}/man1/djview.1*
-%{_mandir}/man1/djview4.1*
 %dir %{_datadir}/djvu/djview4
 %lang(cs) %{_datadir}/djvu/djview4/djview_cs.qm
 %lang(de) %{_datadir}/djvu/djview4/djview_de.qm
+%lang(es) %{_datadir}/djvu/djview4/djview_es.qm
 %lang(fr) %{_datadir}/djvu/djview4/djview_fr.qm
 %lang(ru) %{_datadir}/djvu/djview4/djview_ru.qm
 %lang(uk) %{_datadir}/djvu/djview4/djview_uk.qm
 %lang(zh_CN) %{_datadir}/djvu/djview4/djview_zh_cn.qm
 %lang(zh_TW) %{_datadir}/djvu/djview4/djview_zh_tw.qm
 %{_desktopdir}/djvulibre-djview4.desktop
-%{_iconsdir}/hicolor/32x32/apps/djvulibre-djview4.png
+%{_iconsdir}/hicolor/*x*/mimetypes/djvulibre-djview4.png
+%{_iconsdir}/hicolor/scalable/mimetypes/djvulibre-djview4.svgz
 
 %files -n browser-plugin-%{name}
 %defattr(644,root,root,755)
diff --git a/djview4-desktop.patch b/djview4-desktop.patch
deleted file mode 100644
index 2f7526a..0000000
--- a/djview4-desktop.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- djview4-4.5/desktopfiles/Makefile.in.orig	2009-02-19 17:51:51.000000000 +0100
-+++ djview4-4.5/desktopfiles/Makefile.in	2010-02-12 08:47:57.000000000 +0100
-@@ -38,7 +38,8 @@
- RM = @RM@
- 
- datadir_djview = ${datadir}/djvu/djview4/desktop
--
-+desktopdir = /usr/share/applications
-+iconsdir = /usr/share/icons
- 
- # -------- all
- 
-@@ -68,11 +69,9 @@
- install: install-djview-files 
- 
- install-djview-files: FORCE
--	${INSTALL} -d ${DESTDIR}${datadir_djview}
--	${INSTALL_PROGRAM} register-djview-menu ${DESTDIR}${datadir_djview}
--	${INSTALL_DATA} *djview4.png ${DESTDIR}${datadir_djview}
--	${INSTALL_DATA} *djview4.svgz ${DESTDIR}${datadir_djview}
--	${INSTALL_PROGRAM} ${srcdir}/*djview4.desktop ${DESTDIR}${datadir_djview}
-+	${INSTALL} -d ${DESTDIR}${desktopdir} ${DESTDIR}${iconsdir}/hicolor/32x32/apps
-+	${INSTALL_DATA} ${srcdir}/hi32-djview4.png ${DESTDIR}${iconsdir}/hicolor/32x32/apps/djvulibre-djview4.png
-+	${INSTALL_DATA} ${srcdir}/djvulibre-djview4.desktop ${DESTDIR}${desktopdir}/djvulibre-djview4.desktop
- 	- at echo "Run ${datadir_djview}/register-djview-menu install"
- 	- at echo " to register the djview3 menu entries."
- 
diff --git a/djview4-link.patch b/djview4-link.patch
index 7acd0f8..f7c4cd3 100644
--- a/djview4-link.patch
+++ b/djview4-link.patch
@@ -1,11 +1,12 @@
---- djview4-4.0/nsdejavu/Makefile.in.orig	2007-01-04 21:30:03.000000000 +0100
-+++ djview4-4.0/nsdejavu/Makefile.in	2007-02-04 23:58:23.980228808 +0100
-@@ -48,7 +48,7 @@
- 
- CFLAGS = @CPPFLAGS@ ${OPTS} ${INCS} ${NSDEJAVU_CFLAGS} 
- 
--LIBS = @LDFLAGS@ ${NSDEJAVU_LIBS} 
-+LIBS = @LDFLAGS@ ${NSDEJAVU_LIBS} -lXt -lX11
- 
- all: nsdejavu.la nsdejavu.x nsdejavu.1
- 
+--- djview-4.10.5/configure.ac.orig	2016-01-04 22:11:06.000000000 +0100
++++ djview-4.10.5/configure.ac	2016-01-10 09:25:05.260257215 +0100
+@@ -261,6 +261,9 @@
+         *-darwin* | *-macos10*)
+             NSDEJAVU_LIBS="$GLIB_LIBS $XT_LIBS"
+             ;;
++        *)
++            NSDEJAVU_LIBS="-lX11"
++            ;;
+     esac
+     AC_SUBST(NSDEJAVU_CFLAGS)
+     AC_SUBST(NSDEJAVU_LIBS)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/djview4.git/commitdiff/acb8c8859768064619ca38deac8aaf9ef417aa01



More information about the pld-cvs-commit mailing list