File minidjvu.spec of Package minidjvu

#
# spec file for package minidjvu
#
# Copyright (c) 2012 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/
#

%define major   0

Name:           minidjvu
Version:        0.8
Release:        0
License:        GPL-2.0
Summary:        Bitonal DjVu Encoder/Decoder
Url:            http://minidjvu.sourceforge.net/
Group:          Productivity/Graphics/Other
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE minidjvu-0.8-gzip.patch lazy.kent@opensuse.org -- gzip manpages in buildroot
Patch0:         minidjvu-0.8-gzip.patch
# PATCH-FIX-OPENSUSE minidjvu-0.8-install.patch lazy.kent@opensuse.org -- fix install options
Patch1:         minidjvu-0.8-install.patch
BuildRequires:  gcc-c++
BuildRequires:  libtiff-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
minidjvu is a command line utility which encodes and decodes single page
black-and-white DjVu files, and can compress multiple pages, taking
advantage from similarities between pages.

%package -n libminidjvu%{major}
Summary:        Bitonal DjVu Encoder/Decoder Library
Group:          System/Libraries

%description -n libminidjvu%{major}
Library for DjVu encoding/decoding black-and-white images.

%package -n libminidjvu-devel
Summary:        Minidjvu Development Files
Group:          Development/Libraries/C and C++
Requires:       libminidjvu%{major} = %{version}

%description -n libminidjvu-devel
Development files for the package minidjvu.

%prep
%setup -q
%patch0
%patch1

%build
%configure --disable-static
# Don't run parallel make because of error!
make

%install
%makeinstall
install -Dm 0644 %{name}.h %{buildroot}%{_includedir}/%{name}.h
for x in $(find ./minidjvu -type f -name "*.h") ; do
    install -Dm 0644 ${x} %{buildroot}%{_includedir}/${x}
done
rm -f %{buildroot}%{_libdir}/libminidjvu.la
%find_lang %{name}

%post -n libminidjvu%{major} -p /sbin/ldconfig

%postun -n libminidjvu%{major} -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING NEWS README
%{_bindir}/%{name}
%doc %{_mandir}/man1/*
%doc %{_mandir}/ru

%files -n libminidjvu%{major}
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files -n libminidjvu-devel
%defattr(-,root,root,-)
%doc doc/{decode.html,encode.html}
%{_libdir}/*.so
%{_includedir}/%{name}
%{_includedir}/%{name}.h

%changelog
openSUSE Build Service is sponsored by