c24233e
%define githash 83115ad
c24233e
%define gitdate 20100307
c24233e
c24233e
Name:		goldendict
c24233e
Version:	0.9.0
c24233e
Release:	9.%{gitdate}git%{githash}%{?dist}
c24233e
Summary:	A feature-rich dictionary lookup program
c24233e
Group:		Applications/System
c24233e
License:	GPLv3+
c24233e
URL:		http://goldendict.berlios.de/  
c24233e
#Source0:	http://prdownload.berlios.de/goldendict/goldendict-0.9.0-src-x11.tar.bz2 
c24233e
# The source is generated from the git snapshot using the following command
c24233e
# git clone git://git.berlios.de/goldendict
c24233e
# git archive master --prefix=goldendict-`git log --pretty=format:"%h"| head -n1`/ |gzip > goldendict-`git log --pretty=format:"%h"|head -n1`.tar.gz
c24233e
Source0:	%{name}-%{githash}.tar.gz
c24233e
c24233e
# Modify the Icon section in desktop file to comform package guideline.
c24233e
Patch0:		goldendict-desktopicon.patch
c24233e
c24233e
BuildRequires:	qt-devel
c24233e
BuildRequires:	libXtst-devel
c24233e
BuildRequires:	libzip-devel
c24233e
BuildRequires:	hunspell-devel
c24233e
BuildRequires:	libvorbis-devel
c24233e
BuildRequires:	desktop-file-utils
c24233e
BuildRequires:	phonon-devel
c24233e
c24233e
Requires:	kde-filesystem	
c24233e
c24233e
c24233e
%description
c24233e
Goldendict is a feature-rich dictionary lookup program. 
c24233e
The latest release has the following features:
c24233e
Use of WebKit for an accurate articles' representation;
c24233e
Support of multiple dictionary file formats;
c24233e
Support MediaWiki-based sites to perform search;
c24233e
Scan popup functionality.
c24233e
c24233e
%prep
c24233e
%setup -q -n goldendict-%{githash}
c24233e
%patch0 -p0
c24233e
c24233e
c24233e
%build
c24233e
cd src
c24233e
PREFIX=%{_prefix} qmake-qt4
c24233e
make %{?_smp_mflags}
c24233e
c24233e
c24233e
%install
c24233e
rm -rf %{buildroot}
c24233e
cd src
c24233e
make install INSTALL_ROOT=%{buildroot}
c24233e
rm -rf %{buildroot}/%{_datadir}/app-install
c24233e
desktop-file-install					\
c24233e
	--add-category="Utility"			\
c24233e
	--remove-category="Office"			\
c24233e
	--remove-category="Dictionary"			\
c24233e
	--remove-category="Education"			\
c24233e
	--remove-category="Qt"				\
c24233e
	--remove-category="Applications"		\
c24233e
	--delete-original				\
c24233e
	--dir=%{buildroot}/%{_datadir}/applications	\
c24233e
%{buildroot}/%{_datadir}/applications/goldendict.desktop
c24233e
install -d %{buildroot}/%{_datadir}/apps/goldendict/locale
c24233e
install -m 644 locale/*.qm %{buildroot}/%{_datadir}/apps/goldendict/locale
c24233e
c24233e
c24233e
%clean
c24233e
rm -rf %{buildroot}
c24233e
c24233e
c24233e
%files
c24233e
%defattr(-,root,root,-)
c24233e
%doc src/LICENSE.txt
c24233e
%dir %{_datadir}/apps/goldendict/
c24233e
%dir %{_datadir}/apps/goldendict/locale/
c24233e
%{_bindir}/goldendict
c24233e
%{_datadir}/applications/goldendict.desktop
c24233e
%{_datadir}/pixmaps/goldendict.png
c24233e
%{_datadir}/apps/goldendict/locale/*.qm
c24233e
c24233e
c24233e
c24233e
%changelog
c24233e
* Wed Apr 14 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-9
c24233e
- Add kde-filesystem requirement.
c24233e
c24233e
* Fri Apr 11 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-8
c24233e
- Patch the desktop file to conform the guideline.
c24233e
- Clean up the spec file more.
c24233e
c24233e
* Fri Apr 09 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-7
c24233e
- Clean up the spec file.
c24233e
- Add ownership of the missing directories.
c24233e
c24233e
* Mon Mar 15 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-6
c24233e
- Add missing translations.
c24233e
c24233e
* Sun Mar 07 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-5
c24233e
- New upstream git.
c24233e
- Add phonon-devel as build requirement.
c24233e
c24233e
* Sat Feb 06 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-4
c24233e
- New upstream git. Fix some sound problem and scan popup problem.
c24233e
c24233e
* Sat Dec 26 2009 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-3
c24233e
- New upstream git. Fix punctuation indexing problem and audio problems.
c24233e
c24233e
* Thu Dec 10 2009 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-2
c24233e
- Add LICENSE.txt
c24233e
- Change the group to Applications/System
c24233e
c24233e
* Wed Dec 9 2009 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-1
c24233e
- Initial Release
c24233e