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