fbf1fb64799b5695aae3d5e2df123ce948e51732
[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.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 # 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-connection)
41 BuildRequires: pkgconfig(capi-network-wifi)
42 BuildRequires: pkgconfig(capi-network-bluetooth)
43 BuildRequires: scons
44 BuildRequires: iotivity
45 BuildRequires: iotivity-devel
46 BuildRequires: iotivity-service
47
48 ## If tizen 2.x, RELEASE follows tizen_build_binary_release_type_eng. ##
49 ## and if tizen 3.0, RELEASE follows tizen_build_devel_mode. ##
50 %if 0%{?tizen_build_devel_mode} == 1 || 0%{?tizen_build_binary_release_type_eng} == 1
51 %define RELEASE False
52 %else
53 %define RELEASE True
54 %endif
55
56 %description
57 EasySetup Sample application
58
59 %prep
60 %setup -q
61
62 %build
63 scons %{JOB} --prefix=%{_prefix} \
64     ES_TARGET_ENROLLEE=%{ES_TARGET_ENROLLEE} \
65     LOGGING=%{LOGGING} \
66     RELEASE=%{RELEASE} \
67     ROUTING=%{ROUTING} \
68     SECURED=%{SECURED} \
69     TARGET_OS=%{TARGET_OS} \
70     TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
71     VERBOSE=%{VERBOSE} \
72     #eol
73
74 %install
75
76 mkdir -p %{buildroot}%{_datadir}/packages
77 mkdir -p %{buildroot}/%{_sysconfdir}/smack/accesses2.d
78 mkdir -p %{buildroot}/usr/apps/com.oic.es.sample/bin/
79 mkdir -p %{buildroot}/usr/apps/com.oic.es.sample/bin/internal
80
81 cp -rf %{ROOTDIR}/com.oic.es.sample.xml %{buildroot}/%{_datadir}/packages
82 cp -rf %{ROOTDIR}/scons/enrollee_wifi %{buildroot}/usr/apps/com.oic.es.sample/bin/
83
84 %files
85 %manifest com.oic.es.sample.manifest
86 %defattr(-,root,root,-)
87 /usr/apps/com.oic.es.sample/bin/enrollee_wifi
88 /%{_datadir}/packages/com.oic.es.sample.xml
89
90