From 8db7c579b7829cb22e363402a4b256ef58129d79 Mon Sep 17 00:00:00 2001
From: Anastasia Karachaliou <anastasia.karachaliou@cern.ch>
Date: Wed, 18 Oct 2017 17:18:34 +0200
Subject: [PATCH] Created rpms in CTA for rmcd and smc.

---
 cta.spec.in                               | 20 ++++++++++++++++++++
 mediachanger/castorrmc/rmc/CMakeLists.txt |  6 +++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/cta.spec.in b/cta.spec.in
index 06c723f3ae..6c27a3f271 100644
--- a/cta.spec.in
+++ b/cta.spec.in
@@ -290,4 +290,24 @@ Utilities to faciliate working with the mediachangers
 %attr(0644,root,root) %doc /usr/share/man/man1/cta-mediachanger-dismount.1cta.gz
 %attr(0644,root,root) %doc /usr/share/man/man1/cta-mediachanger-mount.1cta.gz
 
+%package -n cta-rmc
+Summary: Tools to faciliate working with rmc and smc in cta
+Group: Application/CTA
+%description -n cta-rmc
+CERN Tape Archive:
+Tools to faciliate working with rmc and smc in cta
+%files -n cta-rmc
+%attr(0755,root,root) %{_bindir}/rmcd
+%attr(0755,root,root) %{_bindir}/smc
+
+#%package -n cta-smc
+#Summary: Tools to faciliate working with smc in cta
+#Group: Application/CTA
+#%description -n cta-smc
+#CERN Tape Archive:
+#Tools to faciliate working with smc in cta
+#%files -n cta-smc
+#%attr(0755,root,root) %{_bindir}/smc
+##%attr(0644,root,root) %doc /usr/share/man/man1/rmcd.1cta.gz
+
 %endif
diff --git a/mediachanger/castorrmc/rmc/CMakeLists.txt b/mediachanger/castorrmc/rmc/CMakeLists.txt
index 10ac7d0708..3555f4506e 100644
--- a/mediachanger/castorrmc/rmc/CMakeLists.txt
+++ b/mediachanger/castorrmc/rmc/CMakeLists.txt
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 cmake_minimum_required (VERSION 2.6)
-
+#install (TARGETS ctarmccommon DESTINATION usr/${CMAKE_INSTALL_LIBDIR})
 include_directories (${PROJECT_SOURCE_DIR}/mediachanger/castorrmc/h)
 
 set (RMCD_SRC_FILES
@@ -31,6 +31,9 @@ set (RMCD_SRC_FILES
 add_executable(rmcd ${RMCD_SRC_FILES}) 
 target_link_libraries(rmcd ctarmccommon)
 
+
+install (TARGETS rmcd DESTINATION /usr/bin)
+
 set (SMC_SRC_FILES
   rmc_dismount.c
   rmc_errmsg.c
@@ -44,3 +47,4 @@ set (SMC_SRC_FILES
   smc.c)
 add_executable(smc ${SMC_SRC_FILES}) 
 target_link_libraries(smc ctarmccommon)
+install (TARGETS smc DESTINATION /usr/bin)
-- 
GitLab