diff -u -r -N katalog-0.4-orig/cmake/modules/FindSQLite3.cmake katalog-0.4/cmake/modules/FindSQLite3.cmake
--- katalog-0.4-orig/cmake/modules/FindSQLite3.cmake	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/cmake/modules/FindSQLite3.cmake	2007-03-25 16:01:41.000000000 -0500
@@ -0,0 +1,32 @@
+# Locate SQLite3 include paths and libraries
+#
+# This module defines:
+#     SQLITE3_FOUND - system has SQLite3
+#     SQLITE3_INCLUDE_DIR - the SQLite3 include directory
+#     SQLITE3_LIBRARY - the libraries to link against to use SQLite3
+
+FIND_PATH( SQLITE3_INCLUDE_DIR sqlite3.h
+	PATHS
+	/usr/include
+	/usr/local/include
+	)
+
+FIND_LIBRARY( SQLITE3_LIBRARY sqlite3
+	PATHS
+	/usr/lib
+	/usr/local/lib
+	)
+
+IF ( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY )
+	SET( SQLITE3_FOUND TRUE )
+ENDIF ( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY )
+
+IF ( SQLITE3_FOUND )
+	IF ( NOT SQLITE3_FIND_QUIETLY )
+		MESSAGE( STATUS "Found SQLite3: ${SQLITE3_LIBRARY}" )
+	ENDIF ( NOT SQLITE3_FIND_QUIETLY )
+ELSE ( SQLITE3_FOUND )
+	IF ( SQLITE3_FIND_REQUIRED )
+		MESSAGE( FATAL_ERROR "Could not find SQLite3" )
+	ENDIF ( SQLITE3_FIND_REQUIRED )
+ENDIF ( SQLITE3_FOUND )
diff -u -r -N katalog-0.4-orig/cmake/modules/MacroAddCompileFlags.cmake katalog-0.4/cmake/modules/MacroAddCompileFlags.cmake
--- katalog-0.4-orig/cmake/modules/MacroAddCompileFlags.cmake	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/cmake/modules/MacroAddCompileFlags.cmake	2007-03-25 16:20:42.000000000 -0500
@@ -0,0 +1,14 @@
+# Append link flags to the target.
+#
+# Usage:
+#     MACRO_ADD_LINK_FLAGS( <target> "<flags>" )
+
+macro ( MACRO_ADD_LINK_FLAGS target flags )
+	get_target_property( _flags ${target} LINK_FLAGS )
+	if ( _flags )
+		set( _flags "${flags} ${_flags}" )
+	else ( _flags )
+		set( _flags "${flags}" )
+	endif ( _flags )
+	set_target_properties( ${target} PROPERTIES LINK_FLAGS "${_flags}" )
+endmacro ( MACRO_ADD_LINK_FLAGS )
diff -u -r -N katalog-0.4-orig/cmake/modules/MacroAddLinkFlags.cmake katalog-0.4/cmake/modules/MacroAddLinkFlags.cmake
--- katalog-0.4-orig/cmake/modules/MacroAddLinkFlags.cmake	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/cmake/modules/MacroAddLinkFlags.cmake	2007-03-25 16:21:46.000000000 -0500
@@ -0,0 +1,14 @@
+# Append compile flags to the target.
+#
+# Usage:
+#     MACRO_ADD_COMPILE_FLAGS( <target> "<flags>" )
+
+macro ( MACRO_ADD_COMPILE_FLAGS target flags )
+	get_target_property( _flags ${target} COMPILE_FLAGS )
+	if ( _flags )
+		set( _flags "${flags} ${_flags}" )
+	else ( _flags )
+		set( _flags "${flags}" )
+	endif ( _flags )
+	set_target_properties( ${target} PROPERTIES COMPILE_FLAGS "${_flags}" )
+endmacro ( MACRO_ADD_COMPILE_FLAGS )
diff -u -r -N katalog-0.4-orig/cmake/modules/MacroLibrary.cmake katalog-0.4/cmake/modules/MacroLibrary.cmake
--- katalog-0.4-orig/cmake/modules/MacroLibrary.cmake	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/cmake/modules/MacroLibrary.cmake	2007-03-25 16:49:24.000000000 -0500
@@ -0,0 +1,4 @@
+# Include a collection of macros
+
+include( MacroAddCompileFlags )
+include( MacroAddLinkFlags )
diff -u -r -N katalog-0.4-orig/CMakeLists.txt katalog-0.4/CMakeLists.txt
--- katalog-0.4-orig/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/CMakeLists.txt	2007-03-25 17:03:45.000000000 -0500
@@ -0,0 +1,23 @@
+project(katalog)
+
+set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
+set( CMAKE_COLOR_MAKEFILE ON )
+set( CMAKE_INCLUDE_CURRENT_DIR ON )
+
+include( MacroLibrary )
+
+set( QT_MT_REQUIRED TRUE)
+find_package( Qt3 REQUIRED )
+find_package( KDE3 REQUIRED )
+find_package( SQLite3 REQUIRED )
+
+link_directories( ${KDE3_LIB_DIR} )
+include_directories( ${KDE3_INCLUDE_DIR} ${QT_INCLUDE_DIR} )
+
+add_subdirectory(libqsqlite3)
+add_subdirectory(libkatalog)
+add_subdirectory(katalogslave)
+add_subdirectory(kfile-plugins)
+add_subdirectory(katalogservice)
+add_subdirectory(xml_backend)
+add_subdirectory(import_export)
diff -u -r -N katalog-0.4-orig/ChangeLog katalog-0.4/ChangeLog
--- katalog-0.4-orig/ChangeLog	2006-04-27 13:35:02.000000000 -0500
+++ katalog-0.4/ChangeLog	2007-03-26 04:32:58.000000000 -0500
@@ -1,20 +1,79 @@
-I write katalog for fun, because I need such an application and to learn KDE internals, so some periodic rewrite is normal.
+2007-03-25  Nalevajko Tomas  <stromek@realtime.sk>
 
