diff options
author | so.yu <so.yu@samsung.com> | 2013-10-24 14:21:45 +0900 |
---|---|---|
committer | so.yu <so.yu@samsung.com> | 2013-10-29 22:26:25 +0900 |
commit | f27d56c6c50c588a6f337444727e9a02e193188f (patch) | |
tree | 08de1becf39cf0cb60e1c52a5a1a47a40bb2717c | |
parent | d2eaf463d95198b88392bcf76407fc7c1dce63d7 (diff) | |
download | certificate-selector-accepted/tizen/mobile.tar.gz certificate-selector-accepted/tizen/mobile.tar.bz2 certificate-selector-accepted/tizen/mobile.zip |
Refine the build configuresubmit/tizen/20131029.134304accepted/tizen/20131030.011156tizenaccepted/tizen/mobile
Change-Id: I3f22e4537897c65ef8535c960054ebfbcae6420b
Signed-off-by: so.yu <so.yu@samsung.com>
-rw-r--r-- | CMakeLists.txt | 35 | ||||
-rw-r--r-- | packaging/apps.CertificateSelector.manifest (renamed from apps.CertificateSelector.manifest) | 0 | ||||
-rw-r--r-- | packaging/apps.CertificateSelector.spec | 39 |
3 files changed, 45 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c1e313..1c4e5ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,29 +4,38 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET(this_target CertificateSelector) SET(PKG_ID hyCsE05ySM) +INCLUDE(FindPkgConfig) +pkg_check_modules(${this_target}_pkgs REQUIRED "osp-appfw osp-uifw appinfo") +FOREACH(flag ${${this_target}_pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + # Include directories -INCLUDE_DIRECTORIES( - /usr/include/osp - /usr/include/osp/security - /usr/include/osp/system - inc -) +INCLUDE_DIRECTORIES(inc) # Source files FILE(GLOB ${this_target}_SOURCE_FILES src/*.cpp) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE -fvisibility=hidden -fvisibility-inlines-hidden") +## SET C COMPILER FLAGS +SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") + +## SET CPP COMPILER FLAGS +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE -fvisibility=hidden") +SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}") # Create executable SET(CMAKE_EXECUTABLE_SUFFIX ".exe") ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES}) -# Set link libraries and link options -TARGET_LINK_LIBRARIES(${this_target} -pie -L/usr/lib/osp osp-appfw osp-uifw) +## SET LINKER FLAGS +SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") + +TARGET_LINK_LIBRARIES(${this_target} ${${this_target}_pkgs_LDFLAGS}) +TARGET_LINK_LIBRARIES(${this_target} -pie) # Copy resources -INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${PKG_ID}/bin) +INSTALL(TARGETS ${this_target} DESTINATION /usr/apps/${PKG_ID}/bin) -INSTALL(FILES ${CMAKE_SOURCE_DIR}/manifest.xml DESTINATION ../usr/apps/${PKG_ID}/info) -INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION ../usr/apps/${PKG_ID}) -INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/shared DESTINATION ../usr/apps/${PKG_ID}) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/manifest.xml DESTINATION /usr/apps/${PKG_ID}/info) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION /usr/apps/${PKG_ID}) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/shared DESTINATION /usr/apps/${PKG_ID}) diff --git a/apps.CertificateSelector.manifest b/packaging/apps.CertificateSelector.manifest index 42fde9e..42fde9e 100644 --- a/apps.CertificateSelector.manifest +++ b/packaging/apps.CertificateSelector.manifest diff --git a/packaging/apps.CertificateSelector.spec b/packaging/apps.CertificateSelector.spec index df53e95..5a85ad7 100644 --- a/packaging/apps.CertificateSelector.spec +++ b/packaging/apps.CertificateSelector.spec @@ -2,9 +2,11 @@ Name: apps.CertificateSelector Summary: The app-control of the certificate manager Version: 1.2.2.0 Release: 1 -Group: TO_BE/FILLED_IN -License: Apache License, Version 2.0 +Group: Application Framework +Url: https://review.tizen.org/git/?p=platform/framework/native/certificate-selector.git;a=summary +License: Apache-2.0 Source0: %{name}-%{version}.tar.gz +Source1001: %{name}.manifest BuildRequires: cmake BuildRequires: pkgconfig(osp-appfw) BuildRequires: osp-appfw-internal-devel @@ -12,7 +14,7 @@ BuildRequires: pkgconfig(osp-uifw) BuildRequires: hash-signer # smack domain requires -Requires(post): osp-security-service +Requires(post): osp-security-service # runtime requires Requires: chromium @@ -23,28 +25,33 @@ The app-control of the certificate manager %prep %setup -q +cp %{SOURCE1001} . %build MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` + %ifarch %{ix86} -%if 0%{?simulator} -CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} + ARCH=x86 + CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_" + %if 0%{?simulator} + CXXFLAGS="$CXXFLAGS -D_OSP_EMUL_" + %endif %else -CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} + ARCH=arm + CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" %endif -%else -CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} + +%if 0%{?tizen_build_binary_release_type_eng} + CXXFLAGS="$CXXFLAGS -D_SECURE_LOG" %endif -# Call make instruction with smp support -make %{?jobs:-j%jobs} +cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -%install -rm -rf %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp %{_builddir}/%{name}-%{version}/LICENSE.Apache-2.0 %{buildroot}/usr/share/license/%{name} +make %{?_smp_mflags} +%install %make_install + ###### for package signing step ###### PKG_ID=hyCsE05ySM %define tizen_sign 1 @@ -58,7 +65,7 @@ PKG_ID=hyCsE05ySM /usr/etc/package-manager/backend/tpk -i /usr/apps/hyCsE05ySM %files -%manifest apps.CertificateSelector.manifest +%manifest %{name}.manifest +%license LICENSE.Apache-2.0 %defattr(-,root,root,-) -/usr/share/license/%{name} /usr/apps/* |