[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Pki-devel] [PATCH] 933 Converted library links creation into CMake scripts.



To improve consistency across platforms the code in RPM spec that
creates the links to subsystem library files has been converted
into CMake scripts.

Pushed to master under trivial rule.

--
Endi S. Dewata
>From fef778e2c799658a2b1eea550f4b95275505f83c Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata redhat com>
Date: Mon, 30 Jan 2017 20:42:59 +0100
Subject: [PATCH] Converted library links creation into CMake scripts.

To improve consistency across platforms the code in RPM spec that
creates the links to subsystem library files has been converted
into CMake scripts.
---
 base/ca/CMakeLists.txt   | 23 +++++++++++++++++++++++
 base/kra/CMakeLists.txt  | 23 +++++++++++++++++++++++
 base/ocsp/CMakeLists.txt | 23 +++++++++++++++++++++++
 base/tks/CMakeLists.txt  | 23 +++++++++++++++++++++++
 base/tps/CMakeLists.txt  | 23 +++++++++++++++++++++++
 5 files changed, 115 insertions(+)

diff --git a/base/ca/CMakeLists.txt b/base/ca/CMakeLists.txt
index 1492d5a10609483799092756196d9537bee89c00..f8b929982eaba13839a379054425cee69894297f 100644
--- a/base/ca/CMakeLists.txt
+++ b/base/ca/CMakeLists.txt
@@ -12,6 +12,22 @@ if(WITH_TOMCAT8)
     add_subdirectory(tomcat8)
 endif(WITH_TOMCAT8)
 
