rtkit/rtkit.spec
2020-01-08 14:34:54 +08:00

102 lines
2.9 KiB
RPMSpec

Name: rtkit
Version: 0.11+git.20161005
Release: 26
Summary: REALTIMEKIT Realtime Policy and Watchdog Daemon
License: GPLv3+ and BSD
URL: http://git.0pointer.de/?p=rtkit.git
Source0: %{name}-%{version}.tar.xz
BuildRequires: systemd dbus-devel libcap-devel polkit-devel libtool autoconf automake
Requires: dbus polkit
%systemd_requires
%package_help
%description
RealtimeKit is a D-Bus system service that changes the
scheduling policy of user processes/threads to SCHED_RR
(i.e. realtime scheduling mode) on request. It is intended to
be used as a secure mechanism to allow real-time scheduling to
be used by normal user processes.
%prep
%autosetup -n %{name}-%{version} -p1
#%setup -q
%build
./autogen.sh
autoreconf -vif
export CFLAGS="%{optflags} -Wno-error=format-security"
%configure --with-systemdsystemunitdir=%{_unitdir}
%make_build V=1
./rtkit-daemon --introspect > org.freedesktop.RealtimeKit1.xml
%install
make install DESTDIR=%{buildroot}
mkdir %{buildroot}%{_datadir}/dbus-1/interfaces/
cp %{_builddir}/%{name}-%{version}/org.freedesktop.RealtimeKit1.xml \
%{buildroot}%{_datadir}/dbus-1/interfaces/org.freedesktop.RealtimeKit1.xml
%pre
getent group rtkit >/dev/null 2>&1 || groupadd -r -g 172 rtkit
getent passwd rtkit >/dev/null 2>&1 || useradd -r -l -u 172 -g rtkit \
-d /proc -s /sbin/nologin -c "RealtimeKit" rtkit
:;
%post
%systemd_post %{name}-daemon.service
dbus-send --system --type=method_call \
--dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || :
%preun
%systemd_preun %{name}-daemon.service
%postun
%systemd_postun_with_restart %{name}-daemon.service
%files
%doc rtkit.c rtkit.h README
%license GPL LICENSE
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.RealtimeKit1.conf
%attr(0755,root,root) %{_libexecdir}/rtkit-daemon
%attr(0755,root,root) %{_sbindir}/rtkitctl
%attr(0644,root,root) %{_datadir}/dbus-1/interfaces/org.freedesktop.RealtimeKit1.xml
%{_datadir}/dbus-1/system-services/*.service
%{_datadir}/polkit-1/actions/*.policy
%{_unitdir}/rtkit-daemon.service
%files help
%{_mandir}/man8/rtkitctl.8.gz
%changelog
* Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.11-26
- update software to git 20161005
* Tue Dec 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.11-25
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:bugfix about spec
* Tue Dec 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.11-24
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:optimization the spec
* Tue Oct 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.11-23
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:fix missing arguments after systemd_postun
* Sat Oct 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.11-22
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:change the directory of the license files
* Wed Sep 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.11-21
- Package Init