Merge branch 'master' into resource-manipulation
[platform/upstream/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:    0.1
8 Release:    1
9 Summary: Tizen oicca application
10 URL: http://slp-source.sec.samsung.net
11 Source: %{name}-%{version}.tar.gz
12 License: Apache-2.0
13 Group: Applications/OIC
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(glib-2.0)
16 BuildRequires: pkgconfig(capi-network-wifi)
17 BuildRequires: pkgconfig(capi-network-bluetooth)
18 BuildRequires: boost-devel
19 BuildRequires: boost-thread
20 BuildRequires: boost-system
21 BuildRequires: boost-filesystem
22 BuildRequires: scons
23
24
25 %description
26 SLP oicca application
27
28 %prep
29
30 %setup -q
31
32 %build
33
34 echo %{ROOTDIR}
35
36 scons TARGET_OS=tizen -c
37 scons TARGET_OS=tizen TARGET_TRANSPORT=%{TARGET_TRANSPORT} SECURED=%{SECURED} RELEASE=%{RELEASE} LOGGING=%{LOGGING}
38
39 %install
40 mkdir -p %{DEST_INC_DIR}
41 mkdir -p %{DEST_LIB_DIR}/pkgconfig
42
43 cp -f %{ROOTDIR}/con/src/libconnectivity_abstraction.so %{buildroot}/%{_libdir}
44 cp -f %{ROOTDIR}/con/lib/libcoap-4.1.1/libcoap.a %{buildroot}/%{_libdir}
45 if echo %{SECURED}|grep -qi '1'; then
46         cp -f %{ROOTDIR}/con/extlibs/tinydtls/libtinydtls.a %{buildroot}/%{_libdir}
47 fi
48 cp -rf %{ROOTDIR}/con/api/cacommon.h* %{DEST_INC_DIR}/
49 cp -rf %{ROOTDIR}/con/inc/caadapterinterface.h* %{DEST_INC_DIR}/
50 cp -rf %{ROOTDIR}/con/common/inc/cathreadpool.h* %{DEST_INC_DIR}/
51 cp -rf %{ROOTDIR}/con/inc/caipadapter.h* %{DEST_INC_DIR}/
52 cp -rf %{ROOTDIR}/con/inc/caedradapter.h* %{DEST_INC_DIR}/
53 cp -rf %{ROOTDIR}/con/inc/caleadapter.h* %{DEST_INC_DIR}/
54 cp -rf %{ROOTDIR}/con/api/cainterface.h* %{DEST_INC_DIR}/
55 cp -rf %{ROOTDIR}/com.oic.ca.pc %{DEST_LIB_DIR}/pkgconfig/
56
57
58 %files
59 %manifest com.oic.ca.manifest
60 %defattr(-,root,root,-)
61 %{_libdir}/lib*.so*
62 %{_libdir}/lib*.a*
63 %{_includedir}/OICHeaders/*
64 %{_libdir}/pkgconfig/*.pc
65