Package: ibus-table-chinese / 1.8.2-3

0001-revert-CMakeLists.txt.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,17 +1,20 @@
 cmake_minimum_required(VERSION 2.6.2)
 
-# Included scripts do automatic cmake_policy PUSH and POP.
-# OLD: CMake policy in included script will affect the invoker.
-# CMAKE_POLICY(SET CMP0011 OLD)
+# CMP0011 should be set here, otherwise policy set in module won't affect
+# here.
+CMAKE_POLICY(SET CMP0011 OLD)
 
 # Default CMAKE_INSTALL_PREFIX should be set before PROJECT()
 SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install dir prefix")
 
 # Whether to build on fedora
-SET(CMAKE_FEDORA_ENABLE_FEDORA_BUILD "1" CACHE STRING "Enable fedora build")
+SET(CMAKE_FEDORA_ENABLE_FEDORA_BUILD "0" CACHE STRING "Enable fedora build")
 
-# Message level INFO1 (5)
-SET(MANAGE_MESSAGE_LEVEL 5 CACHE STRING "Message (Verbose) Level")
+# Message level M_OFF (4)
+SET(MANAGE_MESSAGE_LEVEL 4 CACHE STRING "Message (Verbose) Level")
+
+# Default support Gnome shell
+SET(GNOME_SHELL 1)
 
 ####################################################################
 # Project specific information
@@ -19,34 +22,20 @@
 PROJECT(ibus-table-chinese NONE)
 SET(PRJ_SUMMARY "Chinese input tables for IBus")
 
-SET(SUMMARY_TRANSLATIONS
-    "zh_CN" "中文码表输入法"
-    "zh_TW" "中文碼表輸入法"
-    )
-
 SET(PRJ_DESCRIPTION
 "ibus-table-chinese is provides the infrastructure for Chinese input methods.
 Input tables themselves are in subpackages."
     )
 
-SET(DESCRIPTION_TRANSLATIONS
-    "zh_TW" "ibus-table-chinese 提供了中文碼表輸入法的基礎架構。
-    輸入法本身則在子套件裡。"
-    )
-
 SET(AUTHORS "Yuwei Yu, Caius 'kaio' Chance, Ding-Yi Chen")
 SET(MAINTAINER "Ding-Yi Chen <dchen@redhat.com>")
 SET(VENDOR "Red Hat, Inc")
 SET(LICENSE "GPLv3+")
-SET(PRJ_GROUP "System Environment/Libraries")
-SET(BUILD_ARCH "noarch")
-SET(RPM_SPEC_URL "http://code.google.com/p/ibus/")
-SET(RPM_SPEC_SOURCES "https://fedorahosted.org/releases/c/m/%{name}/%{name}-%{version}-Source.tar.gz")
 
 ####################################################################
 # Includes
 #
-LIST(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/Modules)
+SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/Modules ${CMAKE_ROOT}/Modules )
 
 # Create a link if Modules/ does not exists
 IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake-fedora/Modules)
@@ -63,6 +52,7 @@
 	SET(LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Library dir")
     ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "64")
     SET(LIBEXEC_DIR "${LIB_DIR}" CACHE PATH "LIBEXEC dir")
+    MESSAGE("*Hi")
 ENDIF(NOT CMAKE_FEDORA_ENABLE_FEDORA_BUILD)
 
 INCLUDE(ManageEnvironment RESULT_VARIABLE MANAGE_ENVIRONMENT_PATH)
@@ -77,56 +67,82 @@
 
 INCLUDE(ManageVersion)
 RELEASE_NOTES_READ_FILE()
-INCLUDE(ManageArchive)
-INCLUDE(ManageFile)
-INCLUDE(ManageSourceVersionControl)
-INCLUDE(ManageTarget)
-INCLUDE(ManageTranslation)
 INCLUDE(ManageUninstall)
-ENABLE_TESTING()
 
 ####################################################################
-# Dependencies
+# Required
 #
 
-INCLUDE(ManageDependency)
-## Requires
-MANAGE_DEPENDENCY(REQUIRES IBUS-TABLE VER "1.2.0" REQUIRED)
-
-## Build Requires
-MANAGE_DEPENDENCY(BUILD_REQUIRES CMAKE VER "2.6.2" REQUIRED)
-MANAGE_DEPENDENCY(BUILD_REQUIRES IBUS-TABLE VER "1.2.0" REQUIRED DEVEL)
-PRJ_INFO_CMAKE_APPEND(${PRJ_INFO_CMAKE} REQUIRES)
-PRJ_INFO_CMAKE_APPEND(${PRJ_INFO_CMAKE} BUILD_REQUIRES)
+FIND_PACKAGE(PkgConfig)
+PKG_CHECK_MODULES(IBUS_TABLE REQUIRED ibus-table>=1.2)
 
 ####################################################################
 # Building
 #
