rtkit/rtkit.spec

134 lines
4.0 KiB
RPMSpec

%define rtkit_uid 56
%define rtkit_gid 56
Name: rtkit
Version: 0.13
Release: 2mamba
Summary: Realtime Policy and Watchdog Daemon
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://git.0pointer.net/?p=rtkit.git
Source: https://github.com/heftig/rtkit.git/v%{version}/rtkit-%{version}.tar.bz2
Patch0: rtkit-0.12-arm-revert-unsupported-asm.patch
Patch1: rtkit-0.12-arm-revert-unsupported-asm-2.patch.patch
License: BSD, GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libcap-devel
BuildRequires: libdbus-devel
BuildRequires: libsystemd-devel
## AUTOBUILDREQ-END
BuildRequires: polkit-devel
BuildRequires: systemd-devel
Requires: dbus
Requires: polkit
# TODO Requires: systemd-units
%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
%setup -q
%ifarch arm
%patch1 -p1 -R
#%patch0 -p1 -R
%endif
./autogen.sh
%build
%configure \
LIBS="-lrt"
%make
./rtkit-daemon --introspect > org.freedesktop.RealtimeKit1.xml
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
mkdir -p %{buildroot}%{_datadir}/dbus-1/interfaces
install -pm 644 org.freedesktop.RealtimeKit1.xml %{buildroot}%{_datadir}/dbus-1/interfaces/org.freedesktop.RealtimeKit1.xml
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
if [ $1 -ge 1 ]; then
/usr/sbin/groupadd rtkit -g %{rtkit_gid} &>/dev/null
/usr/sbin/useradd rtkit -d /proc -s /sbin/nologin \
-u %{rtkit_uid} -g rtkit \
-c "RealtimeKit" &>/dev/null
fi
:
%preun
# erase
if [ $1 -eq 0 ]; then
/usr/sbin/userdel rtkit &>/dev/null
/usr/sbin/groupdel rtkit &>/dev/null
fi
%systemd_preun rtkit-daemon
:
%post
%{_bindir}/dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || : || :
%systemd_post rtkit-daemon
# with systemd-units
#/usr/bin/systemd-install enable --realize=minimal rtkit-daemon.service >/dev/null 2>&1 || :
#/bin/systemctl enable rtkit-daemon.service >/dev/null 2>&1 || :
# with systemd-units
#%preun
#if [ "$1" -eq 0 ]; then
# /bin/systemctl disable rtkit-daemon.service >/dev/null 2>&1 || :
#fi
:
%postun
%systemd_postun_with_restart rtkit-daemon
:
%files
%defattr(-,root,root)
%attr(0755,root,root) %{_libexecdir}/rtkit-daemon
%attr(0755,root,root) %{_sbindir}/rtkitctl
%{_datadir}/dbus-1/interfaces/org.freedesktop.RealtimeKit1.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.RealtimeKit1.service
%{_unitdir}/rtkit-daemon.service
%{_libexecdir}/installed-tests/rtkit/rtkit-test
%{_datadir}/dbus-1/system.d/org.freedesktop.RealtimeKit1.conf
%{_datadir}/polkit-1/actions/org.freedesktop.RealtimeKit1.policy
%{_mandir}/man8/rtkitctl.8*
%doc GPL LICENSE
# README rtkit.c rtkit.h
%changelog
* Wed Dec 01 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 0.13-2mamba
- rebuilt
* Tue Apr 07 2020 Automatic Build System <autodist@mambasoft.it> 0.13-1mamba
- automatic version update by autodist
* Fri Aug 02 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12-1mamba
- update to 0.12
* Sun Aug 03 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.11-3mamba
- fix rtkit group and user creation (typo error)
* Tue Jul 23 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.11-2mamba
- fixed rtkit user and group creation
* Tue Aug 07 2012 Automatic Build System <autodist@mambasoft.it> 0.11-1mamba
- update to 0.11
* Fri Jul 22 2011 Automatic Build System <autodist@mambasoft.it> 0.10-1mamba
- automatic update to 3.0.3.0 by autodist
* Sun Dec 26 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9-2mamba
- automatic port from devel-java
* Wed Dec 08 2010 gil <puntogil@libero.it> 0.9-1mamba
- package created by autospec