Introduce Cyad 73/32173/4
authorAleksander Zdyb <a.zdyb@samsung.com>
Tue, 9 Dec 2014 11:23:37 +0000 (12:23 +0100)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Mon, 29 Dec 2014 09:10:08 +0000 (10:10 +0100)
A command-line tool for managing Cynara's database.

Change-Id: I3731f0c3166469c2e4e43dff9e4593adfc66106e

CMakeLists.txt
packaging/cyad.manifest [new file with mode: 0644]
packaging/cynara.spec
src/CMakeLists.txt
src/cyad/CMakeLists.txt [new file with mode: 0644]
src/cyad/main.cpp [new file with mode: 0644]

index c7a802c..048d098 100644 (file)
@@ -94,6 +94,7 @@ SET(TARGET_LIB_CREDS_DBUS "cynara-creds-dbus")
 SET(TARGET_LIB_CREDS_SOCKET "cynara-creds-socket")
 SET(TARGET_LIB_SESSION "cynara-session")
 SET(TARGET_LIB_CYNARA_STORAGE "cynara-storage")
+SET(TARGET_CYAD "cyad")
 
 ADD_SUBDIRECTORY(src)
 ADD_SUBDIRECTORY(pkgconfig)
diff --git a/packaging/cyad.manifest b/packaging/cyad.manifest
new file mode 100644 (file)
index 0000000..a76fdba
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_" />
+       </request>
+</manifest>
index c057aa1..f62aed9 100644 (file)
@@ -17,6 +17,7 @@ Source1008:    libcynara-creds-dbus.manifest
 Source1009:    libcynara-creds-socket.manifest
 Source1010:    libcynara-session.manifest
 Source1011:    cynara-db-migration.manifest
+Source1012:    cyad.manifest
 Requires:      default-ac-domains
 Requires(pre): pwdutils
 Requires(pre): cynara-db-migration >= %{version}-%{release}
@@ -149,6 +150,12 @@ Summary:    Migration tools for Cynara's database
 %description -n cynara-db-migration
 Migration tools for Cynara's database
 
+%package -n cyad
+Summary: Cynara's command-line tool
+
+%description -n cyad
+Command-line tool to manage Cynara's database
+
 %prep
 %setup -q
 cp -a %{SOURCE1001} .
@@ -162,6 +169,7 @@ cp -a %{SOURCE1008} .
 cp -a %{SOURCE1009} .
 cp -a %{SOURCE1010} .
 cp -a %{SOURCE1011} .
+cp -a %{SOURCE1012} .
 cp -a test/db/db* .
 
 %build
@@ -358,3 +366,7 @@ fi
 %files -n cynara-db-migration
 %manifest cynara-db-migration.manifest
 %attr(700,root,root) %{_sbindir}/cynara/cynara-db-migration.sh
+
+%files -n cyad
+%manifest cyad.manifest
+%attr(700,root,root) %{_sbindir}/cyad
index 60a8a40..4bcf18c 100644 (file)
@@ -48,6 +48,7 @@ ADD_SUBDIRECTORY(common)
 ADD_SUBDIRECTORY(client)
 ADD_SUBDIRECTORY(client-async)
 ADD_SUBDIRECTORY(client-common)
+ADD_SUBDIRECTORY(cyad)
 ADD_SUBDIRECTORY(admin)
 ADD_SUBDIRECTORY(agent)
 ADD_SUBDIRECTORY(storage)
diff --git a/src/cyad/CMakeLists.txt b/src/cyad/CMakeLists.txt
new file mode 100644 (file)
index 0000000..1e379da
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Licensed under the Apache License, Version 2.0 (the "License");
+#    you may not use this file except in compliance with the License.
+#    You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+# @file        CMakeLists.txt
+# @author      Aleksander Zdyb <a.zdyb@samsung.com>
+#
+
+SET(CYAD_PATH ${CYNARA_PATH}/cyad)
+
+SET(CYAD_SOURCES
+    ${CYAD_PATH}/main.cpp
+    )
+
+INCLUDE_DIRECTORIES(
+    ${CYNARA_PATH}
+    ${CYNARA_PATH}/include
+    )
+
+ADD_EXECUTABLE(${TARGET_CYAD} ${CYAD_SOURCES})
+
+TARGET_LINK_LIBRARIES(${TARGET_CYAD}
+    ${TARGET_LIB_CYNARA_ADMIN}
+    ${TARGET_LIB_CYNARA_STORAGE}
+    )
+
+INSTALL(TARGETS ${TARGET_CYAD} DESTINATION ${SBIN_INSTALL_DIR})
diff --git a/src/cyad/main.cpp b/src/cyad/main.cpp
new file mode 100644 (file)
index 0000000..ab4a0a8
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *    Licensed under the Apache License, Version 2.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+/**
+ * @file        src/cyad/main.cpp
+ * @author      Aleksander Zdyb <a.zdyb@samsung.com>
+ * @version     1.0
+ * @brief       A commandline tool for managing Cynara's database
+ */
+
+int main(int, char **) {
+    return 0;
+}