+#
+# Conditional build:
+%bcond_without qt # disable qt wrapper
+#
Summary: DjVu viewers, encoders and utilities
Summary(pl): DjVu - przegl±darki, dekodery oraz narzêdzia
Name: djvulibre
-Version: 3.5.12
+Version: 3.5.14
Release: 2
License: GPL
Group: Applications/Graphics
Source0: http://dl.sourceforge.net/djvu/%{name}-%{version}.tar.gz
-# Source0-md5: 4adeb92beb8295aa330b9c6b042ba02d
+# Source0-md5: 4a3f17603468b2e6969190be18bf00d0
Patch0: %{name}-opt.patch
Patch1: %{name}-nostrip.patch
+Patch2: %{name}-desktop.patch
URL: http://djvu.sourceforge.net/
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: libjpeg-devel
BuildRequires: libstdc++-devel
-BuildRequires: qt-devel >= 3.0.5
+%{?with_qt:BuildRequires: qt-devel >= 3.0.5}
Obsoletes: djvu
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
i narzêdzi do plików w formacie DjVu. Przegl±darka oraz wtyczki do
przegl±darek znajduj± siê w innych podpakietach.
+%package devel
+Summary: Header file for DjVu library
+Summary(pl): Plik nag³ówkowy biblioteki DjVu
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: libjpeg-devel
+Requires: libstdc++-devel
+
+%description devel
+Header file for DjVu library.
+
+%description devel -l pl
+Plik nag³ówkowy biblioteki DjVu.
+
%package djview
Summary: Qt-based DjVu viewer
Summary(pl): Oparta o Qt przegl±darka DjVu
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
cp -f /usr/share/automake/config.sub config
-%{__aclocal}
+%{__aclocal} -I config -I gui/desktop
%{__autoconf}
QT_LIBS="-L%{_libdir} -lqt-mt"; export QT_LIBS
QT_CFLAGS="-I%{_includedir}/qt"; export QT_CFLAGS
-%configure
+%configure \
+ PTHREAD_LIBS="-lpthread"
-%{__make} depend
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{mozdir},%{nsdir}}
+# pass dtop_* to allow build w/o gnome/kde/etc. installed
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
-
-mv -f $RPM_BUILD_ROOT%{_libdir}/netscape/plugins/nsdejavu.so \
- $RPM_BUILD_ROOT%{mozdir}
+ DESTDIR=$RPM_BUILD_ROOT \
+ plugindir=%{mozdir} \
+ dtop_applications=%{_desktopdir} \
+ dtop_icons=%{_iconsdir} \
+ dtop_mimelnk=%{_datadir}/mimelnk \
+ dtop_applnk= \
+ dtop_pixmaps=%{_pixmapsdir} \
+ dtop_mime_info= \
+ dtop_application_registry=
+
+%if %{with qt}
cp -f $RPM_BUILD_ROOT%{mozdir}/nsdejavu.so $RPM_BUILD_ROOT%{nsdir}
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/[!d]*
%attr(755,root,root) %{_bindir}/d[!j]*
%attr(755,root,root) %{_bindir}/djv[!i]*
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_mandir}/man1/[!d]*
+%attr(755,root,root) %{_libdir}/libdjvulibre.so.*.*.*
+%{_mandir}/man1/[!dn]*
%{_mandir}/man1/d[!j]*
%{_mandir}/man1/djv[!i]*
+%lang(ja) %{_mandir}/ja/man1/[!dn]*
+%lang(ja) %{_mandir}/ja/man1/d[!j]*
+%lang(ja) %{_mandir}/ja/man1/djv[!i]*
%dir %{_datadir}/djvu
%{_datadir}/djvu/languages.xml
%dir %{_datadir}/djvu/osi
-%lang(zh) %{_datadir}/djvu/osi/Chinese_PRC
-%lang(de) %{_datadir}/djvu/osi/de_DE
+%lang(de) %{_datadir}/djvu/osi/de
%{_datadir}/djvu/osi/en
-%lang(fr) %{_datadir}/djvu/osi/fr_FR
-%lang(ja) %{_datadir}/djvu/osi/ja_JP
+%lang(fr) %{_datadir}/djvu/osi/fr
+%lang(ja) %{_datadir}/djvu/osi/ja
+%lang(zh) %{_datadir}/djvu/osi/zh
+%{_datadir}/djvu/pubtext
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libdjvulibre.so
+%{_libdir}/libdjvulibre.la
+%{_includedir}/libdjvu
+%if %{with qt}
%files djview
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/djview
%{_mandir}/man1/djview.1*
+%lang(ja) %{_mandir}/ja/man1/djview.1*
+%{_datadir}/mimelnk/image/x-djvu.desktop
+%{_desktopdir}/djview.desktop
+%{_iconsdir}/hicolor/*/mimetypes/djvu.png
+%{_pixmapsdir}/djvu.png
%files -n mozilla-plugin-%{name}
%defattr(644,root,root,755)
%attr(755,root,root) %{mozdir}/*.so
+%{_mandir}/man1/nsdejavu.1*
+%lang(ja) %{_mandir}/ja/man1/nsdejavu.1*
%files -n netscape-plugin-%{name}
%defattr(644,root,root,755)
%attr(755,root,root) %{nsdir}/*.so
+%endif