1 %define PREFIX /usr/apps/com.oic.ca
2 %define ROOTDIR %{_builddir}/%{name}-%{version}
3 %define DEST_INC_DIR %{buildroot}/%{_includedir}/OICHeaders
4 %define DEST_LIB_DIR %{buildroot}/%{_libdir}
9 Summary: Tizen oicca application
10 Group: Network & Connectivity / IoT Connectivity
12 URL: https://www.iotivity.org/
13 Source0: http://mirrors.kernel.org/%{name}/%{version}/%{name}-%{version}.tar.gz
17 %define JOB %{?_smp_mflags}
19 %if 0%{?speedpython:1} && 0%{?en_speedpython:1}
23 # Default values to be eventually overiden BEFORE or as gbs params:
24 %{!?LOGGING: %define LOGGING 1}
25 %{!?RELEASE: %define RELEASE 1}
26 %{!?SECURED: %define SECURED 0}
27 %{!?TARGET_OS: %define TARGET_OS tizen}
28 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
29 %{!?VERBOSE: %define VERBOSE 1}
30 %{!?WITH_TCP: %define WITH_TCP 0}
31 %{!?OIC_SUPPORT_TIZEN_TRACE: %define OIC_SUPPORT_TIZEN_TRACE False}
33 BuildRequires: pkgconfig(dlog)
34 %if "%{OIC_SUPPORT_TIZEN_TRACE}" == "True"
35 BuildRequires: pkgconfig(ttrace)
37 BuildRequires: pkgconfig(glib-2.0)
38 BuildRequires: pkgconfig(capi-network-connection)
39 BuildRequires: pkgconfig(capi-network-bluetooth)
40 BuildRequires: boost-devel
41 BuildRequires: boost-thread
42 BuildRequires: boost-system
43 BuildRequires: boost-filesystem
45 BuildRequires: pkgconfig(uuid)
59 TARGET_OS=%{TARGET_OS} \
60 TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
62 WITH_TCP=%{WITH_TCP} \
63 OIC_SUPPORT_TIZEN_TRACE=%{OIC_SUPPORT_TIZEN_TRACE} \
68 mkdir -p %{DEST_INC_DIR}
69 mkdir -p %{DEST_LIB_DIR}/pkgconfig
71 cp -f %{ROOTDIR}/con/src/libconnectivity_abstraction.so %{buildroot}/%{_libdir}
72 cp -f %{ROOTDIR}/extlibs/libcoap/libcoap.a %{buildroot}/%{_libdir}
73 if echo %{SECURED}|grep -qi '1'; then
74 cp -f %{ROOTDIR}/con/extlibs/mbedtls/libmbedcrypto.a %{buildroot}/%{_libdir}
75 cp -f %{ROOTDIR}/con/extlibs/mbedtls/libmbedtls.a %{buildroot}/%{_libdir}
76 cp -f %{ROOTDIR}/con/extlibs/mbedtls/libmbedx509.a %{buildroot}/%{_libdir}
78 cp -rf %{ROOTDIR}/con/api/cacommon.h* %{DEST_INC_DIR}/
79 cp -rf %{ROOTDIR}/con/inc/caadapterinterface.h* %{DEST_INC_DIR}/
80 cp -rf %{ROOTDIR}/con/common/inc/cathreadpool.h* %{DEST_INC_DIR}/
81 cp -rf %{ROOTDIR}/con/util/inc/camanagerleinterface.h* %{DEST_INC_DIR}/
82 cp -rf %{ROOTDIR}/con/inc/caipadapter.h* %{DEST_INC_DIR}/
83 cp -rf %{ROOTDIR}/con/inc/caedradapter.h* %{DEST_INC_DIR}/
84 cp -rf %{ROOTDIR}/con/inc/caleadapter.h* %{DEST_INC_DIR}/
85 cp -rf %{ROOTDIR}/con/api/cainterface.h* %{DEST_INC_DIR}/
86 cp -rf %{ROOTDIR}/con/api/casecurityinterface.h* %{DEST_INC_DIR}/
87 cp -rf %{ROOTDIR}/con/api/cautilinterface.h* %{DEST_INC_DIR}/
88 cp -rf %{ROOTDIR}/com.oic.ca.pc %{DEST_LIB_DIR}/pkgconfig/
92 %manifest com.oic.ca.manifest
93 %defattr(-,root,root,-)
96 %{_includedir}/OICHeaders/*
97 %{_libdir}/pkgconfig/*.pc