Fix build and hardcoded path 49/23049/3 accepted/tizen_3.0.2014.q3_common tizen_3.0.2014.q3_common tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common accepted/tizen/common/20140618.145235 submit/tizen_common/20140618.141247 submit/tizen_mobile/20141120.000000 tizen_3.0.2014.q3_common_release
authorJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Mon, 16 Jun 2014 12:58:03 +0000 (14:58 +0200)
committerJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Wed, 18 Jun 2014 08:08:20 +0000 (10:08 +0200)
Bug-Tizen: TC-357
Change-Id: I5d187e67078ced0d996f9b46bbf10ffbed49b8af
Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
CMakeLists.txt
capi/CMakeLists.txt
packaging/privilege-checker.manifest
packaging/privilege-checker.spec
util/CMakeLists.txt

index 56110c3..25ffefc 100644 (file)
@@ -4,6 +4,8 @@ MESSAGE("build privilege-checker")
 \r
 SET(CMAKE_VERBOSE_MAKEFILE OFF)\r
 \r
+SET(BINDIR "${PREFIX}/bin")\r
+\r
 IF("${USE_AUTOSTART}" STREQUAL "1")\r
        ADD_DEFINITIONS("-DUSE_AUTOSTART")\r
 ENDIF()\r
index d25b3a2..b3c93ff 100644 (file)
@@ -44,9 +44,9 @@ SET_TARGET_PROPERTIES(${fw_name}
     CLEAN_DIRECT_OUTPUT 1
 )
 
-INSTALL(TARGETS ${fw_name} DESTINATION ../lib)
+INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
 INSTALL(
-        DIRECTORY ${INC_DIR}/ DESTINATION ../include/privilegemgr
+        DIRECTORY ${INC_DIR}/ DESTINATION ${INCLUDE_INSTALL_DIR}/privilegemgr
         FILES_MATCHING
         PATTERN "*_private.h" EXCLUDE
         PATTERN "${INC_DIR}/*.h"
@@ -116,6 +116,6 @@ ENDFOREACH(_file ${_pofiles})
 
 ADD_CUSTOM_TARGET(privilege-string ALL DEPENDS ${mo_files})
 
-INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output/target/generic/root/usr/share/locale DESTINATION ../share)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output/target/generic/root/usr/share/locale DESTINATION ${SHARE_INSTALL_PREFIX})
 
 
index 37fba17..c00c25b 100644 (file)
@@ -2,7 +2,4 @@
         <request>
                 <domain name="_" />
         </request>
-       <assign>
-               <filesystem path="/opt/dbspace/.privilegelist.db*" label="User" />
-       </assign>
 </manifest>
index 1a454bc..5cda299 100644 (file)
@@ -4,7 +4,9 @@ Version: 0.0.3
 Release: 3
 Group:   System/Libraries
 License: Apache-2.0
-Source0: %{name}-%{version}.tar.gz
+Source0:       %{name}-%{version}.tar.gz
+Source1001:    %{name}.manifest
+Source1002:    capi-security-privilege-manager.manifest
 BuildRequires: cmake
 BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(sqlite3)
@@ -47,17 +49,12 @@ The Privilege Manager API provides functions to get information about privilege
 
 %prep
 %setup -q
+cp %{SOURCE1001} .
+cp %{SOURCE1002} .
 
 %build
 #%{!?build_type:%define build_type "Release"}
-echo cmake . -DPREFIX=%{_prefix} \
-        -DEXEC_PREFIX=%{_exec_prefix} \
-        -DLIBDIR=%{_libdir} \
-        -DINCLUDEDIR=%{_includedir} \
-        -DCMAKE_BUILD_TYPE=%{build_type} \
-        -DVERSION=%{version} \
-        -DDPL_LOG="ON" 
-cmake . -DPREFIX=%{_prefix} \
+%cmake . -DPREFIX=%{_prefix} \
         -DEXEC_PREFIX=%{_exec_prefix} \
         -DLIBDIR=%{_libdir} \
         -DINCLUDEDIR=%{_includedir} \
@@ -71,20 +68,23 @@ rm -rf %{buildroot}
 mkdir -p %{buildroot}/usr/share/license
 cp LICENSE.APLv2 %{buildroot}/usr/share/license/privilege-checker
 mkdir -p %{buildroot}%{TZ_SYS_DB}
-cp util/res%{TZ_SYS_DB}/.privilegelist.db /%{buildroot}/%{TZ_SYS_DB}/
+cp util/res/opt/dbspace/.privilegelist.db /%{buildroot}/%{TZ_SYS_DB}/
 
 %make_install
 
+%post
+chsmack -a User %{TZ_SYS_DB}/.privilegelist.db
+
 %files -n privilege-checker
-/usr/share/license/privilege-checker
-%{TZ_SYS_BIN}/*
+%manifest %{name}.manifest
+%{_datadir}/license/privilege-checker
+%{_bindir}/*
 %{TZ_SYS_DB}/.privilegelist.db
-%manifest packaging/privilege-checker.manifest
 
 %files -n capi-security-privilege-manager
+%manifest capi-security-privilege-manager.manifest
 %{_libdir}/libcapi-security-privilege-manager.so*
-/usr/share/locale/*
-%manifest packaging/capi-security-privilege-manager.manifest
+%{_datadir}/locale/*
 
 %files -n capi-security-privilege-manager-devel
 %{_includedir}/privilegemgr/*.h
index 426b687..d25a9de 100644 (file)
@@ -59,4 +59,4 @@ TARGET_LINK_LIBRARIES(privilege-checker ${pkgs_LDFLAGS} ${pkgs_LIBRARIES})
 SET_TARGET_PROPERTIES(privilege-checker PROPERTIES COMPILE_FLAGS "${PRIVILEGE_CHECKER_CFLAGS}")\r
 ###################################################################################################\r
 \r
-INSTALL(TARGETS privilege-checker DESTINATION ../bin)\r
+INSTALL(TARGETS privilege-checker DESTINATION ${BINDIR})\r