/
dsme.spec
113 lines (97 loc) · 3.2 KB
1
2
Name: dsme
Summary: Device State Management Entity
3
Version: 0.84.0
4
5
Release: 0
License: LGPLv2+
6
URL: https://git.sailfishos.org/mer-core/dsme
7
Source0: %{name}-%{version}.tar.gz
8
Source1: dsme.service.in
9
10
Source2: dsme-rpmlintrc
Requires: systemd
11
Requires: ngfd
12
Requires: libdsme >= 0.66.0
13
14
15
Requires(preun): systemd
Requires(post): systemd
Requires(postun): systemd
16
BuildRequires: pkgconfig(glib-2.0) >= 2.32.0
17
BuildRequires: pkgconfig(dbus-1) >= 1.8
18
BuildRequires: pkgconfig(libiphb) >= 1.2.0
19
BuildRequires: pkgconfig(dsme) >= 0.66.0
20
BuildRequires: pkgconfig(libsystemd)
21
BuildRequires: pkgconfig(mce) >= 1.12.3
22
BuildRequires: pkgconfig(libngf0) >= 0.24
23
24
25
BuildRequires: autoconf
BuildRequires: libtool
BuildRequires: automake
26
BuildRequires: pkgconfig(libcryptsetup)
27
28
29
30
%description
Device State Management Entity (with debug symbols). This package contains the Device State Management Entity which provides state management features such as service monitoring, process watchdog and inactivity tracking.
31
32
33
34
35
36
%package plugin-devel
Summary: Header files required by DSME plugins
%description plugin-devel
Development header files for DSME plugins.
37
38
39
40
41
42
43
44
45
%package tests
Summary: DSME test cases
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
Requires: dbus
%description tests
Test cases and xml test description for DSME
46
%prep
47
%autosetup -n %{name}-%{version}
48
49
50
%build
unset LD_AS_NEEDED
51
./verify_version.sh
52
53
test -e Makefile || ./autogen.sh
test -e Makefile || (%configure --disable-static \
54
55
56
57
58
--disable-poweron-timer \
--disable-upstart \
--enable-runlevel \
--enable-systemd \
--enable-pwrkeymonitor \
59
--disable-validatorlistener \
60
--enable-abootsettings)
61
62
%make_build
63
64
65
66
67
%install
rm -rf %{buildroot}
%make_install
68
install -d %{buildroot}%{_sysconfdir}/dsme/
69
install -D -m 644 reboot-via-dsme.sh %{buildroot}/etc/profile.d/reboot-via-dsme.sh
70
71
72
73
install -d %{buildroot}%{_unitdir}
sed -e "s|@LIBDIR@|%{_libdir}|g" %{SOURCE1} > %{buildroot}%{_unitdir}/%{name}.service
install -d %{buildroot}%{_unitdir}/multi-user.target.wants/
ln -s ../%{name}.service %{buildroot}%{_unitdir}/multi-user.target.wants/%{name}.service
74
75
install -d %{buildroot}/var/lib/dsme
[ ! -f %{buildroot}/var/lib/dsme/alarm_queue_status ] && echo 0 > %{buildroot}/var/lib/dsme/alarm_queue_status
76
install -D -m755 preinit/set_system_time %{buildroot}/usr/lib/startup/preinit/set_system_time
77
78
79
%preun
if [ "$1" -eq 0 ]; then
80
systemctl stop %{name}.service || :
81
82
83
fi
%post
84
85
systemctl daemon-reload || :
systemctl reload-or-try-restart %{name}.service || :
86
87
%postun
88
systemctl daemon-reload || :
89
90
91
%files
%defattr(-,root,root,-)
92
%dir %{_libdir}/dsme
93
94
%{_libdir}/dsme/*
%attr(755,root,root)%{_sbindir}/*
95
%dir %{_sysconfdir}/dsme
96
%config %{_sysconfdir}/dbus-1/system.d/dsme.conf
97
%license debian/copyright COPYING
98
99
%{_unitdir}/%{name}.service
%{_unitdir}/multi-user.target.wants/%{name}.service
100
101
/var/lib/dsme
%config(noreplace) /var/lib/dsme/alarm_queue_status
102
/etc/profile.d/reboot-via-dsme.sh
103
/usr/lib/startup/preinit/set_system_time
104
105
106
107
108
109
110
%files plugin-devel
%defattr(-,root,root,-)
%dir %{_includedir}/dsme-plugin
%{_includedir}/dsme-plugin/*.h
%{_libdir}/pkgconfig/dsme-plugin.pc
111
112
%files tests
%defattr(-,root,root,-)
113
/opt/tests/dsme-tests