+
 ADD_SUBDIRECTORY(tables)
 
 ####################################################################
 # Installing
 #
 
-MANAGE_SOURCE_VERSION_CONTROL_GIT()
+# Install docs
+# Note: Need to use filename only, otherwise
+# ${CMAKE_SOURCE_DIR}/RELEASE-NOTES.txt will be deleted in spec
+#
+
+GET_FILENAME_COMPONENT(_releaseFileName "${RELEASE_FILE}" NAME)
+SET(INSTALL_DOCS ${_releaseFileName} AUTHORS README ChangeLog COPYING README)
+STRING_JOIN(PRJ_DOC_LIST " " ${INSTALL_DOCS})
+
+INSTALL(FILES ${INSTALL_DOCS}
+    DESTINATION "${PRJ_DOC_DIR}")
 
-INSTALL(FILES AUTHORS README ChangeLog COPYING DESTINATION ${PRJ_DOC_DIR})
+####################################################################
+# Source Version Control
+#
+INCLUDE(ManageSourceVersionControl)
+MANAGE_SOURCE_VERSION_CONTROL_GIT()
 
 ####################################################################
 # Packing
 #
+INCLUDE(ManageArchive)
 
-## Pack Source 
-SET(SOURCE_ARCHIVE_DIR ${CMAKE_BINARY_DIR}/SOURCES CACHE PATH "Source Archive Dir")
-PACK_SOURCE_ARCHIVE("${SOURCE_ARCHIVE_DIR}"
-    GITIGNORE ${CMAKE_SOURCE_DIR}/.gitignore
+IF(CMAKE_FEDORA_ENABLE_FEDORA_BUILD)
+    INCLUDE(ManageRPM)
+    INCLUDE(ManageReleaseFedora)
+ENDIF(CMAKE_FEDORA_ENABLE_FEDORA_BUILD)
+INCLUDE(ManageRelease)
+
+SET(PRJ_IGNORE_FILES_COMMON
+    "/doc/"  "\\\\.spec$" "messages.po$" "\\\\.orig$" "/cmake-fedora/"
+    "/\\\\.cache/"
+    "\\\\.db$"
+    )
+
+LIST(APPEND PRJ_IGNORE_FILES_COMMON
+    "\\\\.utf8$" "\\\\.tmp$" "\\\\.freq$" "\\\\.tab$"
+    "tables/array/.*\\\\.head$"
+    "array30.txt" "array30-big.txt" "wubi-haifeng86.txt"
     )
 
-## Pack RPM
+LIST(APPEND SOURCE_ARCHIVE_IGNORE_FILES
+    ${PRJ_IGNORE_FILES_COMMON} "/bin/" "\\\\.xml$" "\\\\.schemas")
+
+IF(RPM_BUILD_SOURCES)
+    SET(SOURCE_ARCHIVE_DIR ${RPM_BUILD_SOURCES})
+ELSE(RPM_BUILD_SOURCES)
+    SET(SOURCE_ARCHIVE_DIR ${CMAKE_BINARY_DIR}/SOURCES)
+ENDIF(RPM_BUILD_SOURCES)
+
+PACK_SOURCE_ARCHIVE("${SOURCE_ARCHIVE_DIR}")
 IF(CMAKE_FEDORA_ENABLE_FEDORA_BUILD)
-    SET(RPM_BUILD_SOURCES ${SOURCE_ARCHIVE_DIR})
-    INCLUDE(ManageRPM)
-    PACK_RPM(SPEC_IN "SPECS/project.spec.in")
+    PACK_RPM()
+    RELEASE_FEDORA(fedora el6)
+    # "Off" Warning is displayed if mock is not installed.
+    RPM_MOCK_BUILD()
+    MANAGE_RELEASE(release_fedora)
 ENDIF(CMAKE_FEDORA_ENABLE_FEDORA_BUILD)
 
 ####################################################################
@@ -142,20 +158,10 @@
 #MANAGE_UPLOAD_CMD(scp src UPLOAD_FILES ${SOURCE_ARCHIVE_FILE})
 #ADD_DEPENDENCIES(upload upload_src)
 
-INCLUDE(ManageRelease)
-IF(CMAKE_FEDORA_ENABLE_FEDORA_BUILD)
-    INCLUDE(ManageReleaseFedora)
-    RELEASE_FEDORA(fedora el6)
-    # "Off" Warning is displayed if mock is not installed.
-    MANAGE_RELEASE(tag_push release_fedora)
-ELSE(CMAKE_FEDORA_ENABLE_FEDORA_BUILD)
-    MANAGE_RELEASE(tag_push)
-ENDIF(CMAKE_FEDORA_ENABLE_FEDORA_BUILD)
-
-
 ####################################################################
 # Test Suites.
 #
+#ENABLE_TESTING()
 #ADD_TEST("Test" test_cmd1)