build: Update version to 2.0.1
[iotivity.git] / resource / csdk / connectivity / build / tizen / packaging / com.oic.ca.spec
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}
5
6 Name: com-oic-ca
7 Version:    2.0.1
8 Release:    0
9 Summary: Tizen oicca application
10 Group: Network & Connectivity / IoT Connectivity
11 License: Apache-2.0
12 URL: https://www.iotivity.org/
13 Source0: http://mirrors.kernel.org/%{name}/%{version}/%{name}-%{version}.tar.gz
14
15 %define JOB "-j4"
16 %if 0%{?speedpython}
17 %define JOB %{?_smp_mflags}
18 %endif
19 %if 0%{?speedpython:1} && 0%{?en_speedpython:1}
20 %en_speedpython
21 %endif
22
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}
32
33 BuildRequires: pkgconfig(dlog)
34 %if "%{OIC_SUPPORT_TIZEN_TRACE}" == "True"
35 BuildRequires: pkgconfig(ttrace)
36 %endif
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
44 BuildRequires: scons
45 BuildRequires: pkgconfig(uuid)
46
47
48 %description
49 SLP oicca application
50
51 %prep
52 %setup -q
53
54 %build
55 scons %{JOB} \
56     LOGGING=%{LOGGING} \
57     RELEASE=%{RELEASE} \
58     SECURED=%{SECURED} \
59     TARGET_OS=%{TARGET_OS} \
60     TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
61     VERBOSE=%{VERBOSE} \
62     WITH_TCP=%{WITH_TCP} \
63     OIC_SUPPORT_TIZEN_TRACE=%{OIC_SUPPORT_TIZEN_TRACE} \
64     #eol
65
66
67 %install
68 mkdir -p %{DEST_INC_DIR}
69 mkdir -p %{DEST_LIB_DIR}/pkgconfig
70
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}
77 fi
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/
89
90
91 %files
92 %manifest com.oic.ca.manifest
93 %defattr(-,root,root,-)
94 %{_libdir}/lib*.so*
95 %{_libdir}/lib*.a*
96 %{_includedir}/OICHeaders/*
97 %{_libdir}/pkgconfig/*.pc
98