HHu ZhengInit!
b0ae4a8e创建于 3 天前历史提交
%define name	@PACKAGE@
%define version @VERSION@


Name:		%{name}
Summary: 	A powerful dictionary platform written in GTK
Version:	%{version}
Release:	1%{?dist}
Group: 		Applications/System
License: 	GPLv3
URL: 		http://stardict-4.sourceforge.net
Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires: libgnome >= 2.2.0
Requires: libgnomeui >= 2.2.0
Requires: libbonobo >= 2.2.0
Requires: bonobo-activation >= 2.2.0
BuildRequires: libgnomeui-devel >= 2.2.0, scrollkeeper, gettext, perl-XML-Parser
Requires(post): GConf2, scrollkeeper
Requires(postun): scrollkeeper

Requires: libsigc++20 >= 2.0.17
BuildRequires: libsigc++20-devel

Requires: gucharmap
BuildRequires: gucharmap-devel
Requires: espeak
BuildRequires: espeak-devel
Requires: enchant
BuildRequires: enchant-devel
Requires: festival, speech-tools
BuildRequires: festival-devel, speech-tools-devel

%description
StarDict is a Cross-Platform and international dictionary written in Gtk.
It has powerful features such as "Glob-style pattern matching,"
"Scan selection word," "Fuzzy query," etc.

%prep
%setup -q

%build

%configure --disable-schemas-install
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
/bin/rm -f `find $RPM_BUILD_ROOT%{_libdir}/stardict/plugins -name "*.la"`
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/stardict
%{_datadir}/applications/*.desktop
%{_datadir}/stardict
%{_libdir}/stardict
%{_datadir}/idl/*
%{_libdir}/bonobo/servers/*.server
%{_datadir}/pixmaps/stardict.png
%{_sysconfdir}/gconf/schemas/*.schemas
%{_datadir}/omf/*
%{_mandir}/man1/*
%doc %{_datadir}/gnome/help/stardict
%doc README COPYING ChangeLog AUTHORS doc/FAQ doc/HACKING doc/HowToCreateDictionary doc/StarDictFileFormat doc/Translation


%post
GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/stardict.schemas >/dev/null
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi

%postun
if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi