Conversion to the cmake building system.

Add a man page taken from the Debian packaging system.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
(cherry picked from commit e2016d4ad8)
r14.0.x
gregory guy 3 years ago committed by Slávek Banko
parent 645ae24e8b
commit 05d127e5e3
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668

@ -0,0 +1,78 @@
############################################
# #
# Improvements and feedbacks are welcome #
# #
# This file is released under GPL >= 3 #
# #
############################################
cmake_minimum_required( VERSION 2.8 )
#### general package setup
project( ksystemlog )
set( VERSION R14.1.0 )
#### include essential cmake modules
include( FindPkgConfig )
include( CheckFunctionExists )
include( CheckSymbolExists )
include( CheckIncludeFile )
include( CheckLibraryExists )
include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
#### include our cmake modules
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
##### setup install paths
include( TDESetupPaths )
tde_setup_paths( )
##### optional stuff
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
##### user requested modules
option( BUILD_ALL "Build all" ON )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
##### configure checks
include( ConfigureChecks.cmake )
###### global compiler settings
add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
##### directories
add_subdirectory( ${PROJECT_NAME} )
tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS ksystemlog/po )
##### write configure files
configure_file( config.h.cmake config.h @ONLY )

@ -0,0 +1,28 @@
#################################################
#
# (C) 2010 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
# required stuff
find_package( TQt )
find_package( TDE )
tde_setup_architecture_flags( )
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( )
##### check for gcc visibility support
if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY )

@ -0,0 +1,8 @@
#define VERSION "@VERSION@"
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@

