File ebview.spec of Package ebview

#
# spec file for package ebview
#
# 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:           ebview
BuildRequires:  cairo-devel ebdev gtk2-devel update-desktop-files
BuildRequires:  libtool
BuildRequires:  fdupes
License:        GPL-2.0+
Group:          Productivity/Office/Dictionary
PreReq:         %install_info_prereq
Version:        0.3.6
Release:        221
Url:            http://ebview.sourceforge.net/
# original source is gzipped.
Source0:        http://heanet.dl.sourceforge.net/sourceforge/ebview/ebview-0.3.6.tar.bz2
Source1:        %name.desktop
Patch0:         ebview.patch
Patch1:         ebview-fonts.patch
Patch2:         ebview-pangox.patch
Patch3:         ebview-configure.patch
Patch4:         64bit.patch
Patch5:         fix-build.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Electronic Book Viewer: Program for Reading EPWING CD-ROM Dictionaries
# Summary(ja):      EPWING 形式の CD-ROM 辞書を参照するためのプログラムです。
# %description -l ja 
# "Electronic Book Viewer":
# EBView は UNIX 互換 OS 上で CD-ROM 辞書を参照するためのプログラムです。
# 
# 著者:
# ----
#     Kenichi Suto <deep_blue@users.sourceforge.net>
#     Hironori FUJII <fujii@chi.its.hiroshima-cu.ac.jp>

%description
Electronic Book Viewer is a program for reading EPWING CD-ROM
dictionaries.

%prep
%setup0 -q
%patch0 -p 1
%patch1 -p 1 -b .fonts
%patch2
%patch3
%patch4 -p 1
%patch5 -p 1
find . | xargs touch
find . -name "*.html" | xargs chmod a-x
chmod a-x ABOUT-NLS AUTHORS COPYING NEWS README* INSTALL ChangeLog*

%build
# update config.{guess,sub}
%{?suse_update_config:%{suse_update_config}}
rm -f aclocal.m4*
rm -rf autom4te.cache
libtoolize  --force
autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing "
%configure
make %{?_smp_mflags}

%install
make DESTDIR=$RPM_BUILD_ROOT install
pushd doc
    make DESTDIR=$RPM_BUILD_ROOT install
popd
%suse_update_desktop_file -i %name Office Dictionary
%{find_lang} ebview
%if %suse_version > 1020
%fdupes $RPM_BUILD_ROOT
%endif

%files -f ebview.lang
%defattr(-, root, root)
%doc ABOUT-NLS AUTHORS COPYING NEWS README* INSTALL ChangeLog*
/usr/bin/*
/usr/share/applications/%name.desktop
/usr/share/ebview/

%changelog