From 382841c80611afca697e3859981f12b9503b48f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 29 Jul 2021 17:04:52 +0200 Subject: [PATCH] Use common rules for build and install documentation and translations. Change documentation path to tdeioslave/sword. Change CMake project name to tdeio_sword. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- CMakeLists.txt | 10 +++++++--- doc/CMakeLists.txt | 14 -------------- doc/en/CMakeLists.txt | 8 -------- doc/en/{ => tdeioslave/sword}/index.docbook | 0 doc/{en => html}/compilation.html | 0 doc/{en => html}/configuration.html | 0 doc/{en => html}/credits.html | 0 doc/{en => html}/faq.html | 0 doc/{en => html}/index.html | 0 doc/{en => html}/installation.html | 0 doc/{en => html}/introduction.html | 0 doc/{en => html}/requirements.html | 0 doc/{en => html}/using-tdeio_sword.html | 0 src/sword.protocol | 2 +- translations/CMakeLists.txt | 1 - translations/messages/CMakeLists.txt | 14 -------------- 16 files changed, 8 insertions(+), 41 deletions(-) delete mode 100644 doc/CMakeLists.txt delete mode 100644 doc/en/CMakeLists.txt rename doc/en/{ => tdeioslave/sword}/index.docbook (100%) rename doc/{en => html}/compilation.html (100%) rename doc/{en => html}/configuration.html (100%) rename doc/{en => html}/credits.html (100%) rename doc/{en => html}/faq.html (100%) rename doc/{en => html}/index.html (100%) rename doc/{en => html}/installation.html (100%) rename doc/{en => html}/introduction.html (100%) rename doc/{en => html}/requirements.html (100%) rename doc/{en => html}/using-tdeio_sword.html (100%) delete mode 100644 translations/CMakeLists.txt delete mode 100644 translations/messages/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index a49e1f0..a5f9dde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ cmake_minimum_required( VERSION 2.8.12 ) #### general package setup -project( tdeio-sword ) +project( tdeio_sword ) set( VERSION R14.1.0 ) @@ -69,8 +69,12 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ##### directories add_subdirectory( src ) -tde_conditional_add_subdirectory( BUILD_DOC doc ) -tde_conditional_add_subdirectory( BUILD_TRANSLATIONS translations ) + + +##### other data ################################ + +tde_conditional_add_project_docs( BUILD_DOC ) +tde_conditional_add_project_translations( BUILD_TRANSLATIONS ) ##### write configure files diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt deleted file mode 100644 index 70d6348..0000000 --- a/doc/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * ) -string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" ) - -foreach( _dir ${_dirs} ) - if( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir} AND - EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}/CMakeLists.txt ) - if( "${_dir}" STREQUAL "en" OR - "${_dir}" STREQUAL "man" OR - "${_linguas}" MATCHES "^;*$" OR - ";${_linguas};" MATCHES ";${_dir};" ) - add_subdirectory( ${_dir} ) - endif( ) - endif() -endforeach() diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt deleted file mode 100644 index c46c8ce..0000000 --- a/doc/en/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -file( GLOB _html RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.html ) - -install( - FILES ${_html} - DESTINATION ${HTML_INSTALL_DIR}/en/tdeio_sword -) - -tde_create_handbook( LANG en DESTINATION tdeio_sword ) diff --git a/doc/en/index.docbook b/doc/en/tdeioslave/sword/index.docbook similarity index 100% rename from doc/en/index.docbook rename to doc/en/tdeioslave/sword/index.docbook diff --git a/doc/en/compilation.html b/doc/html/compilation.html similarity index 100% rename from doc/en/compilation.html rename to doc/html/compilation.html diff --git a/doc/en/configuration.html b/doc/html/configuration.html similarity index 100% rename from doc/en/configuration.html rename to doc/html/configuration.html diff --git a/doc/en/credits.html b/doc/html/credits.html similarity index 100% rename from doc/en/credits.html rename to doc/html/credits.html diff --git a/doc/en/faq.html b/doc/html/faq.html similarity index 100% rename from doc/en/faq.html rename to doc/html/faq.html diff --git a/doc/en/index.html b/doc/html/index.html similarity index 100% rename from doc/en/index.html rename to doc/html/index.html diff --git a/doc/en/installation.html b/doc/html/installation.html similarity index 100% rename from doc/en/installation.html rename to doc/html/installation.html diff --git a/doc/en/introduction.html b/doc/html/introduction.html similarity index 100% rename from doc/en/introduction.html rename to doc/html/introduction.html diff --git a/doc/en/requirements.html b/doc/html/requirements.html similarity index 100% rename from doc/en/requirements.html rename to doc/html/requirements.html diff --git a/doc/en/using-tdeio_sword.html b/doc/html/using-tdeio_sword.html similarity index 100% rename from doc/en/using-tdeio_sword.html rename to doc/html/using-tdeio_sword.html diff --git a/src/sword.protocol b/src/sword.protocol index b0d33fa..3e6caae 100644 --- a/src/sword.protocol +++ b/src/sword.protocol @@ -7,7 +7,7 @@ reading=true defaultMimetype=text/html Icon=tdeio_sword Description=A tdeioslave for quick access to Bible texts within Konqueror -X-DocPath=tdeio_sword/index.html +X-DocPath=tdeioslave/sword/index.html determineMimetypeFromExtension=false Class=:local URIMode=uri diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt deleted file mode 100644 index 42b186a..0000000 --- a/translations/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -tde_auto_add_subdirectories() diff --git a/translations/messages/CMakeLists.txt b/translations/messages/CMakeLists.txt deleted file mode 100644 index 75c89f8..0000000 --- a/translations/messages/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -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( )