build: Update version to 2.0.1
[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:    2.0.1
7 Release:    0
8 Summary: Tizen adapter interfacesample application
9 Group: Network & Connectivity / IoT Connectivity
10 License: Apache-2.0
11 URL: https://www.iotivity.org/
12 Source0: http://mirrors.kernel.org/%{name}/%{version}/%{name}-%{version}.tar.gz
13
14 %define JOB "-j4"
15 %if 0%{?speedpython}
16 %define JOB %{?_smp_mflags}
17 %endif
18 %if 0%{?speedpython:1} && 0%{?en_speedpython:1}
19 %en_speedpython
20 %endif
21
22 %ifarch armv7l armv7hl armv7nhl armv7tnhl armv7thl
23 %if 3 <= 0%{?tizen_version_major}
24 BuildRequires: python-accel-armv7l-cross-arm
25 %endif
26 %define TARGET_ARCH "armeabi-v7a"
27 %endif
28 %ifarch aarch64
29 %if 3 <= 0%{?tizen_version_major}
30 BuildRequires: python-accel-aarch64-cross-aarch64
31 %endif
32 %define TARGET_ARCH "arm64"
33 %endif
34 %ifarch x86_64
35 %define TARGET_ARCH "x86_64"
36 %endif
37 %ifarch %{ix86}
38 %define TARGET_ARCH "x86"
39 %endif
40
41 # Default values to be eventually overiden BEFORE or as gbs params:
42 %{!?ES_TARGET_ENROLLEE: %define ES_TARGET_ENROLLEE tizen}
43 %{!?LOGGING: %define LOGGING 1}
44 %{!?RELEASE: %define RELEASE 1}
45 %{!?ROUTING: %define ROUTING EP}
46 %{!?SECURED: %define SECURED 0}
47 %{!?TARGET_OS: %define TARGET_OS tizen}
48 %{!?TARGET_ARCH: %define TARGET_ARCH %{_arch}}
49 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
50 %{!?VERBOSE: %define VERBOSE 1}
51
52 BuildRequires: pkgconfig(dlog)
53 BuildRequires: pkgconfig(glib-2.0)
54 BuildRequires: pkgconfig(gio-2.0)
55 BuildRequires: pkgconfig(gthread-2.0)
56 BuildRequires: boost-devel
57 BuildRequires: boost-thread
58 BuildRequires: boost-system
59 BuildRequires: boost-filesystem
60 BuildRequires: pkgconfig(capi-network-connection)
61 BuildRequires: pkgconfig(capi-network-wifi)
62 BuildRequires: pkgconfig(capi-network-bluetooth)
63 BuildRequires: scons
64 BuildRequires: iotivity
65 BuildRequires: iotivity-devel
66 BuildRequires: iotivity-service
67
68 ## If tizen 2.x, RELEASE follows tizen_build_binary_release_type_eng. ##
69 ## and if tizen 3.0, RELEASE follows tizen_build_devel_mode. ##
70 %if 0%{?tizen_build_devel_mode} == 1 || 0%{?tizen_build_binary_release_type_eng} == 1
71 %define RELEASE False
72 %else
73 %define RELEASE True
74 %endif
75
76 %description
77 EasySetup Sample application
78
79 %prep
80 %setup -q
81
82 %build
83 scons %{JOB} --prefix=%{_prefix} \
84     ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} \
85     LOGGING=%{LOGGING} \
86     RELEASE=%{RELEASE} \
87     ROUTING=%{ROUTING} \
88     SECURED=%{SECURED} \
89     TARGET_OS=%{TARGET_OS} \
90     TARGET_ARCH=%{TARGET_ARCH} \
91     TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
92     VERBOSE=%{VERBOSE} \
93     #eol
94
95 %install
96
97 mkdir -p %{buildroot}%{_datadir}/packages
98 mkdir -p %{buildroot}/%{_sysconfdir}/smack/accesses2.d
99 mkdir -p %{buildroot}/usr/apps/com.oic.es.sample/bin/
100 mkdir -p %{buildroot}/usr/apps/com.oic.es.sample/bin/internal
101
102 cp -rf %{ROOTDIR}/com.oic.es.sample.xml %{buildroot}/%{_datadir}/packages
103 cp -rf %{ROOTDIR}/scons/enrollee_wifi %{buildroot}/usr/apps/com.oic.es.sample/bin/
104
105 %files
106 %manifest com.oic.es.sample.manifest
107 %defattr(-,root,root,-)
108 /usr/apps/com.oic.es.sample/bin/enrollee_wifi
109 /%{_datadir}/packages/com.oic.es.sample.xml
110
111