Browse Source

Update CMake rules accorting to TDE style.

Copy translations to a new directory layout.
Move documentation to a new directory layout.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 5 months ago
parent
commit
bb9ea88afc
Signed by: SlavekB
GPG Key ID: 608F5293A04BE668
  1. 83
      CMakeLists.txt
  2. 27
      ConfigureChecks.cmake
  3. 8
      config.h.cmake
  4. 7
      doc/Makefile.am
  5. 2
      doc/en/Makefile.am
  6. 0
      doc/en/TODO
  7. 0
      doc/en/bullets.png
  8. 0
      doc/en/complete_cmd1.png
  9. 0
      doc/en/complete_cmd2.png
  10. 0
      doc/en/complete_env1.png
  11. 0
      doc/en/complete_env2.png
  12. 0
      doc/en/config-complete.png
  13. 0
      doc/en/config-dblquotes.png
  14. 0
      doc/en/config-encoding.png
  15. 0
      doc/en/config-quickpreview.png
  16. 0
      doc/en/config-userhelp.png
  17. 0
      doc/en/delete.png
  18. 0
      doc/en/dialog-addhelp.png
  19. 0
      doc/en/dialog-docbrowser1.png
  20. 0
      doc/en/dialog-docbrowser2.png
  21. 0
      doc/en/dialog-pstools.png
  22. 0
      doc/en/dialog-tabular.png
  23. 0
      doc/en/environment.png
  24. 0
      doc/en/includegraphics.png
  25. 0
      doc/en/index.docbook
  26. 0
      doc/en/latex_example.png
  27. 0
      doc/en/latexhelp.html
  28. 0
      doc/en/psutils1.png
  29. 0
      doc/en/psutils15.png
  30. 0
      doc/en/psutils16.png
  31. 0
      doc/en/psutils2.png
  32. 0
      doc/en/psutils3.png
  33. 0
      doc/en/psutils5.png
  34. 0
      doc/en/psutils6.png
  35. 0
      doc/en/psutils7.png
  36. 0
      doc/en/psutils8.png
  37. 0
      doc/en/quickpreview.png
  38. 0
      doc/en/select.png
  39. 0
      doc/en/snap_autocomplete.png
  40. 0
      doc/en/snap_compile_error.png
  41. 0
      doc/en/snap_editusertag.png
  42. 0
      doc/en/snap_encoding.png
  43. 0
      doc/en/snap_kdvi_settings.png
  44. 0
      doc/en/snap_projectview.png
  45. 0
      doc/en/snap_projectview_add.png
  46. 0
      doc/en/snap_ref_choose.png
  47. 0
      doc/en/snap_ref_select.png
  48. 0
      doc/en/snap_sidebarmenu.png
  49. 0
      doc/en/snap_structview_label.png
  50. 0
      doc/en/snap_usertag.png
  51. 0
      doc/en/texgroup.png
  52. 149
      src/CMakeLists.txt
  53. 2
      src/dist/build_tarball.sh
  54. 874
      src/dist/createPackage.sh
  55. 2
      src/dist/quick_tarball.sh
  56. 2
      src/kile/CMakeL10n.txt
  57. 297
      src/kile/CMakeLists.txt
  58. 17
      src/kile/complete/CMakeLists.txt
  59. 7
      src/kile/complete/abbreviation/CMakeLists.txt
  60. 4
      src/kile/complete/dictionary/CMakeLists.txt
  61. 109
      src/kile/complete/tex/CMakeLists.txt
  62. 8
      src/kile/encodings/CMakeLists.txt
  63. 8
      src/kile/help/CMakeLists.txt
  64. 11
      src/kile/icons/CMakeLists.txt
  65. 9
      src/kile/icons/actions/CMakeLists.txt
  66. 8
      src/kile/pics/CMakeLists.txt
  67. 70
      src/kile/symbols/CMakeLists.txt
  68. 77
      src/kile/symbols/arrows/CMakeLists.txt
  69. 164
      src/kile/symbols/cyrillic/CMakeLists.txt
  70. 44
      src/kile/symbols/delimiters/CMakeLists.txt
  71. 72
      src/kile/symbols/greek/CMakeLists.txt
  72. 105
      src/kile/symbols/misc-math/CMakeLists.txt
  73. 142
      src/kile/symbols/misc-text/CMakeLists.txt
  74. 120
      src/kile/symbols/operators/CMakeLists.txt
  75. 159
      src/kile/symbols/relation/CMakeLists.txt
  76. 185
      src/kile/symbols/special/CMakeLists.txt
  77. 8
      src/kile/syntax/CMakeLists.txt
  78. 8
      src/kile/templates/CMakeLists.txt
  79. 20
      src/kile/test/CMakeLists.txt
  80. 0
      src/patches/.gitignore
  81. 2
      translations/Makefile.am
  82. 1
      translations/messages/Makefile.am
  83. 7340
      translations/messages/ar.po
  84. 8044
      translations/messages/bg.po
  85. 7599
      translations/messages/br.po
  86. 8359
      translations/messages/ca.po
  87. 7894
      translations/messages/cs.po
  88. 7608
      translations/messages/cy.po
  89. 8050
      translations/messages/da.po
  90. 8145
      translations/messages/de.po
  91. 8259
      translations/messages/el.po
  92. 8269
      translations/messages/en_GB.po
  93. 8180
      translations/messages/es.po
  94. 8004
      translations/messages/et.po
  95. 8635
      translations/messages/eu.po
  96. 8585
      translations/messages/fi.po
  97. 8425
      translations/messages/fr.po
  98. 7699
      translations/messages/ga.po
  99. 8268
      translations/messages/gl.po
  100. 8036
      translations/messages/hi.po
  101. 9648
      translations/messages/hu.po
  102. 7282
      translations/messages/is.po
  103. 9924
      translations/messages/it.po
  104. 7957
      translations/messages/ja.po
  105. 7287
      translations/messages/kile.pot
  106. 7546
      translations/messages/lt.po
  107. 8227
      translations/messages/ms.po
  108. 7620
      translations/messages/mt.po
  109. 8089
      translations/messages/nb.po
  110. 8383
      translations/messages/nds.po
  111. 8141
      translations/messages/nl.po
  112. 8368
      translations/messages/nn.po
  113. 7514
      translations/messages/pa.po
  114. 8579
      translations/messages/pl.po
  115. 8163
      translations/messages/pt.po
  116. 8306
      translations/messages/pt_BR.po
  117. 7398
      translations/messages/ro.po
  118. 7791
      translations/messages/ru.po
  119. 9212
      translations/messages/rw.po
  120. 8608
      translations/messages/sk.po
  121. 8083
      translations/messages/sr.po
  122. 8481
      translations/messages/sr@Latn.po
  123. 8049
      translations/messages/sv.po
  124. 8378
      translations/messages/ta.po
  125. 7609
      translations/messages/th.po
  126. 8075
      translations/messages/tr.po
  127. 8060
      translations/messages/uk.po
  128. 8055
      translations/messages/zh_CN.po

