summaryrefslogtreecommitdiff
path: root/packaging/alarm-manager.spec
blob: ae7f66f909b5c2c2f3c4b3ce6362e0597ad9945b (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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
Name:       alarm-manager
Summary:    Alarm library
Version:    0.7.15
Release:    1
Group:      System/Libraries
License:    Apache-2.0
Source0:    %{name}-%{version}.tar.gz
Source1:    alarm-server.service
Source2:    alarm-session-agent.service
Source3:    alarm-session-agent.socket
Source4:    alarm-manager.conf
Source5:    99-rtc.rules
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

BuildRequires: cmake
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(appsvc)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(capi-system-device)
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(eventsystem)
BuildRequires: pkgconfig(notification)
BuildRequires: python-xml
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(cert-svc-vcore)
BuildRequires: pkgconfig(cynara-client)
BuildRequires: pkgconfig(cynara-session)
BuildRequires: pkgconfig(cynara-creds-gdbus)

%description
Alarm Server and devel libraries


%package -n alarm-server
Summary:    Alarm server
Group:      Development/Libraries

%description -n alarm-server
Alarm Server, manages alarms


%package -n libalarm
Summary:    Alarm server libraries
Group:      Development/Libraries
Requires:   alarm-server = %{version}-%{release}

%description -n libalarm
Alarm server libraries for client


%package -n libalarm-devel
Summary:    Alarm server libraries (devel)
Group:      Development/Libraries
Requires:   libalarm = %{version}-%{release}

%description -n libalarm-devel
Alarm server libraries development package (devel)


%package -n alarm-config-all-service-permitted
Summary:    Configuration for permitting all service applications
Group:      Development/Libraries
Requires:   libalarm = %{version}-%{release}

%description -n alarm-config-all-service-permitted
A configuration file package for permitting all service applications


%package -n alarm-config-platform-service-permitted
Summary:    Configuration for permitting platform service applications
Group:      Development/Libraries
Requires:   libalarm = %{version}-%{release}

%description -n alarm-config-platform-service-permitted
A configuration file package for permitting all service applications that have been platform certified


%package -n alarm-config-service-restricted
Summary:    Configuration for restricting service applications
Group:      Development/Libraries
Requires:   libalarm = %{version}-%{release}

%description -n alarm-config-service-restricted
A configuration file package for restricting service applications


%prep
%setup -q


%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`

export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
%define appfw_feature_alarm_manager_module_log 1
%if 0%{?appfw_feature_alarm_manager_module_log}
	_APPFW_FEATURE_ALARM_MANAGER_MODULE_LOG=ON
%endif

%cmake . -DOBS=1 \
	-DFULLVER=%{version} \
	-DMAJORVER=${MAJORVER} \
	-DTZ_SYS_ETC=%{TZ_SYS_ETC} \
	-D_APPFW_FEATURE_ALARM_MANAGER_MODULE_LOG:BOOL=${_APPFW_FEATURE_ALARM_MANAGER_MODULE_LOG} \
	-DALARM_CONF_DIR=%{_datadir}/alarm-manager

make %{?jobs:-j%jobs}


%install
rm -rf %{buildroot}
%make_install

mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/alarm-server.service
install -m 0644 %SOURCE2 %{buildroot}%{_unitdir_user}/alarm-session-agent.service
install -m 0644 %SOURCE3 %{buildroot}%{_unitdir_user}/alarm-session-agent.socket
ln -s ../alarm-server.service %{buildroot}%{_unitdir}/multi-user.target.wants/alarm-server.service
ln -sf ../alarm-session-agent.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/alarm-session-agent.socket
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %SOURCE4 %{buildroot}%{_tmpfilesdir}/alarm-manager.conf
mkdir -p %{buildroot}%{_libdir}/udev/rules.d
install -m 0644 %SOURCE5 %{buildroot}%{_libdir}/udev/rules.d

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post -n alarm-server

%post -n libalarm
/sbin/ldconfig

%postun -n libalarm
/sbin/ldconfig

%posttrans -n alarm-server
if [ -e /etc/config/model-config.xml ]; then
	grep "feature\/profile.*tv" /etc/config/model-config.xml > /dev/null
	if [ $? -eq 0 ]; then
		rm %{_libdir}/udev/rules.d/99-rtc.rules
	fi
fi

%files -n alarm-server
%manifest alarm-server.manifest
%{_bindir}/*
%attr(0755,root,root) %{_bindir}/alarm-server
%attr(0755,root,root) %{_bindir}/alarm_session_agent
%attr(0644,root,root) %{_unitdir}/alarm-server.service
%{_unitdir}/multi-user.target.wants/alarm-server.service
%{_unitdir_user}/alarm-session-agent.service
%{_unitdir_user}/alarm-session-agent.socket
%{_unitdir_user}/sockets.target.wants/alarm-session-agent.socket
%attr(0644,root,root) %{_datadir}/dbus-1/system-services/org.tizen.alarm.manager.service
%license LICENSE
%config %{_sysconfdir}/dbus-1/system.d/alarm-service.conf
%{_tmpfilesdir}/alarm-manager.conf
%{_libdir}/udev/rules.d/99-rtc.rules
%if 0%{?appfw_feature_alarm_manager_module_log}
%attr(0755,root,root) %{TZ_SYS_ETC}/dump.d/module.d/alarmmgr_log_dump.sh
%endif

%files -n libalarm
%manifest alarm-lib.manifest
%attr(0644,root,root) %{_libdir}/libalarm.so.*
%{_libdir}/*.so.*
%license LICENSE

%files -n libalarm-devel
%{_includedir}/*.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so

%files -n alarm-config-all-service-permitted
%{_datadir}/alarm-manager/alarm-config-all-service-permitted

%files -n alarm-config-platform-service-permitted
%{_datadir}/alarm-manager/alarm-config-platform-service-permitted

%files -n alarm-config-service-restricted
%{_datadir}/alarm-manager/alarm-config-service-restricted