tizen: Reformat subpackages specs files to align master one
[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.2.0
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 # Default values to be eventually overiden BEFORE or as gbs params:
23 %{!?ES_TARGET_ENROLLEE: %define ES_TARGET_ENROLLEE tizen}
24 %{!?LOGGING: %define LOGGING 1}
25 %{!?RELEASE: %define RELEASE 1}
26 %{!?ROUTING: %define ROUTING EP}
27 %{!?SECURED: %define SECURED 0}
28 %{!?TARGET_OS: %define TARGET_OS tizen}
29 %{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
30 %{!?VERBOSE: %define VERBOSE 1}
31
32 BuildRequires: pkgconfig(dlog)
33 BuildRequires: pkgconfig(glib-2.0)
34 BuildRequires: pkgconfig(gio-2.0)
35 BuildRequires: pkgconfig(gthread-2.0)
36 BuildRequires: boost-devel
37 BuildRequires: boost-thread
38 BuildRequires: boost-system
39 BuildRequires: boost-filesystem
40 BuildRequires: pkgconfig(capi-network-wifi)
41 BuildRequires: pkgconfig(capi-network-bluetooth)
42 BuildRequires: scons
43 BuildRequires: iotivity
44 BuildRequires: iotivity-devel
45 BuildRequires: iotivity-service
46
47 ## If tizen 2.x, RELEASE follows tizen_build_binary_release_type_eng. ##
48 ## and if tizen 3.0, RELEASE follows tizen_build_devel_mode. ##
49 %if 0%{?tizen_build_devel_mode} == 1 || 0%{?tizen_build_binary_release_type_eng} == 1
50 %define RELEASE False
51 %else
52 %define RELEASE True
53 %endif
54
55 %description
56 EasySetup Sample application
57
58 %prep
59 %setup -q
60
61 %build
62 scons %{JOB} --prefix=%{_prefix} \
63     ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} \
64     LOGGING=%{LOGGING} \
65     RELEASE=%{RELEASE} \
66     ROUTING=%{ROUTING} \
67     SECURED=%{SECURED} \
68     TARGET_OS=%{TARGET_OS} \
69     TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
70     VERBOSE=%{VERBOSE} \
71     #eol
72
73 %install
74
75 mkdir -p %{buildroot}%{_datadir}/packages
76 mkdir -p %{buildroot}/%{_sysconfdir}/smack/accesses2.d
77 mkdir -p %{buildroot}/usr/apps/com.oic.es.sample/bin/
78 mkdir -p %{buildroot}/usr/apps/com.oic.es.sample/bin/internal
79
80 cp -rf %{ROOTDIR}/com.oic.es.sample.xml %{buildroot}/%{_datadir}/packages
81 cp -rf %{ROOTDIR}/scons/enrollee_wifi %{buildroot}/usr/apps/com.oic.es.sample/bin/
82
83 %files
84 %manifest com.oic.es.sample.manifest
85 %defattr(-,root,root,-)
86 /usr/apps/com.oic.es.sample/bin/enrollee_wifi
87 /%{_datadir}/packages/com.oic.es.sample.xml
88
89