1%define name @PACKAGE@ 2%define version @VERSION@ 3 4Name: %{name} 5Summary: A powerful dictionary platform written in GTK 6Version: %{version} 7Release: 1%{?dist} 8Group: Applications/System 9License: GPLv3 10URL: http://www.stardict.org 11Source0: http://stardict-3.googlecode.com/files/%{name}-%{version}.tar.bz2 12BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 13 14Requires: gtk2, enchant, espeak, libbonobo, libgnome, libsigc++20 >= 2.0.17 15#Requires: gucharmap, festival, speech-tools 16Requires(preun): GConf2 17Requires(post): GConf2, scrollkeeper 18Requires(postun): scrollkeeper 19 20BuildRequires: desktop-file-utils, gettext, intltool, perl-XML-Parser, scrollkeeper 21BuildRequires: gtk2-devel, enchant-devel, espeak-devel, libbonobo-devel, libgnome-devel, libsigc++20-devel 22#BuildRequires: gucharmap-devel, festival-devel, speech-tools-devel 23 24 25%description 26StarDict is a Cross-Platform and international dictionary written in Gtk. 27It has powerful features such as "Glob-style pattern matching," 28"Scan selection word," "Fuzzy query," etc. 29 30%prep 31%setup -q 32 33%build 34%configure --disable-schemas-install --disable-gucharmap --disable-dictdotcn --disable-festival --disable-tools 35make -k %{_smp_mflags} 36 37%install 38rm -rf $RPM_BUILD_ROOT 39make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install 40rm -f `find $RPM_BUILD_ROOT%{_libdir}/stardict/plugins -name "*.la"` 41%find_lang %{name} 42 43%clean 44rm -rf $RPM_BUILD_ROOT 45 46 47%files -f %{name}.lang 48%defattr(-, root, root) 49%{_bindir}/stardict 50%{_datadir}/applications/*.desktop 51%{_datadir}/stardict 52%{_libdir}/stardict 53%{_datadir}/idl/* 54%{_libdir}/bonobo/servers/*.server 55%{_datadir}/pixmaps/stardict.png 56%{_sysconfdir}/gconf/schemas/*.schemas 57%{_datadir}/omf/* 58%{_mandir}/man1/* 59%doc %{_datadir}/gnome/help/stardict 60%doc dict/README COPYING dict/ChangeLog dict/AUTHORS dict/doc/FAQ dict/doc/HACKING dict/doc/HowToCreateDictionary dict/doc/StarDictFileFormat dict/doc/Translation 61 62 63%preun 64if [ "$1" -gt 1 ] ; then 65 export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/stardict.schemas >/dev/null || : 66fi 67 68%post 69GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/stardict.schemas >/dev/null || : 70if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi 71 72%postun 73if which scrollkeeper-update>/dev/null 2>&1; then scrollkeeper-update; fi 74 75