+# Create /usr/share/pki/ca/webapps/ca/WEB-INF/lib. This can be customized for different platforms in RPM spec.
+
+add_custom_target(pki-ca-lib ALL)
+
+add_custom_command(
+    TARGET pki-ca-lib
+    COMMAND ${CMAKE_COMMAND} -E make_directory lib
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-nsutil.jar lib/pki-nsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsutil.jar lib/pki-cmsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-certsrv.jar lib/pki-certsrv.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cms.jar lib/pki-cms.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmscore.jar lib/pki-cmscore.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsbundle.jar lib/pki-cmsbundle.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-ca.jar lib/pki-ca.jar
+)
+
 # install directories
 install(
     DIRECTORY
@@ -22,6 +38,13 @@ install(
         "CMakeLists.txt" EXCLUDE
 )
 
+install(
+    DIRECTORY
+        ${CMAKE_CURRENT_BINARY_DIR}/lib/
+    DESTINATION
+        ${DATA_INSTALL_DIR}/ca/webapps/ca/WEB-INF/lib
+)
+
 # install empty directories
 install(
     DIRECTORY
diff --git a/base/kra/CMakeLists.txt b/base/kra/CMakeLists.txt
index 2c3b4697c658eca23590458627581b78ee36ea3e..96e198a213ec57a70c57fb3f60bea65dd5dd8d47 100644
--- a/base/kra/CMakeLists.txt
+++ b/base/kra/CMakeLists.txt
@@ -12,6 +12,22 @@ if(WITH_TOMCAT8)
     add_subdirectory(tomcat8)
 endif(WITH_TOMCAT8)
 
+# Create /usr/share/pki/kra/webapps/kra/WEB-INF/lib. This can be customized for different platforms in RPM spec.
+
+add_custom_target(pki-kra-lib ALL)
+
+add_custom_command(
+    TARGET pki-kra-lib
+    COMMAND ${CMAKE_COMMAND} -E make_directory lib
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-nsutil.jar lib/pki-nsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsutil.jar lib/pki-cmsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-certsrv.jar lib/pki-certsrv.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cms.jar lib/pki-cms.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmscore.jar lib/pki-cmscore.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsbundle.jar lib/pki-cmsbundle.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-kra.jar lib/pki-kra.jar
+)
+
 # install directories
 install(
     DIRECTORY
@@ -22,6 +38,13 @@ install(
         "CMakeLists.txt" EXCLUDE
 )
 
+install(
+    DIRECTORY
+        ${CMAKE_CURRENT_BINARY_DIR}/lib/
+    DESTINATION
+        ${DATA_INSTALL_DIR}/kra/webapps/kra/WEB-INF/lib
+)
+
 # install empty directories
 install(
     DIRECTORY
diff --git a/base/ocsp/CMakeLists.txt b/base/ocsp/CMakeLists.txt
index 8ffa9d76c6700c72f1374bdcda5727de15ce16cd..78f7a80b94e1d05aa17e97eb9780f69952e970ab 100644
--- a/base/ocsp/CMakeLists.txt
+++ b/base/ocsp/CMakeLists.txt
@@ -12,6 +12,22 @@ if(WITH_TOMCAT8)
     add_subdirectory(tomcat8)
 endif(WITH_TOMCAT8)
 
+# Create /usr/share/pki/ocsp/webapps/ocsp/WEB-INF/lib. This can be customized for different platforms in RPM spec.
+
+add_custom_target(pki-ocsp-lib ALL)
+
+add_custom_command(
+    TARGET pki-ocsp-lib
+    COMMAND ${CMAKE_COMMAND} -E make_directory lib
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-nsutil.jar lib/pki-nsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsutil.jar lib/pki-cmsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-certsrv.jar lib/pki-certsrv.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cms.jar lib/pki-cms.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmscore.jar lib/pki-cmscore.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsbundle.jar lib/pki-cmsbundle.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-ocsp.jar lib/pki-ocsp.jar
+)
+
 # install directories
 install(
     DIRECTORY
@@ -22,6 +38,13 @@ install(
         "CMakeLists.txt" EXCLUDE
 )
 
+install(
+    DIRECTORY
+        ${CMAKE_CURRENT_BINARY_DIR}/lib/
+    DESTINATION
+        ${DATA_INSTALL_DIR}/ocsp/webapps/ocsp/WEB-INF/lib
+)
+
 # install empty directories
 install(
     DIRECTORY
diff --git a/base/tks/CMakeLists.txt b/base/tks/CMakeLists.txt
index 7fa9f2210c3d13f0b21b2421ac43eb5d05b82fc3..f46b4aa210e6dfed672fac599b9394b67462ea9b 100644
--- a/base/tks/CMakeLists.txt
+++ b/base/tks/CMakeLists.txt
@@ -12,6 +12,22 @@ if(WITH_TOMCAT8)
     add_subdirectory(tomcat8)
 endif(WITH_TOMCAT8)
 
+# Create /usr/share/pki/tks/webapps/tks/WEB-INF/lib. This can be customized for different platforms in RPM spec.
+
+add_custom_target(pki-tks-lib ALL)
+
+add_custom_command(
+    TARGET pki-tks-lib
+    COMMAND ${CMAKE_COMMAND} -E make_directory lib
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-nsutil.jar lib/pki-nsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsutil.jar lib/pki-cmsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-certsrv.jar lib/pki-certsrv.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cms.jar lib/pki-cms.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmscore.jar lib/pki-cmscore.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsbundle.jar lib/pki-cmsbundle.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-tks.jar lib/pki-tks.jar
+)
+
 # install directories
 install(
     DIRECTORY
@@ -22,6 +38,13 @@ install(
         "CMakeLists.txt" EXCLUDE
 )
 
+install(
+    DIRECTORY
+        ${CMAKE_CURRENT_BINARY_DIR}/lib/
+    DESTINATION
+        ${DATA_INSTALL_DIR}/tks/webapps/tks/WEB-INF/lib
+)
+
 # install empty directories
 install(
     DIRECTORY
diff --git a/base/tps/CMakeLists.txt b/base/tps/CMakeLists.txt
index 964a254bdc9af69309d5c563b349596d58759d8b..863a2a9db8eb9f32657ae88cba564b32539c89e6 100644
--- a/base/tps/CMakeLists.txt
+++ b/base/tps/CMakeLists.txt
@@ -14,6 +14,22 @@ if(WITH_TOMCAT8)
     add_subdirectory(tomcat8)
 endif(WITH_TOMCAT8)
 
+# Create /usr/share/pki/tps/webapps/tps/WEB-INF/lib. This can be customized for different platforms in RPM spec.
+
+add_custom_target(pki-tps-lib ALL)
+
+add_custom_command(
+    TARGET pki-tps-lib
+    COMMAND ${CMAKE_COMMAND} -E make_directory lib
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-nsutil.jar lib/pki-nsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsutil.jar lib/pki-cmsutil.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-certsrv.jar lib/pki-certsrv.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cms.jar lib/pki-cms.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmscore.jar lib/pki-cmscore.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-cmsbundle.jar lib/pki-cmsbundle.jar
+    COMMAND ${CMAKE_COMMAND} -E create_symlink /usr/share/java/pki/pki-tps.jar lib/pki-tps.jar
+)
+
 # install manual pages
 install(
     DIRECTORY
@@ -36,6 +52,13 @@ install(
         "CMakeLists.txt" EXCLUDE
 )
 
+install(
+    DIRECTORY
+        ${CMAKE_CURRENT_BINARY_DIR}/lib/
+    DESTINATION
+        ${DATA_INSTALL_DIR}/tps/webapps/tps/WEB-INF/lib
+)
+
 # install empty directories
 install(
     DIRECTORY
-- 
2.5.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]