@ -0,0 +1,34 @@
file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
list( REMOVE_ITEM _dirs html man )
string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
foreach( _dir IN LISTS _dirs )
if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}
AND ( "${_dir}" STREQUAL "en" OR
"${_linguas}" MATCHES "^;*$" OR
";${_linguas};" MATCHES ";${_dir};" ))
file( GLOB _doc_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} ${_dir}/*.docbook )
if( _doc_files )
list( FIND _doc_files "index.docbook" _find_index )
if( -1 EQUAL _find_index )
set( _noindex "NOINDEX" )
else()
unset( _noindex )
endif()
tde_create_handbook(
SOURCE_BASEDIR ${_dir}
${_noindex}
LANG ${_dir}
DESTINATION ${PROJECT_NAME}
)
endif()
endif()
endforeach()
if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/html/CMakeLists.txt )
add_subdirectory( html )
endif()
if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/man/CMakeLists.txt )
add_subdirectory( man )
endif()

@ -0,0 +1,5 @@
INSTALL(
FILES ${PROJECT_NAME}.1
DESTINATION ${MAN_INSTALL_DIR}/man1
COMPONENT doc
)

@ -0,0 +1,67 @@
'\" -*- coding: us-ascii -*-
.if \n(.g .ds T< \\FC
.if \n(.g .ds T> \\F[\n[.fam]]
.de URL
\\$2 \(la\\$1\(ra\\$3
..
.if \n(.g .mso www.tmac
.TH ksystemlog 1 2005-07-28 "" ""
.SH NAME
ksystemlog \- A System Log Viewer
.SH SYNOPSIS
'nh
.fi
.ad l
\fBksystemlog\fR \kx
.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
'in \n(.iu+\nxu
[
\fB\fIQt-options\fB\fR
] [
\fB\fITDE-options\fB\fR
]
'in \n(.iu-\nxu
.ad b
'hy
.SH DESCRIPTION
KSystemLog is an application to view system logs.
.SH OPTIONS
All TDE and Qt
programs accept a some common command-line options. KSystemLog has no
application-specific options.
.PP
.TP
\*(T<\fB\-\-help\fR\*(T>
Show help about options
.TP
\*(T<\fB\-\-help\-qt\fR\*(T>
Show Qt specific options
.TP
\*(T<\fB\-\-help\-tde\fR\*(T>
Show TDE specific options
.TP
\*(T<\fB\-\-help\-all\fR\*(T>
Show all options
.TP
\*(T<\fB\-\-author\fR\*(T>
Show author information
.TP
\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T>
Show version information
.TP
\*(T<\fB\-\-license\fR\*(T>
Show license information
.TP
\*(T<\fB\-\-\fR\*(T>
Indicates end of options
.SH COPYRIGHT
This manual page was written by Jonathan Riddell
<\*(T<jriddell@ubuntu.com\*(T>> for the
Ubuntu system (but may be used by others).
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License,
Version 2 or any later version published by the Free Software Foundation.
.PP
On Debian systems, the complete text of the GNU General Public
License can be found in
\*(T<\fI/usr/share/common\-licenses/GPL\fR\*(T>.

@ -0,0 +1 @@
add_subdirectory( src )

@ -0,0 +1,14 @@
file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
foreach( _po ${po_files} )
get_filename_component( _lang ${_po} NAME_WE )
if( "${_linguas}" MATCHES "^;*$" OR ";${_linguas};" MATCHES ";${_lang};" )
if( "${_po}" MATCHES "^([^/]*)/.*" )
string( REGEX REPLACE "^([^/]*)/.*" "\\1" _component "${_po}" )
else( )
set( _component "${PROJECT_NAME}" )
endif( )
tde_create_translation( FILES ${_po} LANG ${_lang} OUTPUT_NAME ${_component} )
endif( )
endforeach( )

@ -0,0 +1,101 @@
add_subdirectory( bootauth )
add_subdirectory( acpid )
add_subdirectory( apache )
add_subdirectory( cron )
add_subdirectory( system )
add_subdirectory( xorg )
add_subdirectory( mail )
add_subdirectory( kernel )
add_subdirectory( cups )
add_subdirectory( daemon )
add_subdirectory( samba )
add_subdirectory( config )
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_SOURCE_DIR}/ksystemlog/src/acpid
${CMAKE_SOURCE_DIR}/ksystemlog/src/apache
${CMAKE_SOURCE_DIR}/ksystemlog/src/bootauth
${CMAKE_SOURCE_DIR}/ksystemlog/src/cron
${CMAKE_SOURCE_DIR}/ksystemlog/src/cups
${CMAKE_SOURCE_DIR}/ksystemlog/src/daemon
${CMAKE_SOURCE_DIR}/ksystemlog/src/kernel
${CMAKE_SOURCE_DIR}/ksystemlog/src/mail
${CMAKE_SOURCE_DIR}/ksystemlog/src/samba
${CMAKE_SOURCE_DIR}/ksystemlog/src/system
${CMAKE_SOURCE_DIR}/ksystemlog/src/xorg
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog (executable)
tde_add_executable( ksystemlog AUTOMOC
SOURCES
detailDialogBase.ui loggerDialogBase.ui
ksystemlogiface.skel
detailDialog.cpp fileList.cpp
generalOptions.cpp globals.cpp
ksystemlog.cpp logFile.cpp
logLevel.cpp logLine.cpp
logLineList.cpp logListItem.cpp
logViewColumn.cpp main.cpp
options.cpp reader.cpp
specificFileList.cpp view.cpp
viewToolTip.cpp logManager.cpp
defaultReader.cpp logMode.cpp
childLogLine.cpp parentLogLine.cpp
logLineTree.cpp readerFactory.cpp
itemFactory.cpp logViewColumns.cpp
loadingDialog.cpp slotLogAction.cpp
parsingHelper.cpp logLineFilter.cpp
loggerDialog.cpp findManager.cpp
LINK
tdecore-shared
tdeui-shared
tdeio-shared
tdeprint-shared
tdeutils-shared
ksystemlog_config-static
ksystemlog_bootauth-static
ksystemlog_acpid-static
ksystemlog_apache-static
ksystemlog_cron-static
ksystemlog_system-static
ksystemlog_xorg-static
ksystemlog_mail-static
ksystemlog_kernel-static
ksystemlog_cups-static
ksystemlog_daemon-static
ksystemlog_samba-static
DESTINATION ${BIN_INSTALL_DIR}
)
##### icons
tde_install_icons( )
##### other data
install(
FILES ksystemlogui.rc
DESTINATION ${DATA_INSTALL_DIR}/ksystemlog
)
tde_create_translated_desktop( ${PROJECT_NAME}.desktop )

@ -0,0 +1,26 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_acpid (static)
tde_add_library( ksystemlog_acpid STATIC_PIC AUTOMOC
SOURCES
acpidOptions.cpp
acpidReader.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -0,0 +1,27 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_apache (static)
tde_add_library( ksystemlog_apache STATIC_PIC AUTOMOC
SOURCES
apacheAccessReader.cpp
apacheOptions.cpp
apacheReader.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -0,0 +1,25 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_bootauth (static)
tde_add_library( ksystemlog_bootauth STATIC_PIC AUTOMOC
SOURCES
bootAuthenticationOptions.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -0,0 +1,30 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_config (static)
tde_add_library( ksystemlog_config STATIC_PIC AUTOMOC
SOURCES
ksystemlogConfig.kcfgc
)
##### other data
install(
FILES ksystemlog.kcfg
DESTINATION ${KCFG_INSTALL_DIR}
)

@ -5,3 +5,5 @@ noinst_LTLIBRARIES = libksystemlog_config.la
libksystemlog_config_la_SOURCES = ksystemlogConfig.kcfgc dummyConfig.cpp
kde_kcfg_DATA = ksystemlog.kcfg
dummyConfig.cpp:
touch dummyConfig.cpp

@ -1,20 +0,0 @@
/***************************************************************************
* Copyright (C) 2005 by Nicolas Ternisien *
* nicolas.ternisien@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/

@ -0,0 +1,26 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_cron (static)
tde_add_library( ksystemlog_cron STATIC_PIC AUTOMOC
SOURCES
cronOptions.cpp
cronReader.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -0,0 +1,27 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_cups (static)
tde_add_library( ksystemlog_cups STATIC_PIC AUTOMOC
SOURCES
cupsAccessReader.cpp
cupsOptions.cpp
cupsReader.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -0,0 +1,25 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_daemon (static)
tde_add_library( ksystemlog_daemon STATIC_PIC AUTOMOC
SOURCES
daemonOptions.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -0,0 +1,25 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_kernel (static)
tde_add_library( ksystemlog_kernel STATIC_PIC AUTOMOC
SOURCES
kernelOptions.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -23,7 +23,7 @@
#define KSYSTEM_LOG_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#include "config.h"
#endif

@ -0,0 +1,25 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_mail (static)
tde_add_library( ksystemlog_mail STATIC_PIC AUTOMOC
SOURCES
mailOptions.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -0,0 +1,26 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_samba (static)
tde_add_library( ksystemlog_samba STATIC_PIC AUTOMOC
SOURCES
sambaOptions.cpp
sambaReader.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -0,0 +1,26 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_system (static)
tde_add_library( ksystemlog_system STATIC_PIC AUTOMOC
SOURCES
systemOptions.cpp
systemReader.cpp
DEPENDENCIES ksystemlog_config-static
)

@ -0,0 +1,26 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/ksystemlog/src
${CMAKE_BINARY_DIR}/ksystemlog/src/config
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### ksystemlog_xorg (static)
tde_add_library( ksystemlog_xorg STATIC_PIC AUTOMOC
SOURCES
xorgOptions.cpp
xorgReader.cpp
DEPENDENCIES ksystemlog_config-static
)
Loading…
Cancel
Save