Name: kchmviewer
Version: 5.2
Release: 3%{?dist}
Summary: CHM viewer
Group: Applications/Publishing
License: GPLv3+
URL: http://www.kchmviewer.net/
Source0: http://downloads.sourceforge.net/kchmviewer/kchmviewer-%{version}.tar.gz
# Instead of using the version of kio_msits.so provided by this package, we use
# the one from kdegraphics
Patch1: kchmviewer-5.1-no_msits.patch
# add missed source files to src/CMakeLists.txt
# applied in upstream svn363
Patch2: kchmviewer-5.2-missed-src.patch
BuildRequires: chmlib-devel
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: kdelibs4-devel
Requires: kio_msits
%description
KchmViewer is a chm (MS HTML help file format) viewer.
%prep
%setup -q -n build-%{version}
%patch1 -p1 -b .no_msits
%patch2 -p1 -b .missed_src
chmod -x lib/kio-msits/msits.*
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_kde4} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%install
rm -rf $RPM_BUILD_ROOT
make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
install -Dpm 644 packages/%{name}.png $RPM_BUILD_ROOT%{_kde4_iconsdir}/hicolor/128x128/apps/%{name}.png
%find_lang kchmviewer --with-kde
%check
desktop-file-validate $RPM_BUILD_ROOT%{_kde4_datadir}/applications/kde4/kchmviewer.desktop
%clean
rm -rf $RPM_BUILD_ROOT
%post
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
%posttrans
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null ||:
%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
update-desktop-database -q &> /dev/null ||:
fi
%files -f kchmviewer.lang
%defattr(-,root,root,-)
%doc README COPYING ChangeLog FAQ
%{_kde4_bindir}/kchmviewer
%{_kde4_datadir}/applications/kde4/*.desktop
%{_kde4_iconsdir}/hicolor/*/apps/kchmviewer.*
%changelog
* Fri Jun 4 2010 Robin Lee <robinlee.sysu@gmail.com> - 5.2-3
- fix tag
* Fri Jun 4 2010 Robin Lee <robinlee.sysu@gmail.com> - 5.2-2
- Tar ball updated
* Wed Apr 28 2010 Robin Lee <robinlee.sysu@gmail.com> - 5.2-1
- update to 5.2
* Sat Apr 17 2010 LI Rui Bin <cheeseli@hotmail.com> - 5.1-1
- correct License tag
- remove BuildRoot tag
* Fri Mar 19 2010 Emilio Scalise <emisca@rocketmail.com> - 5.1-0
- update to 5.1
- provides new translations
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Apr 27 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.0-4
- fix conflicts with kdegraphics (#484861)
- optimize scriptlets
- ship only hicolor icons
- cleanup, use kde4-macros
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Mon Dec 8 2008 Patrice Dumas <pertusus@free.fr> 4.0-2
- reenable kde support
* Thu Dec 4 2008 Patrice Dumas <pertusus@free.fr> 4.0-1
- update to 4.0
* Wed Aug 13 2008 Patrice Dumas <pertusus@free.fr> 4.0-0.4.beta3
- update to 4.0beta3
* Thu Feb 14 2008 Patrice Dumas <pertusus@free.fr> 4.0-0.2.beta2
- update to 4.0beta2
* Thu Aug 2 2007 Patrice Dumas <pertusus@free.fr> 3.1-1.5
- update to 3.1
* Sun Apr 1 2007 Patrice Dumas <pertusus@free.fr> 3.0-2
- update to 3.0
* Fri Feb 16 2007 Patrice Dumas <pertusus@free.fr> 2.7-2
- fixes in desktop file. Fix #229070
* Mon Jan 29 2007 Patrice Dumas <pertusus@free.fr> 2.7-1
- update to 2.7
* Tue Sep 12 2006 Patrice Dumas <pertusus@free.fr> 2.6-2
- rebuild for FC6
* Sat Jul 22 2006 Patrice Dumas <pertusus@free.fr> 2.6-1
- update to 2.6
- remove upstreamed patch kchmviewer-2.5-iconstorage.h.patch
* Thu May 18 2006 Patrice Dumas <pertusus@free.fr> 2.5-1
- update to 2.5
- patch from Jose Pedro Oliveira (jpo)
* Tue May 16 2006 Patrice Dumas <pertusus@free.fr> 2.0-4
- remove the old menu entry file from /usr/share/applnk/
* Mon Mar 13 2006 Patrice Dumas <pertusus@free.fr> 2.0-3
- use update-desktop-database
* Mon Mar 13 2006 Patrice Dumas <pertusus@free.fr> 2.0-2
- enable kde support
* Sun Mar 12 2006 Patrice Dumas <pertusus@free.fr> 2.0-1
- Fedora Extras submission