summaryrefslogtreecommitdiff
path: root/packaging/org.tizen.position-finder-server.spec
blob: 76835bb30c0bb2188bf4f045802bab94ac76e191 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Name:       org.tizen.position-finder-server
%define alias org.tizen.position-finder-server
Summary:    IoTivity Application
Group:      Applications/Core Applications
Version:    0.0.1
Release:    1
License:    Flora-1.1
Provides:   org.tizen.position-finder-server = %{version}-%{release}
Source0:    %{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  hash-signer
BuildRequires:  pkgconfig(capi-appfw-application)
BuildRequires:  pkgconfig(dlog)
BuildRequires:  pkgconfig(libtzplatform-config)
BuildRequires:  pkgconfig(capi-appfw-service-application)
BuildRequires:  pkgconfig(capi-system-peripheral-io)
BuildRequires:  pkgconfig(ecore)
BuildRequires:  pkgconfig(eina)
BuildRequires:  pkgconfig(iotcon)
BuildRequires:  pkgconfig(gio-2.0)

%description
Server for Position Finder

%prep
%setup -q

%build

%define _pkg_dir %{TZ_SYS_RO_APP}/%{alias}
%define _pkg_shared_dir %{_pkg_dir}/shared
%define _pkg_data_dir %{_pkg_dir}/data
%define _pkg_rw_data_dir /home/owner/apps_rw/org.tizen.position-finder-server/data
%define _pkg_res_dir /home/owner/apps_rw/org.tizen.position-finder-server/res
%define _sys_icons_dir %{_pkg_shared_dir}/res
%define _sys_packages_dir %{TZ_SYS_RO_PACKAGES}
%define _sys_license_dir %{TZ_SYS_SHARE}/license

%ifarch %{arm}
export CFLAGS="$CFLAGS -DTIZEN_BUILD_TARGET"
export CXXFLAGS="$CXXFLAGS -DTIZEN_BUILD_TARGET"
export FFLAGS="$FFLAGS -DTIZEN_BUILD_TARGET"
%else
export CFLAGS="$CFLAGS -DTIZEN_BUILD_EMULATOR"
export CXXFLAGS="$CXXFLAGS -DTIZEN_BUILD_EMULATOR"
export FFLAGS="$FFLAGS -DTIZEN_BUILD_EMULATOR"
%endif

cmake . -DINSTALL_PREFIX=%{_pkg_dir} \
	-DSYS_ICONS_DIR=%{_sys_icons_dir} \
	-DSYS_PACKAGES_DIR=%{_sys_packages_dir}
make %{?jobs:-j%jobs}

%install
%make_install

%define tizen_sign 1
%define tizen_sign_base %{_pkg_dir}
%define tizen_sign_level platform
%define tizen_author_sign 1
%define tizen_dist_sign 1
#%find_lang position-finder-server

%post
/sbin/ldconfig
chsmack -a "User::Pkg::org.tizen.position-finder-server" %{_pkg_res_dir}/*.dat
chmod 666 %{_pkg_res_dir}/*.dat

mkdir -p %{_pkg_rw_data_dir}
touch %{_pkg_rw_data_dir}/iotcon-test-svr-db-server.dat
chsmack -a "User::Pkg::org.tizen.position-finder-server" %{_pkg_rw_data_dir}/*.dat
chmod 666 %{_pkg_rw_data_dir}/*.dat

%postun -p /sbin/ldconfig

%files
%manifest org.tizen.position-finder-server.manifest
%{_pkg_res_dir}/*.dat
%defattr(-,root,root,-)
%{_pkg_dir}/bin/position-finder-server
%{_sys_packages_dir}/org.tizen.position-finder-server.xml
%{_sys_icons_dir}/position_finder_server.png
%{_pkg_dir}/author-signature.xml
%{_pkg_dir}/signature1.xml