83
CMakeLists.txt

@ -0,0 +1,83 @@
############################################
# #
# Improvements and feedbacks are welcome #
# #
# This file is released under GPL >= 3 #
# #
############################################
cmake_minimum_required( VERSION 3.1 )
#### general package setup
project( kile )
set( VERSION R14.1.0 )
#### include essential cmake modules
include( FindPerl )
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( src )
##### other data ################################
tde_conditional_add_project_docs( BUILD_DOC )
tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
##### write configure files
configure_file( config.h.cmake config.h @ONLY )

27
ConfigureChecks.cmake

@ -0,0 +1,27 @@
###########################################
# #
# Improvements and feedback are welcome #
# #
# This file is released under GPL >= 3 #
# #
###########################################
# required stuff
tde_setup_architecture_flags( )
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( )
find_package( TQt )
find_package( TDE )
##### check for gcc visibility support #########
if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( )

8
config.h.cmake

@ -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@

7
doc/Makefile.am

@ -1,2 +1,7 @@
# the SUBDIRS is filled automatically by am_edit. If files are
# in this directory they are installed into the english dir
KDE_LANG = en
KDE_DOCS = kile
KDE_DOCS = AUTO
SUBDIRS = $(AUTODIRS)

2
doc/en/Makefile.am

@ -0,0 +1,2 @@
KDE_LANG = en
KDE_DOCS = kile

0
doc/TODO → doc/en/TODO

0
doc/bullets.png → doc/en/bullets.png

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

0
doc/complete_cmd1.png → doc/en/complete_cmd1.png

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

0
doc/complete_cmd2.png → doc/en/complete_cmd2.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
doc/complete_env1.png → doc/en/complete_env1.png

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

0
doc/complete_env2.png → doc/en/complete_env2.png

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

0
doc/config-complete.png → doc/en/config-complete.png

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

0
doc/config-dblquotes.png → doc/en/config-dblquotes.png

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
doc/config-encoding.png → doc/en/config-encoding.png

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

0
doc/config-quickpreview.png → doc/en/config-quickpreview.png

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

0
doc/config-userhelp.png → doc/en/config-userhelp.png

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
doc/delete.png → doc/en/delete.png

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

0
doc/dialog-addhelp.png → doc/en/dialog-addhelp.png

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
doc/dialog-docbrowser1.png → doc/en/dialog-docbrowser1.png

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

0
doc/dialog-docbrowser2.png → doc/en/dialog-docbrowser2.png

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
doc/dialog-pstools.png → doc/en/dialog-pstools.png

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

0
doc/dialog-tabular.png → doc/en/dialog-tabular.png

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

0
doc/environment.png → doc/en/environment.png

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
doc/includegraphics.png → doc/en/includegraphics.png

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

0
doc/index.docbook → doc/en/index.docbook

0
doc/latex_example.png → doc/en/latex_example.png

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

