summaryrefslogtreecommitdiff
path: root/packaging/sync-manager.spec
blob: f2f43cec530fde8f6c7ca7a5f36345fb3f57c98c (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# To not create auto-provides for extension replacement shared objects
%global __provides_exclude_from ^.*\\.extension-calendar

Name:      sync-service
Version:   0.3.43
Release:   1
License:   Apache-2.0
Summary:   Sync manager daemon
Group:     Social & Content/API
Source0:   %{name}-%{version}.tar.gz
Source1:   sync-manager.service
Source2:   org.tizen.sync.service
Source3:   org.tizen.sync.conf

BuildRequires: cmake
BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-network-connection)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(db-util)
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(vconf-internal-keys)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.26
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(accounts-svc)
BuildRequires: pkgconfig(alarm-service)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(cynara-client)
BuildRequires: pkgconfig(cynara-session)
BuildRequires: pkgconfig(cynara-creds-gdbus)
BuildRequires: pkgconfig(calendar-service2)
BuildRequires: pkgconfig(contacts-service2)
BuildRequires: pkgconfig(capi-content-media-content)
BuildRequires: pkgconfig(libtzplatform-config)

%description
sync manager service and sync framework which manages sync of registered applications

%package -n libcore-sync-client
Summary:    Sync manager client library
Group:      Development/Libraries
Requires:   %{name} = %{version}-%{release}

%description -n libcore-sync-client
sync client provides sync adapter functionality to register sync adapters and to get callbacks.

%package -n libcore-sync-client-devel
Summary:    Sync manager client library (Development)
Group:      Application Framework/Development

%description -n  libcore-sync-client-devel
sync client provides sync adapter functionality to register sync adapters and to get callbacks.

%if 0%{?gcov:1}
%package gcov
Summary:    Sync Manager Framwework library (gcov)
Group:      Service Framework/Testing

%description gcov
gcov objects for coverage test
%endif

%define _pkgdir /usr

%prep
%setup -q
cp %{SOURCE2} .

%build
_FEATURE_CONTAINER_ENABLE=OFF

%if 0%{?gcov:1}
export CFLAGS+=" -fprofile-arcs -ftest-coverage"
export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
export FFLAGS+=" -fprofile-arcs -ftest-coverage"
export LDFLAGS+=" -lgcov"
%endif

cmake \
	-DCMAKE_INSTALL_PREFIX=%{_pkgdir} \
	-DPACKAGE_NAME=%{name} \
	-DBINDIR=%{_bindir} \
	-DLIBDIR=%{_libdir} \
	-DINCLUDEDIR=%{_includedir} \
	-D_FEATURE_CONTAINER_ENABLE:BOOL=${_FEATURE_CONTAINER_ENABLE} \
	-DVERSION=%{version}

make %{?jobs:-j%jobs}

%install
%make_install
%if 0%{?gcov:1}
builddir=$(basename $PWD)
gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
mkdir -p "$gcno_obj_dir"
find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
%endif

mkdir -p %{buildroot}%{_unitdir_user}/delayed.target.wants
install -m 0644 %SOURCE1 %{buildroot}%{_unitdir_user}/sync-manager.service
ln -s ../sync-manager.service %{buildroot}%{_unitdir_user}/delayed.target.wants/sync-manager.service

mkdir -p %{buildroot}/usr/share/dbus-1/services
install -m 0644 %SOURCE2 %{buildroot}/usr/share/dbus-1/services/org.tizen.sync.service

mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/session.d
install -m 0644 %SOURCE3 %{buildroot}%{_sysconfdir}/dbus-1/session.d/org.tizen.sync.conf

%post -n libcore-sync-client -p /sbin/ldconfig
%post -n libcore-sync-client-devel -p /sbin/ldconfig

%post
/sbin/ldconfig

%postun -n libcore-sync-client -p /sbin/ldconfig
%postun -n libcore-sync-client-devel -p /sbin/ldconfig

%files -n sync-service
%manifest sync-service.manifest
%license LICENSE.APLv2
%defattr(-,root,root,-)
%config %{_sysconfdir}/dbus-1/session.d/org.tizen.sync.conf
%{_bindir}/*
%{_unitdir_user}/sync-manager.service
%{_unitdir_user}/delayed.target.wants/sync-manager.service
%attr(0644,root,root) /usr/share/dbus-1/services/org.tizen.sync.service

%files -n libcore-sync-client
%manifest libcore-sync-client.manifest
%defattr(-,root,root,-)
%{_libdir}/libcore-sync-client.so.*

%license LICENSE.APLv2

%files -n libcore-sync-client-devel
%manifest libcore-sync-client.manifest
%defattr(-,root,root,-)
%{_includedir}/*sync*.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libcore-sync-client.so

%if 0%{?gcov:1}
%files gcov
%{_datadir}/gcov/obj/*
%endif