diff --git a/.cvsignore b/.cvsignore index 0e69a80..af93678 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -kchmviewer-4.0beta2.tar.gz +kchmviewer-4.0beta3.tar.gz diff --git a/kchmviewer-2.0-desktop_fix.patch b/kchmviewer-2.0-desktop_fix.patch deleted file mode 100644 index 3ac10b8..0000000 --- a/kchmviewer-2.0-desktop_fix.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- kchmviewer-3.0/lib/kio-msits/kchmviewer.desktop.desktop_fix 2007-03-07 10:20:54.000000000 +0100 -+++ kchmviewer-3.0/lib/kio-msits/kchmviewer.desktop 2007-04-01 20:26:54.000000000 +0200 -@@ -1,11 +1,11 @@ - [Desktop Entry] - Categories=Qt;KDE;Utility; - Encoding=UTF-8 -+GenericName=CHM file viewer - Type=Application --Exec=kchmviewer %U --Icon=kchmviewer.png --Comment= --Terminal=0 -+Exec=kchmviewer %f -+Icon=kchmviewer -+Terminal=false - Name=KchmViewer - Comment=A viewer of CHM (MS-Help) files --MimeType=application/chm -+MimeType=application/chm;application/x-chm; diff --git a/kchmviewer-4.0-desktop_fix.patch b/kchmviewer-4.0-desktop_fix.patch new file mode 100644 index 0000000..4262827 --- /dev/null +++ b/kchmviewer-4.0-desktop_fix.patch @@ -0,0 +1,14 @@ +diff -up kchmviewer-4.0beta3/src/kde/kchmviewer.desktop.desktop_fix kchmviewer-4.0beta3/src/kde/kchmviewer.desktop +--- kchmviewer-4.0beta3/src/kde/kchmviewer.desktop.desktop_fix 2008-08-13 15:44:40.000000000 +0200 ++++ kchmviewer-4.0beta3/src/kde/kchmviewer.desktop 2008-08-13 15:47:13.000000000 +0200 +@@ -4,8 +4,8 @@ Categories=Qt;KDE;Utility; + Encoding=UTF-8 + Terminal=false + Type=Application +-Exec=kchmviewer %U ++Exec=kchmviewer %f + Icon=kchmviewer + GenericName=A viewer for CHM files + Comment=A viewer of CHM (MS-Help) files +-MimeType=application/chm ++MimeType=application/chm;application/x-chm; diff --git a/kchmviewer-4.0-plugin_install.patch b/kchmviewer-4.0-plugin_install.patch new file mode 100644 index 0000000..8e9fc9c --- /dev/null +++ b/kchmviewer-4.0-plugin_install.patch @@ -0,0 +1,11 @@ +diff -up kchmviewer-4.0beta3/lib/kio-msits/CMakeLists.txt.plugin_install kchmviewer-4.0beta3/lib/kio-msits/CMakeLists.txt +--- kchmviewer-4.0beta3/lib/kio-msits/CMakeLists.txt.plugin_install 2008-08-13 18:30:58.000000000 +0200 ++++ kchmviewer-4.0beta3/lib/kio-msits/CMakeLists.txt 2008-08-13 18:31:18.000000000 +0200 +@@ -1,6 +1,6 @@ + SET( kioSources msits.cpp ) + KDE4_ADD_PLUGIN( kio_msits ${kioSources} ) + TARGET_LINK_LIBRARIES( kio_msits ${KDE4_KIO_LIBS} ${LIBCHM_LIBRARY} ) +-INSTALL( TARGETS kio_msits DESTINATION ${KDE4_LIB_INSTALL_DIR} ) ++INSTALL( TARGETS kio_msits DESTINATION ${PLUGIN_INSTALL_DIR} ) + INSTALL( FILES msits.protocol DESTINATION ${KDE4_SERVICES_INSTALL_DIR} ) + diff --git a/kchmviewer.spec b/kchmviewer.spec index fbfc526..d421799 100644 --- a/kchmviewer.spec +++ b/kchmviewer.spec @@ -1,18 +1,25 @@ Name: kchmviewer Version: 4.0 -Release: 0.2.beta2%{?dist} +Release: 0.3.beta3%{?dist} Summary: CHM viewer with Qt support Group: Applications/Publishing License: GPLv2+ URL: http://www.kchmviewer.net/ -Source0: http://downloads.sourceforge.net/kchmviewer/kchmviewer-%{version}beta2.tar.gz +Source0: http://www.kchmviewer.net/files/kchmviewer-%{version}beta3.tar.gz +#Source0: http://downloads.sourceforge.net/kchmviewer/kchmviewer-%{version}beta3.tar.gz # fix the desktop file -Patch0: kchmviewer-2.0-desktop_fix.patch +Patch0: kchmviewer-4.0-desktop_fix.patch +Patch1: kchmviewer-4.0-plugin_install.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: qt4-devel chmlib-devel +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 %description KchmViewer is a chm (MS HTML help file format) viewer, written in C++. @@ -22,46 +29,48 @@ It uses the Qt widget library. %prep -%setup -q -n kchmviewer-%{version}beta2 +%setup -q -n kchmviewer-%{version}beta3 %patch0 -p1 -b .desktop_fix +%patch1 -p1 -b .plugin_install iconv -f latin1 -t utf8 < FAQ > FAQ.utf8 touch -r FAQ FAQ.utf8 mv FAQ.utf8 FAQ -#chmod -x lib/kio-msits/msits.* +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} -make %install rm -rf $RPM_BUILD_ROOT -# no install target -#make install DESTDIR=$RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} install -m0755 bin/kchmviewer $RPM_BUILD_ROOT%{_bindir} -# to be done automatically when kde support is reenabled -mkdir -p $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/pics/cr${r}-app-kchmviewer.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${r}x${r}/apps/kchmviewer.png + install -p -m644 src/kde/cr${r}-app-kchmviewer.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${r}x${r}/apps/kchmviewer.png done mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications desktop-file-install --vendor fedora \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - lib/kio-msits/kchmviewer.desktop + src/kde/kchmviewer.desktop +# let the application do it itself +# --delete-original \ +# $RPM_BUILD_ROOT%{_datadir}/applications/kchmviewer.desktop -# remove static libs, they have no interface, libkdeextra is too generic -#rm ${RPM_BUILD_ROOT}%{_libdir}/libchmfile.a -#rm ${RPM_BUILD_ROOT}%{_libdir}/libkdeextra.a #%%find_lang %{name} + %clean rm -rf $RPM_BUILD_ROOT @@ -86,16 +95,18 @@ touch --no-create %{_datadir}/icons/hicolor || : %defattr(-,root,root,-) %doc README COPYING ChangeLog FAQ %{_bindir}/kchmviewer -%{_datadir}/applications/* -#%{_datadir}/pixmaps/* -#%{_libdir}/kde3/kio_msits.so -#%{_libdir}/kde3/kio_msits.la -#%{_datadir}/services/msits.protocol +#%{_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 +* Sun Nov 16 2008 Patrice Dumas 4.0-0.3.beta3 +- update to 4.0beta3, should fix #458573 + * Thu Feb 14 2008 Patrice Dumas 4.0-0.2.beta2 - update to 4.0beta2 diff --git a/sources b/sources index 34abd74..f46cb21 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a81d8f84458824b93ab788083ecd2120 kchmviewer-4.0beta2.tar.gz +06c94380a5380a613b808b9e05a401f7 kchmviewer-4.0beta3.tar.gz