summaryrefslogtreecommitdiff
path: root/packaging/geofence-server.spec
blob: be86dca2de6952cc6d12c95066e35760a8a1e513 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Name:       geofence-server
Summary:    Geofence Server for Tizen
Version:    0.4.7
Release:    1
Group:      Location/Service
License:    Apache-2.0
Source0:    %{name}-%{version}.tar.gz
Source1:    geofence-server.service

%define upgrade_script_path /usr/share/upgrade/scripts/

Requires(post):	sqlite
Requires(post):	lbs-server
BuildRequires:  cmake
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(network)
BuildRequires:  pkgconfig(vconf)
BuildRequires:  pkgconfig(dlog)
BuildRequires:  pkgconfig(geofence-dbus)
BuildRequires:  pkgconfig(gio-unix-2.0)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(db-util)
BuildRequires:  pkgconfig(alarm-service)
BuildRequires:  pkgconfig(deviced)
BuildRequires:  pkgconfig(vconf)
BuildRequires:  pkgconfig(vconf-internal-keys)
BuildRequires:  pkgconfig(capi-system-info)
BuildRequires:  pkgconfig(capi-appfw-app-manager)
BuildRequires:  pkgconfig(capi-location-manager)
BuildRequires:  pkgconfig(capi-network-wifi-manager)
BuildRequires:  pkgconfig(capi-network-bluetooth)
BuildRequires:  pkgconfig(libcore-context-manager)
BuildRequires:  pkgconfig(capi-system-device)
BuildRequires:  pkgconfig(capi-geofence-manager)
BuildRequires:  pkgconfig(libtzplatform-config)
BuildRequires:  capi-geofence-manager-plugin-devel

%description
Geofence Server for Tizen


%prep
%setup -q


%build
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"

MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
	-DLIB_DIR=%{_libdir} -DSYSCONF_DIR=%{_sysconfdir} \

make %{?jobs:-j%jobs}

%install
rm -rf %{buildroot}
%make_install

mkdir -p %{buildroot}%{upgrade_script_path}
cp -f scripts/500.%{name}.sh %{buildroot}%{upgrade_script_path}

#service for systemd is not installed to support only DBus auto activation
#mkdir -p %{buildroot}%{_unitdir_user}/default.target.wants
#install -m 644 %{SOURCE1} %{buildroot}%{_unitdir_user}/geofence-server.service
#ln -s ../geofence-server.service %{buildroot}%{_unitdir_user}/default.target.wants/geofence-server.service

%clean
rm -rf %{buildroot}

%post

%postun -p /sbin/ldconfig

%files
%manifest geofence-server.manifest
%license LICENSE
%defattr(-,root,root,-)
/usr/bin/geofence-server
/usr/share/dbus-1/services/org.tizen.lbs.Providers.GeofenceServer.service
%config %{_sysconfdir}/dbus-1/session.d/geofence-server.conf
%{upgrade_script_path}/500.%{name}.sh

#service for systemd is not installed to support only DBus auto activation
#%{_unitdir_user}/geofence-server.service
#%{_unitdir_user}/default.target.wants/geofence-server.service


%package -n location-geofence-server
Summary:    Geofence Server for Tizen
Group:      Development/Libraries
Requires:   %{name} = %{version}-%{release}

%description -n location-geofence-server
Geofence Server for Tizen

%post -n location-geofence-server
/sbin/ldconfig

%postun -n location-geofence-server
/sbin/ldconfig

%files -n location-geofence-server
%manifest location-geofence-server.manifest
%license LICENSE
%{_libdir}/geofence/module/libgeofence.so*