SHA256
1
0
forked from pool/stardict
stardict/stardict.spec
andrea florio 4597538d37 Accepting request 30767 from home:xwhu:Factory
Copy from home:xwhu:Factory/stardict via accept of submit request 30767 revision 8.
Request was accepted with message:
Reviewed ok

OBS-URL: https://build.opensuse.org/request/show/30767
OBS-URL: https://build.opensuse.org/package/show/Education/stardict?expand=0&rev=4
2010-02-07 15:49:22 +00:00

253 lines
7.9 KiB
RPMSpec

#
# spec file for package stardict (Version 3.0.1)
#
# Copyright (c) 2008 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: stardict
Summary: A cross-platform and internationalized dictionary
Version: 3.0.1
Release: 59
License: GPL v2 or later
Group: Productivity/Office/Dictionary
Url: http://stardict.sourceforge.net
Source0: %{name}-%{version}.tar.bz2
Source1: stardict.desktop
Source2: stardict-rpmlintrc
Source3: ru.po
Source4: lt.po
Source5: LINGUAS
Patch0: stardict-2.4.8-dont-install-omf.patch
Patch1: stardict-3.0.1-festival.h-path-fix.patch
Patch2: stardict-3.0.1-includes.patch
Patch3: stardict-transparent_trayicon.patch
Patch4: configure-festival.diff
Patch5: stardict-gucharmap.patch
Patch6: fix_gethostbynamer.patch
Patch7: stardict-3.0.1-gcc44.patch
Requires: enchant festival espeak pulseaudio
BuildRequires: gcc-c++ gnome-common intltool libgnomeui-devel perl-XML-Parser scrollkeeper sgml-skel
BuildRequires: gucharmap-devel update-desktop-files
# new in version 3.x: festival and espeak support
BuildRequires: enchant-devel festival-devel libsigc++2-devel
%if 0%{?suse_version} > 1020
BuildRequires: fdupes
%gconf_schemas_prereq
%if 0%{?suse_version} > 1100
BuildRequires: espeak-devel
%else
BuildRequires: espeak
%endif
%else
%define prefix /opt/gnome
%define sysconfdir /etc%{prefix}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
StarDict is a Cross-Platform and international dictionary written in
Gtk2.
It has powerful features such as "Glob-style pattern matching", "Scan
selection word","Fuzzy query" etc.
Authors:
--------
Maintainers:
Hu Zheng <huzheng_001@163.com> http://forlinux.yeah.net
Contributors:
Alex Murygin <murygin@aitoc.com>
%prep
%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5
%patch6 -p1
%patch7 -p1
# Remove unneeded sigc++ header files to make it sure
# that we are using system-wide libsigc++
find src/sigc++* -name \*.h -or -name \*.cc | xargs rm -f
cp %{SOURCE3} po/
cp %{SOURCE4} po/
cp %{SOURCE5} po/
%build
autoreconf -fi
%configure \
--disable-schemas-install \
%if 0%{?suse_version} < 1110
--disable-gucharmap \
%endif
--disable-advertisement \
--disable-updateinfo
%{__make} %{?jobs:-j%jobs}
%install
%if 0%{?suse_version} < 1030
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%endif
%makeinstall
find %buildroot%{_libdir}/stardict/plugins -name "*.la" -print0 | xargs -0 rm -rf {} \;
%find_lang %{name}
%if 0%{?suse_version} > 1020
%find_gconf_schemas
cat %{name}.lang %{name}.schemas_list >%{name}.lst
%else
%{__install} -d -m755 %buildroot%{sysconfdir}/gconf/schemas/
%{__mv} %buildroot%{_sysconfdir}/gconf/schemas/stardict.schemas %buildroot%{sysconfdir}/gconf/schemas/
cat %{name}.lang >%{name}.lst
%endif
install -D -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_datadir}/applications/stardict.desktop
%suse_update_desktop_file stardict Office Dictionary
# save space, create symlinks for identical files
%if 0%{?suse_version} > 1020
%fdupes -s %buildroot
%endif
%clean
rm -rf %buildroot
%if 0%{?suse_version} > 1020
%pre -f %{name}.schemas_pre
# Remove orphan file created by stardict.spec in SuSE <= 10.2.
# Can be removed after openSUSE 10.3.
if [ -f var/adm/SuSEconfig/run-scrollkeeper-update ]; then
rm -f var/adm/SuSEconfig/run-scrollkeeper-update 2>/dev/null
fi
%posttrans -f %{name}.schemas_posttrans
%preun -f %{name}.schemas_preun
%else
%post
export GCONF_CONFIG_SOURCE=`opt/gnome/bin/gconftool-2 --get-default-source`
opt/gnome/bin/gconftool-2 --makefile-install-rule %{sysconfdir}/gconf/schemas/stardict.schemas >/dev/null
touch var/adm/SuSEconfig/run-scrollkeeper-update
%endif
%files -f %{name}.lst
%defattr(-,root,root)
%doc %{_mandir}/man?/*.*
%doc doc/FAQ doc/HACKING doc/HowToCreateDictionary README AUTHORS COPYING TODO
%{_libdir}/bonobo/servers/*
%{_libdir}/stardict
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/idl
%{_datadir}/omf
%{_datadir}/pixmaps/*.png
%{_datadir}/stardict
%if 0%{?suse_version} < 1030
%dir %{_libdir}/bonobo
%dir %{_libdir}/bonobo/servers
%dir %{_datadir}/gnome
%dir %{_datadir}/gnome/help
%config %{sysconfdir}/gconf/schemas/stardict.schemas
%endif
%changelog
* Mon Sep 29 2008 lrupp@suse.de
- fix build on distributions with old Gucharmap library
* Wed Sep 17 2008 lrupp@suse.de
- fix buildrequires
- mark stardict.schemas as %%config
* Thu Jul 10 2008 maw@suse.de
- Add stardict-gucharmap.patch and run autoreconf -fi to reenable
gucharmap functionality.
* Thu Jul 10 2008 xwhu@suse.de
- fix configure.in for festival
* Sat Jun 28 2008 xwhu@suse.de
- disable gucharmap due to API change
* Tue Jan 29 2008 lrupp@suse.de
- fix some compiler issues with gcc4.3:
stardict-3.0.1-includes.patch
- remove unneeded sigc++ header
- added stardict-transparent_trayicon.patch from Fedora
Tue Jan 22 23:58:45 MSK 2008 kirill.kirillov@gmail.com
- removed annoying adware
(--disable-advertisement)
Sat Jan 12 23:00:00 MSK 2008 kirill.kirillov@gmail.com
- update to 3.0.1
+ dictdotcn plugin was added
+ wordnet plugin was added
+ regex query support was added
+ QQWry plugin was added
+ many other changes were made
- added stardict-3.0.1-festival.h-path-fix.patch
- added separate stardict.desktop source
* Wed Oct 31 2007 lrupp@suse.de
- update to 3.0.0
+ Network dictionaries support.
+ Plugin system.
+ Full-text translation.
+ Pronounce word by TTS engine.
+ Preliminary WikiPedia dictionary support.
+ More powerful dictionary management.
+ Babylon dictionaries convertion.
+ Many other changes.
- removed upstreamed stardict-2.4.8-private_function.patch
* Mon Oct 29 2007 xwhu@novell.com
- Fix header files compatibility issues with gcc 4.3
* Thu Oct 11 2007 sbrabec@suse.cz
- Removed bogus dependency on mDNSResponder.
* Mon Jun 18 2007 lrupp@suse.de
- update to 2.4.8
+ KingSoft PowerWord support
+ Synonym support
+ Sort word list by collate function support
+ dictionaries from XDXF project available for stardict, too
+ cfdict dictionary support
+ Full-text search
+ Evgeniy's patches for special character search and other changes
+ Export word or text to file, thanks Mao-Yuan Kao
+ Pango text markup language support
+ Sparse wordoffset index: This make StarDict's memory usage
become very low
+ Add new tools: stardict_verify, treedict2dir, tabfile
+ added many dictionaries and translations
- adapt patches
- added stardict-2.4.8-private_function.patch
- remove provides %%{name} = 2.4
- use fdupes to save space
- fixed desktop file: works now on other windowmanagers, too
- use more macros in specfile and allow builds on older distris
- added documentation files
* Thu Jun 07 2007 sbrabec@suse.cz
- Removed invalid desktop Category "Application" (#254654).
* Thu Mar 15 2007 sbrabec@suse.cz
- Fixed schemas installation, spec file cleanup (#254850).
* Mon Mar 12 2007 anonymous@anonymous
- Use gconf_schemas_prereq
* Mon Jan 08 2007 ro@suse.de
- fix localstatedir
* Mon Jan 08 2007 ro@suse.de
- GNOME moved to /usr
* Sat Oct 07 2006 aj@suse.de
- Cleanup BuildRequires.
- Build with RPM_OPT_FLAGS.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 11 2006 xwhu@novell.com
- Initial build of 2.4.5