-0.1 - The first release of katalog, an ambitiuos start: new file type, new UI, integrated search dialog, category support.
+	* CMake (FindSQLite3, MacroLibrary):
+	Added cmake module for checking FindSQLite3 library and a few helper
+	macros.	
 
-0.1.1 - The never seen release, it includes some bug fix and a couple of traslations. A change in my life (work and city)
-        caused an undefined delay in the release.
+	* ChangeLog:
+	Format modified according to gnu coding standards, see
+	<www.gnu.org/prep/standards>
+	
+	* CMake:
+	Build system ported to CMake.
 
-0.2 - The second release and the first rewrite, more ambitiuos than before trying to reproduce all the functionality
-      of the 0.1 in an application fully integrated in Konqueror and KDE. It looses some feature: category support, it breaks
-      compatibility with the previous file format but it gains integrations, performance and stability. Now it's a modular
-      application including a library, a kioslave, a service menu.
-
-0.3 - The third release and the second rewrite, the file format is more rich but the old type is supported, metainfos are included
-      in the *.katalog file, dcop interface is the keyword of this release. Now katalog is a library, a dcop server, three dcop
-      clients (kfile plugin, service menu, kioslave).
-
-0.4-preview - The main change of this release is migration from an XML file format to a database (Currently I have tested only SQLite3 but nothing stops from using any other DB that Qt supports). Old file format is supported, currently only reading (just click on your old files to navigate it) but import/export function are work in progress.
-The navigation of catalogs is greatly simplified: now you can find a katalog folder in Konqueror sidebar in the services tab, from there you can find all catalogs and an experimental navigation through mimetypes.
-Last but not least the catalog creation widget now shows a progress indicator with the possibility to stop current jobs.
-Note: since this new version installs several configuration files for konqueror you my need to kill each running instance of it to enable all functionalities, you can achieve this with a logoff/login procedure.
\ No newline at end of file
+2006-12-25 Stefano Salvador  <salva_ste@tin.it>
+
+	* version 0.4:
+	The transition to database is complete with import/export functions for the
+	old XML format, I have tested extensivelly this functions to avoid data
+	losses. I have tested MySql as a database, everything works ok (See Tips for
+	instructions on how to change default db engine, let me know if you use a
+	different engine). It's possible to export even to HTML format.
+
+	See the previous changelog for other changes.
+
+	Note: as for other releases this one installs several configuration files
+	for konqueror you my need to kill each running instance of it to enable all
+	functionalities, you can achieve this with a logoff/login procedure.
+
+2006-04-26 Stefano Salvador  <salva_ste@tin.it>
+
+	* version 0.4-preview:
+	The main change of this release is migration from an XML file format to
+	a database (Currently I have tested only SQLite3 but nothing stops from
+	using any other DB that Qt supports). Old file format is supported, currently
+	only reading (just click on your old files to navigate it) but import/export
+	function are work in progress.
+
+	The navigation of catalogs is greatly simplified: now you can find a katalog
+	folder in Konqueror sidebar in the services tab, from there you can find all
+	catalogs and an experimental navigation through mimetypes.
+
+	Last but not least the catalog creation widget now shows a progress indicator
+	with the possibility to stop current jobs.
+
+	Note: since this new version installs several configuration files for
+	konqueror you my need to kill each running instance of it to enable all
+	functionalities, you can achieve this with a logoff/login procedure.
+
+2004-21-11 Stefano Salvador  <salva_ste@tin.it>
+
+	* 0.3:
+	The third release and the second rewrite, the file format is more rich but
+	the old type is supported, metainfos are included in the *.katalog file, dcop
+	interface is the keyword of this release. Now katalog is a library, a dcop
+	server, three dcop clients (kfile plugin, service menu, kioslave).
+
+2004-05-05 Stefano Salvador  <salva_ste@tin.it>
+
+	* 0.2:
+	The second release and the first rewrite, more ambitiuos than before trying
+	to reproduce all the functionality of the 0.1 in an application fully
+	integrated in Konqueror and KDE. It looses some feature: category support, it
+	breaks compatibility with the previous file format but it gains integrations,
+	performance and stability. Now it's a modular application including a library,
+	a kioslave, a service menu.
+
+2003-05-22 Stefano Salvador  <salva_ste@tin.it>
+
+	* 0.1.1:
+	The never seen release, it includes some bug fix and a couple of traslations.
+	A change in my life (work and city) caused an undefined delay in the release.
+
+2003-04-26 Stefano Salvador  <salva_ste@tin.it>
+
+	* 0.1: The first release of katalog, an ambitiuos start: new file type, new
+	UI, integrated search dialog, category support.
+
+	I write katalog for fun, because I need such an application and to learn KDE
+	internals, so some periodic rewrite is normal.
diff -u -r -N katalog-0.4-orig/import_export/CMakeLists.txt katalog-0.4/import_export/CMakeLists.txt
--- katalog-0.4-orig/import_export/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/import_export/CMakeLists.txt	2007-03-25 16:43:20.000000000 -0500
@@ -0,0 +1,34 @@
+include_directories(
+	${CMAKE_SOURCE_DIR}/libkatalog
+	)
+
+set( katalog_import_xml_SRCS
+	importXML.cpp
+	)
+
+kde3_add_executable( katalog_import_xml ${katalog_import_xml_SRCS} )
+add_dependencies( katalog_import_xml katalog )
+
+target_link_libraries( katalog_import_xml ${QT_AND_KDECORE_LIBS} katalog )
+
+
+install( TARGETS katalog_import_xml DESTINATION bin )
+install( FILES katalog_import.desktop DESTINATION share/apps/konqueror/servicemenus )
+
+############## next target ##############
+
+set( katalog_export_xml_SRCS
+	exportXML.cpp
+	)
+
+kde3_add_executable( katalog_export_xml ${katalog_export_xml_SRCS} )
+add_dependencies( katalog_export_xml katalog )
+
+target_link_libraries( katalog_export_xml ${QT_AND_KDECORE_LIBS} katalog )
+
+install( TARGETS katalog_export_xml DESTINATION bin )
+install( FILES katalog_export.desktop DESTINATION share/apps/konqueror/servicemenus )
+
+install( FILES katalog-xslt.xml DESTINATION share/apps/katalog )
+install( FILES katalog_export_xml_script DESTINATION bin )
+install( FILES katalog_export_html DESTINATION bin )
diff -u -r -N katalog-0.4-orig/katalogservice/CMakeLists.txt katalog-0.4/katalogservice/CMakeLists.txt
--- katalog-0.4-orig/katalogservice/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/katalogservice/CMakeLists.txt	2007-03-25 16:54:17.000000000 -0500
@@ -0,0 +1,24 @@
+set( katalogservice_SRCS
+	main.cpp
+	katalogservicedlg.cpp
+	)
+
+add_definitions( ${QT_DEFINITIONS} )
+
+include_directories(
+	${CMAKE_SOURCE_DIR}/libkatalog
+	)
+
+kde3_automoc( ${katalogservice_SRCS} )
+kde3_add_ui_files( katalogservice_SRCS
+	katalogservicedlgbase.ui
+	)
+kde3_add_executable( katalogservice ${katalogservice_SRCS} )
+
+add_dependencies( katalogservice katalog )
+
+target_link_libraries( katalogservice ${QT_AND_KDECORE_LIBS} katalog )
+macro_add_compile_flags( katalogservice "-DQT_THREAD_SUPPORT" )
+
+install( TARGETS katalogservice DESTINATION bin )
+install( FILES katalog.desktop DESTINATION share/apps/konqueror/servicemenus )
diff -u -r -N katalog-0.4-orig/katalogslave/CMakeLists.txt katalog-0.4/katalogslave/CMakeLists.txt
--- katalog-0.4-orig/katalogslave/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/katalogslave/CMakeLists.txt	2007-03-25 16:41:34.000000000 -0500
@@ -0,0 +1,23 @@
+set( kio_katalogslave_LIB_SRCS
+	katalogslave.cpp
+	)
+
+include_directories(
+	${CMAKE_SOURCE_DIR}/libkatalog
+	)
+
+kde3_add_kpart( kio_katalogslave ${kio_katalogslave_LIB_SRCS} )
+add_dependencies( kio_katalogslave katalog )
+
+target_link_libraries( kio_katalogslave ${QT_LIBRARIES} katalog )
+
+install( TARGETS kio_katalogslave DESTINATION lib/kde3 )
+
+install( FILES katalogslave.protocol DESTINATION share/services )
+install( FILES katalog_info.css DESTINATION share/apps/katalog )
+install( FILES katalog_service.desktop DESTINATION share/apps/konqsidebartng/virtual_folders/services )
+
+install( FILES x-katalogitem.desktop DESTINATION share/mimelnk/application )
+install( FILES katalog-directory.desktop DESTINATION share/mimelnk/inode )
+
+add_subdirectory(icons)
diff -u -r -N katalog-0.4-orig/katalogslave/icons/CMakeLists.txt katalog-0.4/katalogslave/icons/CMakeLists.txt
--- katalog-0.4-orig/katalogslave/icons/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/katalogslave/icons/CMakeLists.txt	2007-03-24 17:55:02.000000000 -0500
@@ -0,0 +1 @@
+kde3_install_icons( crystalsvg )
diff -u -r -N katalog-0.4-orig/kfile-plugins/CMakeLists.txt katalog-0.4/kfile-plugins/CMakeLists.txt
--- katalog-0.4-orig/kfile-plugins/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/kfile-plugins/CMakeLists.txt	2007-03-25 14:14:27.000000000 -0500
@@ -0,0 +1,15 @@
+set( kfile_katalog_LIB_SRCS
+	kfile_katalog.cpp
+	)
+
+include_directories(
+	${CMAKE_SOURCE_DIR}/libkatalog
+	)
+
+kde3_add_kpart( kfile_katalog ${kfile_katalog_LIB_SRCS} )
+add_dependencies( kfile_katalog katalog )
+
+target_link_libraries( kfile_katalog ${QT_LIBRARIES} katalog )
+
+install( TARGETS kfile_katalog DESTINATION lib/kde3 )
+install( FILES kfile_katalog.desktop DESTINATION share/services )
diff -u -r -N katalog-0.4-orig/libkatalog/CMakeLists.txt katalog-0.4/libkatalog/CMakeLists.txt
--- katalog-0.4-orig/libkatalog/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/libkatalog/CMakeLists.txt	2007-03-24 07:17:30.000000000 -0500
@@ -0,0 +1,14 @@
+set( libkatalog_LIB_SRCS
+	kataloguds.cpp
+	katalogiface.cpp
+	katalogfs.cpp
+	katalogscan.cpp
+	kataloginfo.cpp
+	katalogio.cpp
+	)
+
+kde3_automoc( ${libkatalog_LIB_SRCS} )
+
+add_library( katalog STATIC ${libkatalog_LIB_SRCS} )
+
+target_link_libraries( katalog ${QT_LIBRARIES} kio )
diff -u -r -N katalog-0.4-orig/libqsqlite3/CMakeLists.txt katalog-0.4/libqsqlite3/CMakeLists.txt
--- katalog-0.4-orig/libqsqlite3/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/libqsqlite3/CMakeLists.txt	2007-03-25 16:55:09.000000000 -0500
@@ -0,0 +1,17 @@
+set( qsqlite3_LIB_SRCS
+	smain.cpp
+	qsql_sqlite3.cpp
+	qsqlcachedresult.cpp
+	)
+
+include_directories( ${SQLITE3_INCLUDE_DIR} )
+
+add_library( qsqlite3 SHARED ${qsqlite3_LIB_SRCS} )
+macro_add_compile_flags( qsqlite3 "-DQT_NO_DEBUG -DQT_PLUGIN -DQT_SHARED -DQT_THREAD_SUPPORT" )
+
+target_link_libraries( qsqlite3 ${QT_LIBRARIES} ${SQLITE3_LIBRARY} )
+
+install(
+	TARGETS qsqlite3
+	DESTINATION ${LIB_INSTALL_DIR}/qt3/plugins/sqldrivers
+	)
diff -u -r -N katalog-0.4-orig/test/CMakeLists.txt katalog-0.4/test/CMakeLists.txt
--- katalog-0.4-orig/test/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/test/CMakeLists.txt	2007-03-20 22:10:51.000000000 -0500
@@ -0,0 +1,3 @@
+set( test_SRCS
+	main.cpp
+	)
diff -u -r -N katalog-0.4-orig/xml_backend/CMakeLists.txt katalog-0.4/xml_backend/CMakeLists.txt
--- katalog-0.4-orig/xml_backend/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/xml_backend/CMakeLists.txt	2007-03-20 22:12:13.000000000 -0500
@@ -0,0 +1,3 @@
+add_subdirectory(libkatalogxml)
+add_subdirectory(katalogxmlslave)
+add_subdirectory(kfile-plugins)
diff -u -r -N katalog-0.4-orig/xml_backend/katalogxmlslave/CMakeLists.txt katalog-0.4/xml_backend/katalogxmlslave/CMakeLists.txt
--- katalog-0.4-orig/xml_backend/katalogxmlslave/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/xml_backend/katalogxmlslave/CMakeLists.txt	2007-03-25 16:42:44.000000000 -0500
@@ -0,0 +1,18 @@
+include_directories(
+	${CMAKE_SOURCE_DIR}/xml_backend/libkatalogxml
+	)
+
+set( katalogxmlslave_LIB_SRCS
+	katalogxmlslave.cpp
+	)
+
+kde3_add_kpart( kio_katalogxmlslave ${katalogxmlslave_LIB_SRCS} )
+add_dependencies( kio_katalogxmlslave katalogxml )
+
+target_link_libraries( kio_katalogxmlslave katalogxml ${QT_LIBRARIES} )
+
+install( TARGETS kio_katalogxmlslave DESTINATION lib/kde3 )
+install( FILES katalogxmlslave.protocol DESTINATION share/services )
+install( FILES x-katalogxml.desktop DESTINATION share/mimelnk/application )
+install( FILES x-katalogxmlitem.desktop DESTINATION share/mimelnk/application )
+install( FILES katalogxml-directory.desktop DESTINATION share/mimelnk/inode )
diff -u -r -N katalog-0.4-orig/xml_backend/kfile-plugins/CMakeLists.txt katalog-0.4/xml_backend/kfile-plugins/CMakeLists.txt
--- katalog-0.4-orig/xml_backend/kfile-plugins/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/xml_backend/kfile-plugins/CMakeLists.txt	2007-03-25 16:43:00.000000000 -0500
@@ -0,0 +1,15 @@
+include_directories(
+	${CMAKE_SOURCE_DIR}/xml_backend/libkatalogxml
+	)
+
+set( kfile_katalogxml_LIB_SRCS
+	kfile_katalogxml.cpp
+	)
+
+kde3_add_kpart( kfile_katalogxml ${kfile_katalogxml_LIB_SRCS} )
+add_dependencies( kfile_katalogxml katalogxml )
+
+target_link_libraries( kfile_katalogxml katalogxml ${QT_LIBRARIES} )
+
+install( TARGETS kfile_katalogxml DESTINATION lib/kde3 )
+install( FILES kfile_katalogxml.desktop DESTINATION share/services )
diff -u -r -N katalog-0.4-orig/xml_backend/libkatalogxml/CMakeLists.txt katalog-0.4/xml_backend/libkatalogxml/CMakeLists.txt
--- katalog-0.4-orig/xml_backend/libkatalogxml/CMakeLists.txt	1969-12-31 18:00:00.000000000 -0600
+++ katalog-0.4/xml_backend/libkatalogxml/CMakeLists.txt	2007-03-25 14:20:51.000000000 -0500
@@ -0,0 +1,10 @@
+set( katalogxml_LIB_SRCS
+	katalogxmluds.cpp
+	katalogxml.cpp
+	)
+
+kde3_automoc( ${katalogxml_LIB_SRCS} )
+
+add_library( katalogxml STATIC ${katalogxml_LIB_SRCS} )
+
+target_link_libraries( katalogxml ${QT_LIBRARIES} )
