Blob Blame History Raw
%define githash 83115ad
%define gitdate 20100307

Name:		goldendict
Version:	0.9.0
Release:	9.%{gitdate}git%{githash}%{?dist}
Summary:	A feature-rich dictionary lookup program
Group:		Applications/System
License:	GPLv3+
URL:		http://goldendict.berlios.de/  
#Source0:	http://prdownload.berlios.de/goldendict/goldendict-0.9.0-src-x11.tar.bz2 
# The source is generated from the git snapshot using the following command
# git clone git://git.berlios.de/goldendict
# git archive master --prefix=goldendict-`git log --pretty=format:"%h"| head -n1`/ |gzip > goldendict-`git log --pretty=format:"%h"|head -n1`.tar.gz
Source0:	%{name}-%{githash}.tar.gz

# Modify the Icon section in desktop file to comform package guideline.
Patch0:		goldendict-desktopicon.patch

BuildRequires:	qt-devel
BuildRequires:	libXtst-devel
BuildRequires:	libzip-devel
BuildRequires:	hunspell-devel
BuildRequires:	libvorbis-devel
BuildRequires:	desktop-file-utils
BuildRequires:	phonon-devel

Requires:	kde-filesystem	


%description
Goldendict is a feature-rich dictionary lookup program. 
The latest release has the following features:
Use of WebKit for an accurate articles' representation;
Support of multiple dictionary file formats;
Support MediaWiki-based sites to perform search;
Scan popup functionality.

%prep
%setup -q -n goldendict-%{githash}
%patch0 -p0


%build
cd src
PREFIX=%{_prefix} qmake-qt4
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
cd src
make install INSTALL_ROOT=%{buildroot}
rm -rf %{buildroot}/%{_datadir}/app-install
desktop-file-install					\
	--add-category="Utility"			\
	--remove-category="Office"			\
	--remove-category="Dictionary"			\
	--remove-category="Education"			\
	--remove-category="Qt"				\
	--remove-category="Applications"		\
	--delete-original				\
	--dir=%{buildroot}/%{_datadir}/applications	\
%{buildroot}/%{_datadir}/applications/goldendict.desktop
install -d %{buildroot}/%{_datadir}/apps/goldendict/locale
install -m 644 locale/*.qm %{buildroot}/%{_datadir}/apps/goldendict/locale


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc src/LICENSE.txt
%dir %{_datadir}/apps/goldendict/
%dir %{_datadir}/apps/goldendict/locale/
%{_bindir}/goldendict
%{_datadir}/applications/goldendict.desktop
%{_datadir}/pixmaps/goldendict.png
%{_datadir}/apps/goldendict/locale/*.qm



%changelog
* Wed Apr 14 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-9
- Add kde-filesystem requirement.

* Fri Apr 11 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-8
- Patch the desktop file to conform the guideline.
- Clean up the spec file more.

* Fri Apr 09 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-7
- Clean up the spec file.
- Add ownership of the missing directories.

* Mon Mar 15 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-6
- Add missing translations.

* Sun Mar 07 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-5
- New upstream git.
- Add phonon-devel as build requirement.

* Sat Feb 06 2010 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-4
- New upstream git. Fix some sound problem and scan popup problem.

* Sat Dec 26 2009 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-3
- New upstream git. Fix punctuation indexing problem and audio problems.

* Thu Dec 10 2009 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-2
- Add LICENSE.txt
- Change the group to Applications/System

* Wed Dec 9 2009 Howard Ning <mrlhwliberty@gmail.com> - 0.9.0-1
- Initial Release