Merge remote-tracking branch 'origin/master' into notification-service
[platform/upstream/iotivity.git] / service / easy-setup / sampleapp / enrollee / tizen-sdb / EnrolleeSample / packaging / com.oic.es.sample.spec
1 %define PREFIX /usr/apps/com.oic.es.sample
2 %define ROOTDIR  %{_builddir}/%{name}-%{version}
3 %{!?VERBOSE: %define VERBOSE 1}
4
5 Name: com-oic-es-sample
6 Version:    1.1.1
7 Release:    0
8 Summary: Tizen adapter interfacesample application
9 URL: http://slp-source.sec.samsung.net
10 Source: %{name}-%{version}.tar.gz
11 License: Apache-2.0
12 Group: Applications/OICSample
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(glib-2.0)
15 BuildRequires: pkgconfig(gio-2.0)
16 BuildRequires: pkgconfig(gthread-2.0)
17 BuildRequires: boost-devel
18 BuildRequires: boost-thread
19 BuildRequires: boost-system
20 BuildRequires: boost-filesystem
21 BuildRequires: pkgconfig(capi-network-wifi)
22 BuildRequires: pkgconfig(capi-network-bluetooth)
23 BuildRequires: scons
24 BuildRequires: iotivity
25 BuildRequires: iotivity-devel
26 BuildRequires: iotivity-service
27
28 ## If tizen 2.x, RELEASE follows tizen_build_binary_release_type_eng. ##
29 ## and if tizen 3.0, RELEASE follows tizen_build_devel_mode. ##
30 %if 0%{?tizen_build_devel_mode} == 1 || 0%{?tizen_build_binary_release_type_eng} == 1
31 %define RELEASE False
32 %else
33 %define RELEASE True
34 %endif
35
36 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
37 %{!?SECURED: %define SECURED 0}
38 %{!?LOGGING: %define LOGGING True}
39 %{!?ROUTING: %define ROUTING EP}
40 %{!?ES_TARGET_ENROLLEE: %define ES_TARGET_ENROLLEE tizen}
41 %{!?ES_ROLE: %define ES_ROLE enrollee}
42 %{!?ES_SOFTAP_MODE: %define ES_SOFTAP_MODE MEDIATOR_SOFTAP}
43 %{!?VERBOSE: %define VERBOSE 1}
44
45 %description
46 EasySetup Sample application
47
48 %prep
49 %setup -q
50
51 %build
52
53 scons VERBOSE=%{VERBOSE} TARGET_OS=tizen LOGGING=True TARGET_TRANSPORT=%{TARGET_TRANSPORT} SECURED=%{SECURED} RELEASE=%{RELEASE} ROUTING=%{ROUTING} ES_ROLE=%{ES_ROLE} ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} ES_SOFTAP_MODE=%{ES_SOFTAP_MODE}
54
55 %install
56
57 mkdir -p %{buildroot}%{_datadir}/packages
58 mkdir -p %{buildroot}/%{_sysconfdir}/smack/accesses2.d
59 mkdir -p %{buildroot}/usr/apps/com.oic.es.sample/bin/
60 mkdir -p %{buildroot}/usr/apps/com.oic.es.sample/bin/internal
61
62 cp -rf %{ROOTDIR}/com.oic.es.sample.xml %{buildroot}/%{_datadir}/packages
63 cp -rf %{ROOTDIR}/scons/enrollee_wifi %{buildroot}/usr/apps/com.oic.es.sample/bin/
64
65 %files
66 %manifest com.oic.es.sample.manifest
67 %defattr(-,root,root,-)
68 /usr/apps/com.oic.es.sample/bin/enrollee_wifi
69 /%{_datadir}/packages/com.oic.es.sample.xml
70
71