File djvulibre-djview4.spec of Package djvulibre-djview4
#
# spec file for package djvulibre-djview4
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: djvulibre-djview4
BuildRequires: gcc-c++ glibc-devel libdjvulibre-devel libjpeg-devel libqt4-devel >= 4.1 libtiff-devel update-desktop-files xorg-x11-devel
License: GPLv2+
Group: Productivity/Graphics/Other
Version: 4.7
Release: 1
Url: http://djvu.sourceforge.net
Summary: Portable DjVu Qt4 Based Viewer and Browser Plugin
Source: djview-%{version}.tar.bz2
# This patch is Suse specific.
Patch1: djview4-nsplugin_manpage.patch
# This patch is Suse specific.
Patch2: djview4-nsplugin_dir.patch
Requires: djvulibre >= 3.5.18
Conflicts: djvulibre-djview3
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
DjView4 is a viewer and browser plugin for DjVu documents,based on the
DjVuLibre-3.5 library and the Qt4 toolkit.
%prep
%setup -n djview-%{version}
%patch1
%patch2
%build
#export NSDEJAVU_CFLAGS="$RPM_OPT_FLAGS"
%configure
# --x-includes=/usr/include/ \
# --x-libraries=/usr/%{_lib}/ \
make NSDEJAVU_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
#mkdir -p $RPM_BUILD_ROOT/%{_libdir}/browser-plugins/
#mv $RPM_BUILD_ROOT/%{_libdir}/netscape/plugins/nsdejavu.so $RPM_BUILD_ROOT/%{_libdir}/browser-plugins/nsdejavu.so
#rm -rf $RPM_BUILD_ROOT/%{_libdir}/netscape/
# Installing desktop file and icons in this section is more sane
# then in %post section as author intended because of SuSE translation
# process and little less pain with getting those scripts working
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
install -m 644 desktopfiles/hi32-djview4.png $RPM_BUILD_ROOT/usr/share/pixmaps/djvulibre-djview4.png
%suse_update_desktop_file -i djvulibre-djview4 Qt Graphics Viewer
%files
%defattr(-,root,root)
%doc COPYING COPYRIGHT NEWS README README_translations
%doc %{_mandir}/man1/*
%{_bindir}/djview4
%{_bindir}/djview
%{_datadir}/djvu/djview4/
%{_libdir}/browser-plugins/nsdejavu.so
%{_datadir}/pixmaps/djvulibre-djview4.png
%{_prefix}/share/applications/djvulibre-djview4.desktop
%dir %{_datadir}/djvu/
#%{_prefix}/share/icons/hicolor/48x48/mimetypes/djvu.png
%changelog