rpms/and/devel and.service,NONE,1.1 and.spec,1.6,1.7
Jochen Schmitt
s4504kr at fedoraproject.org
Sun Jul 18 19:18:46 UTC 2010
Author: s4504kr
Update of /cvs/pkgs/rpms/and/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv30971
Modified Files:
and.spec
Added Files:
and.service
Log Message:
Try to support systemd
--- NEW FILE and.service ---
[Unit]
Description=auto nice daemon
After=syslog.target
[Service]
ExecStart=/usr/sbin/and
[Install]
WantedBy=multi-user.target
Index: and.spec
===================================================================
RCS file: /cvs/pkgs/rpms/and/devel/and.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- and.spec 24 Jul 2009 16:52:22 -0000 1.6
+++ and.spec 18 Jul 2010 19:18:46 -0000 1.7
@@ -1,6 +1,6 @@
Name: and
Version: 1.2.2
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: Auto nice daemon
License: GPLv2
@@ -10,14 +10,12 @@ URL: http://and.sourceforge.net
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1: and.init
Source2: and.sysconf
+Source3: and.service
Patch1: and-1.2.2-makefile.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
-Requires(post): /sbin/chkconfig
-Requires(postun): /sbin/service
-Requires(preun): /sbin/chkconfig
-Requires(preun): /sbin/service
+Requires: init(%{name})
%description
The auto nice daemon renices and even kills jobs according to their CPU time,
@@ -25,6 +23,50 @@ owner, and command name. This is especia
lots of concurrent CPU-intensive jobs and users that tend to forget to
nice their jobs.
+%package sysvinit
+Summary: SysV initscripts for and
+License: GPLv2
+Group: System Environment/Daemons
+
+Requires(post): %{name} /sbin/chkconfig
+Requires(postun): %{name} /sbin/service
+Requires(preun): %{name} /sbin/chkconfig
+Requires(preun): %{name} /sbin/service
+
+Provides: init(%{name}) = sysv
+
+Buildarch: noarch
+
+%description sysvinit
+The auto nice daemon renices and even kills jobs according to their CPU time,
+owner, and command name. This is especially useful on production machines with
+lots of concurrent CPU-intensive jobs and users that tend to forget to
+nice their jobs.
+
+This package provides initscripts for the SysV init system.
+
+%package units
+Summary: systemd units for and
+License: GPLv2
+Group: System Environment/Daemons
+
+Requires(post): %{name} systemd-units
+Requires(postun): %{name} systemd-units
+Requires(preun): %{name} systemd-units
+Requires(preun): %{name} systemd-units
+
+Provides: init(%{name}) = systemd
+
+Buildarch: noarch
+
+%description units
+The auto nice daemon renices and even kills jobs according to their CPU time,
+owner, and command name. This is especially useful on production machines with
+lots of concurrent CPU-intensive jobs and users that tend to forget to
+nice their jobs.
+
+This package provides a services file for the systemd init system.
+
%prep
%setup1 -q
%patch1 -p1 -b .org
@@ -54,34 +96,55 @@ install -p -m 0755 %{SOURCE1} %{buildroo
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
install -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/and
+mkdir -p %{buildroot}/lib/systemd/system
+install -p -m 0644 %{SOURCE3} %{buildroot}/lib/systemd/system
+
%clean
rm -rf %{buildroot}
-%post
+%post sysvinit
/sbin/chkconfig --add and
-%preun
+%preun sysvinit
if [ $1 -eq 0 ]; then
/sbin/service and stop >/dev/null 2>&1 || :
/sbin/chkconfig --del and
fi
-%postun
+%postun sysvinit
if [ $1 -ge 1 ]; then
/sbin/service and condrestart >/dev/null
fi
+%post units
+/usr/bin/systemd-install --realize=minimal enable amd.service >/dev/null 2>&1 || :
+
+%preun units
+if [$1 -eq ß ]; then
+ /usr/bin/system-install --realize disable amd.service </dev/null 2>&1 || :
+fi
+
%files
%defattr(-,root,root)
%doc README LICENSE CHANGELOG
%config(noreplace) %{_sysconfdir}/and/
%config(noreplace) %{_sysconfdir}/sysconfig/and
%{_sbindir}/*
-%attr(0755,root,root) %{_initrddir}/and
%{_mandir}/man5/*.gz
%{_mandir}/man8/*.gz
+%files sysvinit
+%defattr(-,root,root)
+%attr(0755,root,root) %{_initrddir}/and
+
+%files units
+%defattr(-,root,root)
+/lib/systemd/system/and.service
+
%changelog
+* Sun Jul 18 2010 Jochen Schmitt <Jochen herr-schmitt de> - 1.2.2-9
+- Try to add systemd support
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the scm-commits
mailing list