%define _mozillapath %{_libdir}/mozilla/plugins %define name djvulibre %define release 4mdk %define version 3.5.14 %define major 14 %define libname %mklibname %{name} %major %define libnamedev %mklibname %{name} %major -d Summary: DjVu viewers, encoders and utilities Name: %{name} Version: %{version} Release: %{release} URL: http://djvu.sourceforge.net/ License: GPL Group: Publishing Source: http://download.sourceforge.net/djvu/%name-%version.tar.bz2 Patch0: djvulibre-3.5.14-rm.patch.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: qt3-devel %description DjVu is a web-centric format and software platform for distributing documents and images. DjVu content downloads faster, displays and renders faster, looks nicer on a screen, and consume less client resources than competing formats. DjVu was originally developed at AT&T Labs-Research by Leon Bottou, Yann LeCun, Patrick Haffner, and many others. In March 2000, AT&T sold DjVu to LizardTech Inc. who now distributes Windows/Mac plug-ins, and commercial encoders (mostly on Windows) In an effort to promote DjVu as a Web standard, the LizardTech management was enlightened enough to release the reference implementation of DjVu under the GNU GPL in October 2000. DjVuLibre (which means free DjVu), is an enhanced version of that code maintained by the original inventors of DjVu. It is compatible with version 3.5 of the LizardTech DjVu software suite. DjVulibre-3.5 contains: - a standalone DjVu viewer based on the Qt library. - A browser plugin that works with most Unix browsers. - A full-fledged wavelet-based compressor for pictures. - A simple compressor for bitonal (black and white) scanned pages. - A compressor for palettized images (a la GIF/PNG). - A set of utilities to manipulate and assemble DjVu images and documents. - A set of decoders to convert DjVu to a number of other formats. - An up-to-date version of the C++ DjVu Reference Library. %package -n %libname Summary: DjVulibre library Group: System/Libraries %description -n %libname Djvulibre libraries %package -n %libnamedev Summary: DjVulibre development files Group: Development/Other Requires: %libname = %version Provides: libdjvulibre-devel %description -n %libnamedev DjVulibre development files. %package browser-plugin Summary: DjVulibre browser plugin Group: Publishing Requires: %name %description browser-plugin A browser plugin that works with most Unix browsers. %prep %setup -q %patch0 -p1 %build %{__autoconf} %configure --enable-shared \ --enable-djview \ --enable-xmltools \ --enable-threads # Don't use %%make here make depend make %install %makeinstall # Quick fix to stop ldconfig from complaining find %{buildroot}%{_libdir} -name "*.so*" -exec chmod 755 {} \; # Quick cleanup of the docs rm -rf doc/CVS 2>/dev/null || : # fix wrong-script-end-of-line-encoding find %{buildroot}%{_datadir}/djvu/osi -type f -name '*.xml' -exec \ %__perl -p -i -e 's|\r\n|\n|g' {} ';' mkdir -p %{buildroot}%{_mozillapath} mv %{buildroot}%{_libdir}/netscape/plugins/nsdejavu.so \ %{buildroot}%{_mozillapath}/ ln -s %{_mozillapath}/nsdejavu.so \ %{buildroot}%{_libdir}/netscape/plugins/nsdejavu.so # remove original menu (sorry) rm -rf %{buildroot}%{_menudir}/* # menu mkdir -p %{buildroot}%{_menudir} cat > %{buildroot}%{_menudir}/%{name} << EOF ?package(%{name}):\ command="%{_bindir}/djview"\ title="DjView"\ longtitle="DjVulibre viewer"\ needs="x11"\ icon="djvu.png"\ section="Office/Publishing" EOF %post %update_menus %post -n %libname -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig %postun %clean_menus %clean rm -rf %{buildroot} %files %defattr(-, root, root) %doc README COPYRIGHT COPYING INSTALL NEWS TODO doc %{_bindir}/* %{_datadir}/djvu %{_mandir}/ja/man1/* %{_mandir}/man1/* %{_menudir}/* %{_datadir}/application-registry/* %{_iconsdir}/hicolor/22x22/mimetypes/* %{_iconsdir}/hicolor/32x32/mimetypes/* %{_iconsdir}/hicolor/48x48/mimetypes/* %{_datadir}/mime-info/* %{_datadir}/mimelnk/image/* %{_datadir}/pixmaps/* %files -n %libname %defattr(-, root, root) %{_libdir}/*.so.* %files -n %libnamedev %defattr(-, root, root) %{_libdir}/*.so %{_libdir}/*.*a %{_includedir}/libdjvu %files browser-plugin %defattr(-, root, root) %{_libdir}/*.so %{_libdir}/netscape/plugins/nsdejavu.so %{_mozillapath}/nsdejavu.so %changelog * Thu Mar 17 2005 David Walluck <walluck@mandrake.com> 3.5.14-4mdk - fix ldconfig location * Wed Mar 16 2005 David Walluck <walluck@mandrake.com> 3.5.14-3mdk - fix summary-ended-with-dot - fix wrong-script-end-of-line-encoding - replace hardcoded paths with the correct macro-based paths * Wed Mar 16 2005 David Walluck <walluck@mandrake.com> 3.5.14-2mdk - rebuild to fix unresolved symbols - use %%configure macro * Thu Aug 26 2004 Lenny Cartier <lenny@mandrakesoft.com> 3.5.14-1mdk - 3.5.14 * Thu May 27 2004 Lenny Cartier <lenny@mandrakesoft.com> 3.5.13-2mdk - browser plugin is back - add link to mozilla plugin path * Mon May 24 2004 Lenny Cartier <lenny@mandrakesoft.com> 3.5.13-1mdk - 3.5.13 * Wed May 12 2004 Lenny Cartier <lenny@mandrakesoft.com> 3.5.12-2mdk - rebuild - remove explicit lib dependency * Mon Sep 01 2003 Lenny Cartier <lenny@mandrakesoft.com> 3.5.12-1mdk - 3.5.12 * Fri Jun 27 2003 Lenny Cartier <lenny@mandrakesoft.com> 3.5.11-1mdk - 3.5.11 * Wed Apr 02 2003 Lenny Cartier <lenny@mandrakesoft.com> 3.5.10-2mdk - separate plugin * Mon Mar 31 2003 Lenny Cartier <lenny@mandrakesoft.com> 3.5.10-1mdk - mandrakized - from Leon Bottou rpm * Thu Feb 6 2003 Leon Bottou <leon@bottou.org> 3.5.10-2 - version 3.5.10-2 * Fri Jan 24 2003 Leon Bottou <leon@bottou.org> 3.5.10-1 - prepared for version 3.5.10 * Wed Oct 9 2002 Leon Bottou <leonb@users.sourceforge.net> 3.5.9-2 - fixed logic for uninstalling nsdejavu links. - copy stuff from the freshrpms spec file. * Sun Oct 6 2002 Leon Bottou <leonb@users.sourceforge.net> 3.5.9-1 - added logic to install nsdejavu for mozilla. * Wed May 29 2002 Leon Bottou <leonb@users.sourceforge.net> 3.5.6-1 - bumped to version 3.5.6-1 * Mon Apr 1 2002 Leon Bottou <leonb@users.sourceforge.net> 3.5.5-2 - changed group to Applications/Publishing * Tue Mar 25 2002 Leon Bottou <leonb@users.sourceforge.net> 3.5.5-2 * Tue Jan 22 2002 Leon Bottou <leonb@users.sourceforge.net> 3.5.4-2 - fixed for properly locating the man directory. * Wed Jan 16 2002 Leon Bottou <leonb@users.sourceforge.net> 3.5.3-1 * Fri Dec 7 2001 Leon Bottou <leonb@users.sourceforge.net> 3.5.2-1 * Wed Dec 5 2001 Leon Bottou <leonb@users.sourceforge.net> 3.5.1-1 - created spec file for rh7.x.