75eb08be05e25d0b5ee9204599119dea4a0d1a0d
[iotivity.git] / resource / csdk / stack / samples / tizen / SimpleClientServer / packaging / com.oic.ri.sample.spec
1 %define PREFIX /usr/apps/com.oic.ri.sample
2 %define ROOTDIR  %{_builddir}/%{name}-%{version}
3
4 Name: com-oic-ri-sample
5 Version:    2.0.0
6 Release:    0
7 Summary: Tizen adapter interfacesample application
8 Group: Network & Connectivity / IoT Connectivity
9 License: Apache-2.0
10 URL: https://www.iotivity.org/
11 Source0: http://mirrors.kernel.org/%{name}/%{version}/%{name}-%{version}.tar.gz
12
13 %define JOB "-j4"
14 %if 0%{?speedpython}
15 %define JOB %{?_smp_mflags}
16 %endif
17 %if 0%{?speedpython:1} && 0%{?en_speedpython:1}
18 %en_speedpython
19 %endif
20
21 # Default values to be eventually overiden BEFORE or as gbs params:
22 %{!?LOGGING: %define LOGGING 1}
23 %{!?RELEASE: %define RELEASE 1}
24 %{!?ROUTING: %define ROUTING EP}
25 %{!?SECURED: %define SECURED 0}
26 %{!?TARGET_OS: %define TARGET_OS tizen}
27 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
28 %{!?VERBOSE: %define VERBOSE 1}
29 %{!?WITH_MQ: %define WITH_MQ OFF}
30 %{!?WITH_PROXY: %define WITH_PROXY 0}
31 %{!?WITH_TCP: %define WITH_TCP 0}
32
33 BuildRequires: pkgconfig(dlog)
34 BuildRequires: pkgconfig(glib-2.0)
35 BuildRequires: pkgconfig(uuid)
36 BuildRequires: boost-devel
37 BuildRequires: boost-thread
38 BuildRequires: boost-system
39 BuildRequires: boost-filesystem
40 BuildRequires: pkgconfig(capi-network-connection)
41 BuildRequires: pkgconfig(capi-network-bluetooth)
42 BuildRequires: scons
43 BuildRequires: com-oic-ri
44
45
46 %description
47 OIC RIsample application
48
49 %prep
50 %setup -q
51
52 %build
53 scons %{JOB} \
54     RELEASE=%{RELEASE} \
55     ROUTING=%{ROUTING} \
56     SECURED=%{SECURED} \
57     TARGET_OS=%{TARGET_OS} \
58     TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
59     VERBOSE=%{VERBOSE} \
60     WITH_MQ=%{WITH_MQ} \
61     WITH_PROXY=%{WITH_PROXY} \
62     WITH_TCP=%{WITH_TCP} \
63     #eol
64
65 %install
66
67 mkdir -p %{buildroot}%{_datadir}/packages
68 mkdir -p %{buildroot}/%{_sysconfdir}/smack/accesses2.d
69 mkdir -p %{buildroot}/usr/apps/com.oic.ri.sample/bin/
70 mkdir -p %{buildroot}/usr/apps/com.oic.ri.sample/bin/internal
71
72 cp -rf %{ROOTDIR}/com.oic.ri.sample.xml %{buildroot}/%{_datadir}/packages
73 cp -rf %{ROOTDIR}/scons/occlient %{buildroot}/usr/apps/com.oic.ri.sample/bin/
74 cp -rf %{ROOTDIR}/scons/ocserver %{buildroot}/usr/apps/com.oic.ri.sample/bin/
75 cp -rf %{ROOTDIR}/scons/ocrouting %{buildroot}/usr/apps/com.oic.ri.sample/bin/
76
77 %files
78 %manifest com.oic.ri.sample.manifest
79 %defattr(-,root,root,-)
80 /usr/apps/com.oic.ri.sample/bin/occlient
81 /usr/apps/com.oic.ri.sample/bin/ocserver
82 /usr/apps/com.oic.ri.sample/bin/ocrouting
83 /%{_datadir}/packages/com.oic.ri.sample.xml
84
85