0
doc/latexhelp.html → doc/en/latexhelp.html

0
doc/psutils1.png → doc/en/psutils1.png

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
doc/psutils15.png → doc/en/psutils15.png

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

0
doc/psutils16.png → doc/en/psutils16.png

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

0
doc/psutils2.png → doc/en/psutils2.png

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
doc/psutils3.png → doc/en/psutils3.png

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

0
doc/psutils5.png → doc/en/psutils5.png

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

0
doc/psutils6.png → doc/en/psutils6.png

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
doc/psutils7.png → doc/en/psutils7.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
doc/psutils8.png → doc/en/psutils8.png

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

0
doc/quickpreview.png → doc/en/quickpreview.png

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

0
doc/select.png → doc/en/select.png

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

0
doc/snap_autocomplete.png → doc/en/snap_autocomplete.png

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

0
doc/snap_compile_error.png → doc/en/snap_compile_error.png

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

0
doc/snap_editusertag.png → doc/en/snap_editusertag.png

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

0
doc/snap_encoding.png → doc/en/snap_encoding.png

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

0
doc/snap_kdvi_settings.png → doc/en/snap_kdvi_settings.png

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
doc/snap_projectview.png → doc/en/snap_projectview.png

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

0
doc/snap_projectview_add.png → doc/en/snap_projectview_add.png

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

0
doc/snap_ref_choose.png → doc/en/snap_ref_choose.png

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

0
doc/snap_ref_select.png → doc/en/snap_ref_select.png

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

0
doc/snap_sidebarmenu.png → doc/en/snap_sidebarmenu.png

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

0
doc/snap_structview_label.png → doc/en/snap_structview_label.png

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

0
doc/snap_usertag.png → doc/en/snap_usertag.png

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

0
doc/texgroup.png → doc/en/texgroup.png

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

149
src/CMakeLists.txt

