/
mce.spec
134 lines (116 loc) · 3.9 KB
/
mce.spec
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
Name: mce
Summary: Mode Control Entity for Nokia mobile computers
Version: 1.102.1
Release: 1
Group: System/System Control
License: LGPLv2
URL: https://git.sailfishos.org/mer-core/mce
Source0: %{name}-%{version}.tar.bz2
# Patches auto-generated by git-buildpackage:
Requires: dsme >= 0.79.0
Requires: systemd
Requires(preun): systemd
Requires(post): systemd
Requires(postun): systemd
Conflicts: mce-plugin-libhybris < 1.3.0
Conflicts: lipstick-qt5 < 0.24.7
BuildRequires: pkgconfig(dbus-1) >= 1.0.2
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(dsme) >= 0.65.0
BuildRequires: pkgconfig(thermalmanager_dbus_if)
BuildRequires: pkgconfig(libiphb)
BuildRequires: pkgconfig(glib-2.0) >= 2.36.0
BuildRequires: pkgconfig(mce) >= 1.27.0
BuildRequires: pkgconfig(libngf0) >= 0.24
BuildRequires: pkgconfig(libsystemd-daemon)
BuildRequires: kernel-headers >= 2.6.32
BuildRequires: systemd
BuildRequires: pkgconfig(usb_moded)
BuildRequires: pkgconfig(libudev)
# systemd has /etc/rpm/macros.systemd
# Automatically genereted libglib-2.0.so.0 dependency is not enough
Requires: glib2 >= 2.36.0
%description
This package contains the Mode Control Entity which provides
mode management features. This is a daemon that is the backend
for many features on Nokia's mobile computers.
%package tools
Summary: Tools for interacting with mce
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
# Automatically genereted libglib-2.0.so.0 dependency is not enough
Requires: glib2 >= 2.36.0
%description tools
This package contains tools that can be used to interact with
the Mode Control Entity and to get mode information.
%package tests
Summary: Test suite for mce
Group: System/System Control
BuildRequires: pkgconfig(check)
# Automatically genereted libglib-2.0.so.0 dependency is not enough
Requires: glib2 >= 2.36.0
%description tests
This package contains test suite for mce
%package config-legacy
Summary: Config files for mce (legacy hw)
Group: System/System Control
%description config-legacy
This package contains mce configuration files for legacy hw
Potentially useful for using Nemomobile version of mce with
Nokia N770, N800, N810, N900, N9 and N950 devices.
%prep
%setup -q -n %{name}-%{version}
%build
./verify_version
#make %{?jobs:-j%jobs} %{!?qa_stage_devel:ENABLE_DEVEL_LOGGING=n}
make %{?_smp_mflags} %{!?qa_stage_devel:ENABLE_DEVEL_LOGGING=n}
%install
rm -rf %{buildroot}
# FIXME: we need a configure script ... for now pass dirs in make install
make install DESTDIR=%{buildroot} _UNITDIR=%{_unitdir} ENABLE_MANPAGE_INSTALL=n
%preun
if [ "$1" -eq 0 ]; then
systemctl stop %{name}.service || :
fi
%post
systemctl daemon-reload || :
systemctl reload-or-try-restart %{name}.service || :
%postun
systemctl daemon-reload || :
%files
%defattr(-,root,root,-)
%license COPYING debian/copyright
# binaries
%{_sbindir}/%{name}
%{_sbindir}/dummy_compositor
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/modules
%{_libdir}/%{name}/modules/*.so
# config
%dir %config %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/10mce.ini
%config %{_sysconfdir}/%{name}/20mce-radio-states.ini
%config %{_sysconfdir}/%{name}/20hybris-led.ini
%config %{_sysconfdir}/%{name}/20hybris-features.ini
%config %{_sysconfdir}/%{name}/20debug-led.ini
%config %{_sysconfdir}/%{name}/20als-defaults.ini
# empty /var/lib/mce -> rpm
%dir %{_localstatedir}/lib/%{name}/
# NB empty /var/run/mce -> handled by systemd tmpfiles.d/mce.conf
# dbus
%config %{_sysconfdir}/dbus-1/system.d/mce.conf
# systemd
%config %{_sysconfdir}/tmpfiles.d/mce.conf
/lib/systemd/system/%{name}.service
/lib/systemd/system/multi-user.target.wants/%{name}.service
%files tools
%defattr(-,root,root,-)
%license COPYING debian/copyright
%{_sbindir}/mcetool
%{_sbindir}/evdev_trace
%files tests
%defattr(-,root,root,-)
## QUARANTINE /opt/tests/mce/*
%files config-legacy
%defattr(-,root,root,-)
%config %{_sysconfdir}/%{name}/11legacy.ini