107 lines
3.2 KiB
RPMSpec
107 lines
3.2 KiB
RPMSpec
%define rtkit_uid 56
|
|
%define rtkit_git 56
|
|
Name: rtkit
|
|
Version: 0.11
|
|
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.de/?p=rtkit.git
|
|
Source: http://0pointer.de/public/rtkit-%{version}.tar.xz
|
|
License: BSD, GPL
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libcap-devel
|
|
BuildRequires: libdbus-devel
|
|
## AUTOBUILDREQ-END
|
|
BuildRequires: polkit-devel
|
|
BuildRequires: systemd-devel
|
|
Requires: dbus
|
|
Requires: polkit
|
|
# TODO Requires: systemd-units
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
%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
|
|
|
|
%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_gid} &>/dev/null \
|
|
-c "RealtimeKit"
|
|
fi
|
|
:
|
|
|
|
%preun
|
|
# erase
|
|
if [ $1 -eq 0 ]; then
|
|
/usr/sbin/userdel rtkit &>/dev/null
|
|
/usr/sbin/groupdel rtkit &>/dev/null
|
|
fi
|
|
:
|
|
|
|
%post
|
|
%{_bindir}/dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || : || :
|
|
# 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
|
|
:
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.RealtimeKit1.conf
|
|
%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
|
|
/lib/systemd/system/rtkit-daemon.service
|
|
%{_datadir}/polkit-1/actions/org.freedesktop.RealtimeKit1.policy
|
|
%{_mandir}/man8/rtkitctl.8.gz
|
|
%doc GPL LICENSE
|
|
# README rtkit.c rtkit.h
|
|
|
|
%changelog
|
|
* 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
|