File xyaku.spec of Package xyaku

#
# spec file for package xyaku (Version 1.4.0)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           xyaku
BuildRequires:  edict ruby xorg-x11 xorg-x11-devel
%define	appdefdir  /usr/share/X11
License:        GPLv2+
Group:          Productivity/Office/Dictionary
Requires:       ruby
AutoReqProv:    on
Summary:        English-Japanese or English-Korean translation program for X11
Version:        1.4.0
Release:        227
Url:            http://home.catv.ne.jp/pp/ginoue/software/xyaku/
Source0:        http://home.catv.ne.jp/pp/ginoue/software/xyaku/xyaku-1.4.0.tar.bz2
Source1:        sample.xyakurc
Patch0:         xyaku-1.3.0-korean.patch
Patch1:         xyaku-1.3.0-dict.patch
Patch2:         xyaku-1.3.0-fhs.patch
Patch3:         fix-implicit-declarations.patch
Patch4:         edict.sh.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
xyaku is an English-Japanese translation program and more under X11.
Furthermore, xyaku is yet another Web search engine front-end.

xyaku can also be used for English-Korean translation.

If you want to use it for English-Korean, please install also the
Korean-English dictionary "engdic" (engdic*.rpm).

If you want to use it for English-Japanese, please install also the
Japanese-English dictionary "edict" (edict*.rpm).

%prep
%setup 
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
cp $RPM_SOURCE_DIR/sample.xyakurc .

%build
# update config.{guess,sub}
%{?suse_update_config:%{suse_update_config}}
libtoolize --force
aclocal
autoconf
automake --add-missing
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" 
./configure --prefix=%{_prefix} \
            --bindir=%{_bindir} \
            --libdir=%{_libdir} \
            --libexecdir=/usr/lib \
            --sysconfdir=%{_sysconfdir} \
            --mandir=%{_mandir} \
            --infodir=%{_infodir} \
            %{_target_cpu}-suse-linux-gnu
make -e

%install
mkdir -p %{buildroot}%{_prefix}/bin
mkdir -p %{buildroot}%{_prefix}/lib/xyaku
mkdir -p %{buildroot}%{appdefdir}/app-defaults
make -e install DESTDIR=$RPM_BUILD_ROOT
install -c -m 644 Xyaku.ad \
	%{buildroot}%{appdefdir}/app-defaults/Xyaku
cp addin/ChangeLog ./ChangeLog-addin
cp addin/ADDIN.txt ./ADDIN.txt

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc README AUTHORS COPYING ChangeLog* INSTALL NEWS TODO ADDIN.txt
%doc sample.xyakurc
%{_bindir}/xyaku
%dir %{_prefix}/lib/xyaku/
%{_prefix}/lib/xyaku/*
%{appdefdir}/app-defaults/Xyaku

%changelog
openSUSE Build Service is sponsored by