@ -1,139 +1,22 @@
PROJECT( kile )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
add_subdirectory( kile )
SET( KILE_VERSION CACHE STRING "Kile's version; can be used to install special documentation files in share/doc/kile-$KILE_VERSION/" )
##### other data
SET( kile_PO_FILE "kile.po" )
SET( kile_DOCBOOK "index.docbook" )
tde_create_translated_desktop(
SOURCE x-kilepr.desktop
DESTINATION ${MIME_INSTALL_DIR}/text
)
MACRO( KILE_ADD_DOCBOOK_DIRECTORY _sources _relative_dir _docbook _language )
# only depend on images
FILE( GLOB_RECURSE _dependencies ${CMAKE_CURRENT_SOURCE_DIR}/${_relative_dir}/*.[pP][nN][gG] )
FILE( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir} )
SET( _source_docbook ${CMAKE_CURRENT_SOURCE_DIR}/${_relative_dir}/${_docbook} )
SET( _compiled_docbook ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir}/index.cache.bz2 )
ADD_CUSTOM_COMMAND(OUTPUT ${_compiled_docbook}
COMMAND ${KILE_MEINPROC} --check --cache index.cache.bz2 ${_source_docbook}
DEPENDS ${_dependencies} ${_source_docbook}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir}
COMMENT "Compiling ${_language} docbook in ${_relative_dir}/${_docbook}" )
INSTALL( FILES ${_compiled_docbook} ${_dependencies} DESTINATION share/doc/tde/HTML/${_language})
SET( ${_sources} ${${_sources}} ${_compiled_docbook} )
ENDMACRO( KILE_ADD_DOCBOOK_DIRECTORY _sources _docbook _language )
MACRO( KILE_ADD_TRANSLATION_DIRECTORY _sources _relative_dir _file _language )
FILE( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir} )
GET_FILENAME_COMPONENT(_base_name ${_file} NAME_WE)
SET( _source_file ${CMAKE_CURRENT_SOURCE_DIR}/${_relative_dir}/${_file} )
SET( _base_compiled_file ${_base_name}.mo)
SET( _compiled_file ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir}/${_base_compiled_file} )
ADD_CUSTOM_COMMAND(OUTPUT ${_compiled_file}
COMMAND ${KILE_MSGFMT} -o ${_compiled_file} ${_source_file}
DEPENDS ${_source_file}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_relative_dir}
COMMENT "Compiling ${_language} translation file" )
INSTALL( FILES ${_compiled_file} DESTINATION share/locale/${_language}/LC_MESSAGES )
SET( ${_sources} ${${_sources}} ${_compiled_file} )
ENDMACRO( KILE_ADD_TRANSLATION_DIRECTORY _sources _relative_dir _file _language )
MACRO( KILE_ADD_TRANSLATION_DIRECTORIES _documentation_sources _translation_sources _dir )
FILE( GLOB _subdirectories ${_dir}/* )
FOREACH( _entry ${_subdirectories} )
IF( IS_DIRECTORY ${_entry} )
GET_FILENAME_COMPONENT( _language ${_entry} NAME )
IF( KILE_MSGFMT AND EXISTS ${_entry}/messages )
KILE_ADD_TRANSLATION_DIRECTORY( ${_translation_sources} translations/${_language}/messages ${kile_PO_FILE} ${_language} )
SET(_translations_built ${_translations_built} ${_language} )
ENDIF( KILE_MSGFMT AND EXISTS ${_entry}/messages )
IF( KILE_MEINPROC AND EXISTS ${_entry}/doc )
KILE_ADD_DOCBOOK_DIRECTORY( ${_documentation_sources} translations/${_language}/doc ${kile_DOCBOOK} ${_language} )
SET(_docbooks_built ${_docbooks_built} ${_language} )
ENDIF( KILE_MEINPROC AND EXISTS ${_entry}/doc )
ENDIF( IS_DIRECTORY ${_entry} )
ENDFOREACH( _entry ${_subdirectories} )
IF( _translations_built )
MESSAGE( STATUS "Building translations for ${_translations_built}" )
ELSE( _translations_built )
MESSAGE( STATUS "Not building translations" )
ENDIF( _translations_built )
IF( _docbooks_built )
MESSAGE( STATUS "Building documentation for ${_docbooks_built}" )
ELSE( _docbooks_built )
MESSAGE( STATUS "Not building additional documentation" )
ENDIF( _docbooks_built )
ENDMACRO( KILE_ADD_TRANSLATION_DIRECTORIES _documentation_sources _translation_sources _dir )
MACRO( KILE_FIND_DOC_TOOLS )
FIND_PROGRAM( KILE_MEINPROC "meinproc" DOC "path of the meinproc executable")
IF( KILE_MEINPROC )
MESSAGE( STATUS "Found meinproc executable: ${KILE_MEINPROC}" )
ELSE( KILE_MEINPROC )
MESSAGE( STATUS "meinproc executable not found" )
ENDIF( KILE_MEINPROC )
FIND_PROGRAM( KILE_MSGFMT "msgfmt" DOC "path of the msgfmt executable")
IF( KILE_MEINPROC )
MESSAGE( STATUS "Found msgfmt executable: ${KILE_MSGFMT}" )
ELSE( KILE_MEINPROC )
MESSAGE( STATUS "msgfmt executable not found" )
ENDIF( KILE_MEINPROC )
IF( KILE_MEINPROC AND KILE_MSGFMT )
SET( KILE_DOC_TOOLS_FOUND true )
ENDIF( KILE_MEINPROC AND KILE_MSGFMT )
ENDMACRO( KILE_FIND_DOC_TOOLS )
IF( EXISTS ${kile_SOURCE_DIR}/doc OR EXISTS ${kile_SOURCE_DIR}/translations )
KILE_FIND_DOC_TOOLS( )
ENDIF( EXISTS ${kile_SOURCE_DIR}/doc OR EXISTS ${kile_SOURCE_DIR}/translations )
IF( EXISTS ${kile_SOURCE_DIR}/doc )
IF( KILE_MEINPROC )
MESSAGE( STATUS "Building standard documentation")
KILE_ADD_DOCBOOK_DIRECTORY( kile_DOCUMENTATION_SOURCES doc index.docbook en )
ENDIF( KILE_MEINPROC )
ELSE( EXISTS ${kile_SOURCE_DIR}/doc )
MESSAGE( STATUS "Not building standard documentation")
ENDIF( EXISTS ${kile_SOURCE_DIR}/doc )
IF( EXISTS ${kile_SOURCE_DIR}/translations )
IF( KILE_MEINPROC OR KILE_MSGFMT )
KILE_ADD_TRANSLATION_DIRECTORIES( kile_DOCUMENTATION_SOURCES kile_TRANSLATION_SOURCES ${kile_SOURCE_DIR}/translations )
ENDIF( KILE_MEINPROC OR KILE_MSGFMT )
ELSE( EXISTS ${kile_SOURCE_DIR}/translations )
MESSAGE( STATUS "Not building translations")
ENDIF( EXISTS ${kile_SOURCE_DIR}/translations )
IF( kile_DOCUMENTATION_SOURCES )
ADD_CUSTOM_TARGET(docbooks ALL DEPENDS ${kile_DOCUMENTATION_SOURCES})
ENDIF( kile_DOCUMENTATION_SOURCES )
IF( kile_TRANSLATION_SOURCES )
ADD_CUSTOM_TARGET(translations ALL DEPENDS ${kile_TRANSLATION_SOURCES})
ENDIF( kile_TRANSLATION_SOURCES)
ADD_SUBDIRECTORY( kile )
########### install files ###############
INSTALL( FILES x-kilepr.desktop DESTINATION share/mimelink/text )
INSTALL( FILES kile.upd kile1.6_upd.pl kile1.7_upd.pl kile1.9_upd.pl kile1.9-1_upd.pl kile2.0-1_upd.pl kile2.0-2_upd.pl kile2.0-3_upd.pl kile2.0-4_upd.pl kile2.0-5_upd.pl DESTINATION share/apps/tdeconf_update )
IF( KILE_VERSION )
SET(_KILE_SPECIAL_DOC_DIR "share/doc/kile-${KILE_VERSION}")
ELSE( KILE_VERSION )
SET(_KILE_SPECIAL_DOC_DIR "share/doc/kile")
ENDIF( KILE_VERSION )
INSTALL( FILES AUTHORS ChangeLog README README.cwl kile-remote-control.txt README.MacOSX TODO DESTINATION ${_KILE_SPECIAL_DOC_DIR})
install(
FILES kile.upd
DESTINATION ${KCONF_UPDATE_INSTALL_DIR}
)
install(
PROGRAMS
kile1.6_upd.pl kile1.7_upd.pl kile1.9_upd.pl kile1.9-1_upd.pl
kile2.0-1_upd.pl kile2.0-2_upd.pl kile2.0-3_upd.pl kile2.0-4_upd.pl kile2.0-5_upd.pl
DESTINATION ${KCONF_UPDATE_INSTALL_DIR}
)

2
src/dist/build_tarball.sh vendored

@ -1,2 +0,0 @@
export UNSERMAKE=no
./createPackage.sh -ab trunk/extragear/office -a kile --i18n-sub extragear-office --admin branches/KDE/3.5/kde-common/admin -av 1.9 --package

874
src/dist/createPackage.sh vendored

@ -1,874 +0,0 @@
#!/bin/bash
#
# Extract an application from KDE svn, including documentation and translations.
#
# Authors: Michael Buesch <mbuesch@freenet.de>
# Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>
# Sebastian Trueg
# Aurelien Gateau
# Klas Kalass
# License: GPL (http://www.gnu.org/)
#
#
# Directory lay-out of packages
# Application:
# + name-version
# + admin
# + src
# + doc
# + translations
# + nl
# + messages
# + doc
# + de (etc.)
#
# If the --notoplevel parameter is used everything under src is put into the root dir
#
# Translations:
# + nl
# + messages
# + doc
# + de (etc.)
COPYRIGHT="2005 Michael Buesch <mbuesch@freenet.de>
2004-2005 Jeroen Wijnhout <Jeroen.Wijnhout@kdemail.net>
2003-2004 Sebastian Trueg
2002 Aurelien Gateau
2002-2004 Klas Kalass"
LICENSE="GNU General Public License v2 or later"
SCRIPTNAME="createPackage.sh"
SCRIPTVERSION='$Revision$'
SCRIPTVERSION="`echo $SCRIPTVERSION | cut -d ' ' -f2`"
function showVersion
{
echo "$SCRIPTNAME revision $SCRIPTVERSION"
}
function showHelp
{
showVersion
echo -e "
Extract an application from KDE svn, including documentation and translations.
Copyright $COPYRIGHT
License: $LICENSE
usage:
$0 -ab <PATH> -a <NAME> [OPTIONS]
These parameters are mandatory:
-ab|--app-base <PATH> Relative (to svnroot) path to the KDE or extragear module.
Example:
trunk/extragear/utils
If you want to checkout from a branch, you might use:
branches/foobar/1.2
-a|--app <NAME> Name of the application to checkout.
This is the subdir you want to checkout in --app-base.
The following options are available:
-d|--svnroot <URL> Base URL of the svn repository.
svn://anonsvn.kde.org/home/kde is the default.
-ib|--i18n-base <PATH> Path to the i18n translations base.
Default:
trunk/l10n
-is|--i18n-sub <PATH> Path to the i18n files under the
\$i18n-base/\$LANGUAGE/messages
directories. Example:
extragear-office
-ids|--i18n-docsub <PATH> Path to the i18n docbook files under the
\$i18n-base/\$LANGUAGE/docs
directories. Example:
kdeextragear-2
Default:
path of --i18n-sub
--admin <PATH> Path to the /admin/ directory.
Default:
trunk/KDE/kde-common/admin
-b|--builddir <DIRNAME> Name of the temporary working directory where
all files will be put. Default is \"./build\"
-av|--appversion <VERSION> Version of the application (only for correct
naming of the tar archives).
--nodoc Do not try to get any documentation.
--noi18n Do not search for any translations.
--split Make separate packages for the application and translations.
--package [TYPE] Create tarballs (.tar.gz and/or .tar.bz2).
You can specify an optional package type: \"gzip\" or \"bzip2\"
If no type is given, both types will be generated.
--packagedir <TARBALLDIR> Place a copy of the packages into TARBALLDIR.
--postprocess <SCRIPT> Runs SCRIPT on the package, after all data is gathered, but before
the tarball is generated. This allows packagers to give the
\"final touch\" to the package.
--pofiles <POFILES> Space seperated list of pofiles this application uses without the extension.
Defaults to the name of the application.
-l|--languages <LANGUAGES> Space seperated list of languages to search for
translations. If no languages are specified, all
available languages will be included.
-el|--exclude-languages <LANGUAGES> Space seperated list of languages not to include
in the package.
--logfile <FILE> Write all logging information to FILE.
If FILE is \"no\", no logfile will be created.
--notoplevel Do not create an additional src directory. Do not checkout the top level files.
Use configure.in.in and Makefile.am from the application's root directory.
-v|--version Version of this script
-h|--help This Help"
}
#
# Some simple helper functions.
#
function printlog
{
if [ -n "$LOGFILE" ]; then
echo -e "$SCRIPTNAME: $*" >> $LOGFILE
fi
}
function printnlog
{
if [ -n "$LOGFILE" ]; then
echo -n -e "$SCRIPTNAME: $*" >> $LOGFILE
fi
}
function print
{
echo -e "$SCRIPTNAME: $*"
printlog $*
}
function printn
{
echo -n -e "$SCRIPTNAME: $*"
printnlog $*
}
function runCommand
{
stdoutlog="$LOGFILE"
if [ -z "$stdoutlog" ]; then
stdoutlog="/dev/null"
fi
$* >> $stdoutlog 2>&1
LASTRESULT=$?
print " [$1 returned $LASTRESULT]"
}
function runCommandRedirect
{
destinationfile=$1
shift
stdoutlog="$LOGFILE"
if [ -z "$stdoutlog" ]; then
stdoutlog="/dev/null"
fi
$* > $destinationfile 2>>$stdoutlog
LASTRESULT=$?
if [ $LASTRESULT -ne 0 ]; then
rm $destinationfile
fi
print " [$1 returned $LASTRESULT]"
}
function testParameter
{
if [ -z "$2" ]; then
echo "Please give a value to parameter $1"
exit 1
fi
}
function makeDir
{
cd $BUILDDIR
print " Creating directory $*"
runCommand mkdir $*
}
#
# Removes the .svn directories
#
function removeVCDirs
{
if ! [ -d "$BUILDDIR/$*" ]; then
return
fi
print " Removing VCDirs $*"
cd $BUILDDIR/$*
find . -type d -a -name '.svn' | xargs rm -rf
}
#
# This is our work-horse. getResource retrieves all
# data needed to assemble a working package.
# Available resources:
# topleveldir, admindir, source, documentation,
# languagelist, guitranslation, doctranslation
#
function getResource
{
DESTINATION=$2
SINGLEFILEHACK="no"
case $1 in
topleveldir)
COMMAND="svn export -N $SVN_CHECKOUT_OPTIONS $SVNROOT/$APPBASE $DESTINATION"
;;
admindir)
COMMAND="svn export $SVN_CHECKOUT_OPTIONS $SVNROOT/$ADMINDIR $DESTINATION"
;;
source)
COMMAND="svn export $SVN_CHECKOUT_OPTIONS $SVNROOT/$APPBASE/$APPNAME $DESTINATION"
;;
documentation)
COMMAND="svn export $SVN_CHECKOUT_OPTIONS $SVNROOT/$APPBASE/doc/$APPNAME $DESTINATION"
;;
languagelist)
SINGLEFILEHACK="yes"
COMMAND="svn cat $SVN_CHECKOUT_OPTIONS $SVNROOT/$I18NBASE/subdirs"
;;
guitranslation)
DESTINATION=$3/$4.po
SINGLEFILEHACK="yes"
COMMAND="svn cat $SVN_CHECKOUT_OPTIONS $SVNROOT/$I18NBASE/$2/messages/$I18NSUB/$4.po"
;;
doctranslation)
DESTINATION=$3
COMMAND="svn export $SVN_CHECKOUT_OPTIONS $SVNROOT/$I18NBASE/$2/docs/$I18NDOCSUB/$APPNAME $DESTINATION"
;;
*)
print "ERROR: Unknown resource $1"
exit 1
;;
esac
print " Retrieving resource: $1"
printlog " getResource $1: $COMMAND"
cd $BUILDDIR
if [ $SINGLEFILEHACK = "yes" ]; then
runCommandRedirect $DESTINATION $COMMAND
else
runCommand $COMMAND
fi
if [ $LASTRESULT != "0" ]; then
print "Warning: Resource \"$1\" is not available."
fi
return $LASTRESULT
}
#
# Creates the build dir, the dir where the packages
# are assembled.
#
function setupBuildDir
{
print "Creating the build directory..."
print " ($BUILDDIR)"
# clean up first
if [ -d $BUILDDIR ]; then
print " Removing the old build directory"
rm -rf $BUILDDIR
fi
mkdir $BUILDDIR
}
#
# Gather all data in the build dir needed to build
# the application (without translations).
#
function assembleApplicationData
{
print "Assembling the source code..."
APPDIR=$APPNAME-$APPVERSION
print " ($APPDIR)"
if [ $TOPLEVEL = "yes" ]; then
getResource "topleveldir" $APPDIR
fi
getResource "admindir" $APPDIR/admin
if [ $TOPLEVEL = "yes" ]; then
getResource "source" $APPDIR/src
else
getResource "source" $APPDIR
fi
}
#
# Copies the GNU (README, TODO, Changelog, etc.) files.
#
function moveGNUFiles
{
print " Moving the standard GNU files"
for file in $GNUFiles
do
if [ -f $BUILDDIR/$APPDIR/src/$file ]; then
mv $BUILDDIR/$APPDIR/src/$file $BUILDDIR/$1
fi
done
}
#
# Cleanup the application or i18n directory by removing
# unneccessary files and directories.
#
function cleanupDirectory
{
dir="$1"
print "Removing unneccessary files and directories"
for file in $CLEANUPFILES
do
path="$dir/$file"
if [ -f "$path" ]; then
rm -f $path
printlog " Removed file: $path"
elif [ -d "$path" ]; then
rm -Rf $path
printlog " Removed directory: $path"
fi
done
}
#
# After all data for the app is gathered, some files
# still need to be shuffled around.
#
function postProcessApplicationDir
{
print "Post-processing the application directory..."
if [ $TOPLEVEL = "yes" ]; then
moveGNUFiles $APPDIR
fi
if [ ! -z "$POSTPROCESSSCRIPT" ]; then
print "Running post-processing script..."
cd $BUILDDIR/$APPDIR
$POSTPROCESSSCRIPT
err="$?"
if [ $err -ne 0 ]; then
print "ERROR: Post-processing script failed (return status: $err)"
exit $err
fi
print "Post-processing script finished."
fi
}
function retrieveDocumentation
{
if [ $GETDOC = "no" ]; then
return
fi
print "Retrieving the documentation..."
DOCDIR=$APPDIR/doc
print " ($DOCDIR)"
getResource "documentation" $DOCDIR
}
#
# Determines what languages need to be retrieved.
# If LANGUAGES was not set using the -l switch,
# the tde-i18n/subdirs file is used.
#
function getLanguageList
{
print " Determining which languages to include..."
if [ -z "$LANGUAGES" ]; then
getResource "languagelist" languagelist
if [ -e $BUILDDIR/languagelist ]; then
LANGUAGES=`cat $BUILDDIR/languagelist`
rm $BUILDDIR/languagelist
else
print "ERROR:"
print "ERROR: Failed to automatically detect which languages to include."
print "ERROR:"
exit 1
fi
fi
# Remove the excluded languages from the list
LANGLIST=""
for language in $LANGUAGES ; do
EXCLUDE="false"
for exclang in $EXCLUDELANGUAGES ; do
if [ "$exclang" = "$language" ]; then
EXCLUDE="true"
break
fi
done
if [ $EXCLUDE = "false" ]; then
LANGLIST="$LANGLIST $language"
fi
done
LANGUAGES=$LANGLIST
print "Language list: $LANGUAGES"
}
#
# Creates the dir that holds the translations. This is either
# a "translations" dir in the application build dir, or, if the
# --split switch is used, the root dir of a separate i18n package.
#
function setupI18NDir
{
if [ $SPLIT = "yes" ]; then
I18NDIR="$APPNAME-i18n-$APPVERSION"
getResource "topleveldir" $I18NDIR
getResource "admindir" $I18NDIR/admin
moveGNUFiles $I18NDIR
TRANSDIR=$I18NDIR
else
I18NDIR=$APPDIR
TRANSDIR="$I18NDIR/translations"
makeDir $TRANSDIR
fi
}
function createTranslationDirMakefile
{
if [ $GETI18N = "no" ]; then
return
fi
print " Creating Makefile.am in $1."
CONTENTS="SUBDIRS=$INCLUDED_LANGUAGES"
echo $CONTENTS > $1/Makefile.am
}
function createTranslationMakefile
{
print " Creating Makefile.am in $1."
CONTENTS="SUBDIRS="
if [ -d "$1/messages" ]; then
CONTENTS="$CONTENTS messages"
fi
if [ -d "$1/doc" ]; then
CONTENTS="$CONTENTS doc";
fi
echo $CONTENTS > $1/Makefile.am
}
function createTranslationMakefiles
{
if [ $GETI18N = "no" ]; then
return
fi
for language in $INCLUDED_LANGUAGES ; do
createTranslationMakefile $BUILDDIR/$TRANSDIR/$language
done
}
function createGUITranslationMakefile
{
print " Creating Makefile.am in $2."
echo "KDE_LANG = $1
SUBDIRS = \$(AUTODIRS)
POFILES = AUTO" > $2/Makefile.am
}
function createDocTranslationMakefile
{
print " Creating Makefile.am in $2."
echo "KDE_LANG = $1
KDE_DOCS=$APPNAME" > $2/Makefile.am
}
#
# Get the .po files and put them in xx/messages
# subdirectories, where xx is the language ISO code.
#
function retrieveGUITranslations
{
if [ $GETI18N = "no" ]; then
return
fi
print "Retrieving GUI translations..."
setupI18NDir
print " ($TRANSDIR)"
# determine which languages to get
getLanguageList
# then get them (its really simple actually)
INCLUDED_LANGUAGES=""
for language in $LANGUAGES
do
print " Including language $language"
makeDir $TRANSDIR/$language
makeDir $TRANSDIR/$language/messages
INCLUDE_THIS_LANG="yes"
for pofile in $APP_POFILES; do
getResource "guitranslation" $language $TRANSDIR/$language/messages $pofile
if [ ! -e $BUILDDIR/$TRANSDIR/$language/messages/$pofile.po ]; then
INCLUDE_THIS_LANG="no"
fi
done
if [ $INCLUDE_THIS_LANG = "yes" ]; then
createGUITranslationMakefile $language $BUILDDIR/$TRANSDIR/$language/messages
INCLUDED_LANGUAGES="$INCLUDED_LANGUAGES $language"
else
rm -rf $TRANSDIR/$language
fi
done
}
function retrieveDocTranslations
{
if [ $GETI18N = "no" ]; then
return
fi
print "Retrieving documentation translations..."
for language in $INCLUDED_LANGUAGES ; do
print " Including documentation for language $language"
getResource "doctranslation" $language $TRANSDIR/$language/doc
if [ -e $BUILDDIR/$TRANSDIR/$language/doc/index.docbook ]
then
createDocTranslationMakefile $language $BUILDDIR/$TRANSDIR/$language/doc
else
print " No translations for $language docs available."
rm -rf $TRANSDIR/$language/doc
fi
done
}
#
# Create the configure script and Makefile.in's.
#
function packageApplication
{
cd $BUILDDIR
print "Creating configure script and Makefile.in files"
(cd $APPDIR; runCommand make -f admin/Makefile.common cvs)
cleanupDirectory $APPDIR
TARNAME="$APPNAME-$APPVERSION.tar"
if [ $PACKAGE = "gzip" ] || [ $PACKAGE = "yes" ]; then
print "Packaging application ($TARNAME.gz)..."
$GZIP $TARNAME.gz $APPDIR
if [ $BUILDDIR != $TARBALLDIR ]; then
cp $TARNAME.gz $TARBALLDIR
fi
fi
if [ $PACKAGE = "bzip2" ] || [ $PACKAGE = "yes" ]; then
print "Packaging application ($TARNAME.bz2)..."
$BZIP2 $TARNAME.bz2 $APPDIR
if [ $BUILDDIR != $TARBALLDIR ]; then
cp $TARNAME.bz2 $TARBALLDIR
fi
fi
}
#
# Create the configure script and Makefile.in's.
#
function packageTranslations
{
if [ $SPLIT != "yes" ] || [ $GETI18N != "yes" ]; then
return
fi
cd $BUILDDIR
print "Creating translations configure script and Makefile.in files"
(cd $I18NDIR; runCommand make -f admin/Makefile.common cvs)
cleanupDirectory $I18NDIR
TARNAME="$APPNAME-i18n-$APPVERSION.tar"
if [ $PACKAGE = "gzip" ] || [ $PACKAGE = "yes" ]; then
print "Packaging translations ($TARNAME.gz)..."
$GZIP $TARNAME.gz $I18NDIR
if [ $BUILDDIR != $TARBALLDIR ]; then
cp $TARNAME.gz $TARBALLDIR
fi
fi
if [ $PACKAGE = "bzip2" ] || [ $PACKAGE = "yes" ]; then
print "Packaging translations ($TARNAME.bz2)..."
$BZIP2 $TARNAME.bz2 $I18NDIR
if [ $BUILDDIR != $TARBALLDIR ]; then
cp $TARNAME.bz2 $TARBALLDIR
fi
fi
}
#
# Force the script to quit
#
function cancelScript
{
errorcode="$1"
if [ -z "$errorcode" ]
then
errorcode="1"
fi
print "Script canceled ($errorcode)"
exit $errorcode
}
#
# Do basic parameter checks, print some basic stuff
# and initialize basic things.
#
function initBasic
{
trap "cancelScript" SIGINT SIGTERM
if [ -n "$LOGFILE" ]; then
echo "$SCRIPTNAME revision $SCRIPTVERSION `date`" > $LOGFILE
fi
if [ -z "$APPBASE" ]; then
print "You need to specify an application base path (--app-base). See $SCRIPTNAME --help for more info."
exit 1
fi
if [ -t "$APPNAME" ]; then
print "You need to specify an application name (--app). See $SCRIPTNAME --help for more info."
exit 1
fi
if [ "$GETI18N" = "yes" ] && [ -z "$I18NSUB" ]; then
print "You need to specify the i18n subdir or disable i18n checkout (--i18n-sub or --noi18n). See $SCRIPTNAME --help for more info."
exit 1
fi
if [ -z "$I18NDOCSUB" ]; then
I18NDOCSUB="$I18NSUB"
fi
if [ -z "$APP_POFILES" ]; then