Name: kchmviewer
Version: 4.0
Release: 3%{?dist}
Summary: CHM viewer with Qt support
Group: Applications/Publishing
License: GPLv2+
URL: http://www.kchmviewer.net/
#Source0: http://www.kchmviewer.net/files/kchmviewer-%{version}.tar.gz
Source0: http://downloads.sourceforge.net/kchmviewer/kchmviewer-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: qt4-devel chmlib-devel
BuildRequires: desktop-file-utils kdelibs4-devel
# for the %%cmake_kde4 macro (it is also a kdelibs4 dependency)
# BuildRequires: kde-filesystem
# for directories owning
Requires: kde-filesystem
# for the crystalsvg directory owning.
# in F10 owned by kdelibs3, hopefully this will change in the future.
Requires: %{_datadir}/icons/crystalsvg
%description
KchmViewer is a chm (MS HTML help file format) viewer, written in C++.
It uses the Qt widget library.
#It is compiled with full KDE support, including KDE widgets
#and KIO/KHTML.
%prep
%setup -q -n kchmviewer-%{version}
# don't know what the encoding is. The strange character sequence is
# <EF><BF><BD>, which could be in utf8 U-0000FFFD, a boundary condition
# http://www.w3.org/2001/06/utf-8-wrong/UTF-8-test.html
#iconv -f latin1 -t utf8 < FAQ > FAQ.utf8
#touch -r FAQ FAQ.utf8
#mv FAQ.utf8 FAQ
chmod -x lib/kio-msits/msits.*
%build
%cmake_kde4 .
# with qmake-qt4 install is done by hand, and without kde4 support.
#qmake-qt4
make VERBOSE=1
#%{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
#mkdir -p $RPM_BUILD_ROOT%{_bindir}
#install -m0755 bin/kchmviewer $RPM_BUILD_ROOT%{_bindir}
# not installed in the default case in hicolor, only in crystalsvg.
for r in 48 64 128; do
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${r}x${r}/apps/
install -p -m644 src/kde/cr${r}-app-kchmviewer.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${r}x${r}/apps/kchmviewer.png
done
# let the application do it itself
#mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
#desktop-file-install --vendor fedora \
# --dir $RPM_BUILD_ROOT%{_datadir}/applications \
# src/kde/kchmviewer.desktop
# --delete-original \
# $RPM_BUILD_ROOT%{_datadir}/applications/kchmviewer.desktop
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/kde4/kchmviewer.desktop
#%%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/crystalsvg || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg || :
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%postun
update-desktop-database &> /dev/null ||:
touch --no-create %{_datadir}/icons/crystalsvg || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg || :
touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
%files
# -f %{name}.lang
%defattr(-,root,root,-)
%doc README COPYING ChangeLog FAQ
%{_bindir}/kchmviewer
%{_datadir}/applications/kde4/*.desktop
#%{_datadir}/applications/*.desktop
%{_libdir}/kde4/kio_msits.so
%{_datadir}/kde4/services/msits.protocol
%{_datadir}/icons/crystalsvg/*/apps/kchmviewer.png
%{_datadir}/icons/hicolor/*/apps/kchmviewer.png
%changelog
* 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