## Subdirectories ##############################################################
SET(CLIENT_FOLDER ${PROJECT_SOURCE_DIR}/src/client)
SET(SERVER_FOLDER ${PROJECT_SOURCE_DIR}/src/server)
+
+IF(NOT DEFINED SCRIPT_INSTALL_DIR)
+ SET(SCRIPT_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/sbin)
+ENDIF(NOT DEFINED SCRIPT_INSTALL_DIR)
+
ADD_SUBDIRECTORY(src)
-%define script_dir %{_libdir}/python/site-packages/sc_test_scripts/
-%define script_src_dir src/scripts
+%define script_dir %{_sbindir}
Name: security-containers
Version: 0.1.0
%endif
%cmake . -DVERSION=%{version} \
- -DCMAKE_BUILD_TYPE=%{build_type}
+ -DCMAKE_BUILD_TYPE=%{build_type} \
+ -DSCRIPT_INSTALL_DIR=%{script_dir}
make -k %{?jobs:-j%jobs}
%install
%make_install
mkdir -p %{buildroot}/etc/security-containers/config/libvirt-config/
-install -d %{buildroot}/%{_bindir}
-install -d %{buildroot}/%{script_dir}
-install -m 755 %{script_src_dir}/sc_tests_all.py %{buildroot}/%{script_dir}
-install -m 755 %{script_src_dir}/sc_test_launch.py %{buildroot}/%{script_dir}
-install -m 755 %{script_src_dir}/sc_test_parser.py %{buildroot}/%{script_dir}
-
-ln -sf %{script_dir}/sc_tests_all.py %{buildroot}/%{_bindir}/sc_tests_all
-ln -sf %{script_dir}/sc_test_launch.py %{buildroot}/%{_bindir}/sc_test_launch
-
%clean
rm -rf %{buildroot}
%files unit-tests
%defattr(644,root,root,644)
%attr(755,root,root) %{_bindir}/security-containers-server-unit-tests
-%attr(755,root,root) %{script_dir}/sc_tests_all.py
-%attr(755,root,root) %{script_dir}/sc_test_launch.py
+%attr(755,root,root) %{script_dir}/sc_all_tests.py
+%attr(755,root,root) %{script_dir}/sc_launch_test.py
%{script_dir}/sc_test_parser.py
-%{_bindir}/sc_tests_all
-%{_bindir}/sc_test_launch
%config %attr(644,root,root) /etc/security-containers/config/tests/ut-scs-container-manager/test-daemon.conf
%config %attr(644,root,root) /etc/security-containers/config/tests/ut-scs-container-manager/libvirt-config/*.xml
--- /dev/null
+# 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 Lukasz Kostyra (l.kostyra@samsung.com)
+#
+
+MESSAGE(STATUS "Installing scripts to " ${SCRIPT_INSTALL_DIR})
+FILE(GLOB_RECURSE scripts *.py)
+
+INSTALL(PROGRAMS ${scripts} DESTINATION ${SCRIPT_INSTALL_DIR})