[ngircd] Update to 20.1

Kevin Fenzi kevin at fedoraproject.org
Sun Feb 3 01:13:45 UTC 2013


commit 30974743a2becc12b558fe1b040028bf905743ea
Author: Kevin Fenzi <kevin at scrye.com>
Date:   Sat Feb 2 18:13:41 2013 -0700

    Update to 20.1
    
    - Convert to systemd units for f19+

 .gitignore     |    1 +
 ngircd.service |   11 +++++++++++
 ngircd.spec    |   42 ++++++++++++++++++++++++++++++++++++++----
 sources        |    2 +-
 4 files changed, 51 insertions(+), 5 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ef64c0a..6592ffc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@ ngircd-16.tar.gz
 /ngircd-17.tar.gz
 /ngircd-17.1.tar.gz
 /ngircd-18.tar.gz
+/ngircd-20.1.tar.gz
diff --git a/ngircd.service b/ngircd.service
new file mode 100644
index 0000000..7187a52
--- /dev/null
+++ b/ngircd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Next Generation IRC Daemon
+Documentation=man:ngircd(8) man:ngircd.conf(5) http://ngircd.barton.de/documentation.php.en
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/ngircd -n
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ngircd.spec b/ngircd.spec
index dae4918..25e8158 100644
--- a/ngircd.spec
+++ b/ngircd.spec
@@ -1,6 +1,6 @@
 Name:           ngircd
-Version:        18
-Release:        4%{?dist}
+Version:        20.1
+Release:        1%{?dist}
 Summary:        Next Generation IRC Daemon
 Group:          System Environment/Daemons
 License:        GPLv2+
@@ -8,14 +8,23 @@ URL:            http://ngircd.barton.de/
 Source0:        ftp://ftp.berlios.de/pub/ngircd/ngircd-%{version}.tar.gz
 Source1:        ngircd.init
 Source2:        ngircd.conf
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source3:        ngircd.service
+
 BuildRequires:  zlib-devel, avahi-compat-howl-devel, tcp_wrappers-devel
 BuildRequires:  libident-devel
 BuildRequires:  gnutls-devel
+%if 0%{?rhel} > 6 || 0%{?fedora} > 18
+BuildRequires: systemd
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+%else
 Requires(post): /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
 Requires(preun): /sbin/service
 Requires(postun): /sbin/service
+%endif
+
 Requires(pre): shadow-utils
 
 %description
@@ -43,7 +52,13 @@ make %{?_smp_mflags}
 %install
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}
+
+%if 0%{?rhel} > 6 || 0%{?fedora} > 18
+install -D -m 755 %{SOURCE3} %{buildroot}%{_unitdir}/ngircd.service
+%else
 install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/ngircd
+%endif
+
 install -D -m 660 %{SOURCE2} %{buildroot}%{_sysconfdir}/ngircd.conf
 touch  %{buildroot}%{_sysconfdir}/ngircd.motd
 rm -rf %{buildroot}%{_docdir}/ngircd
@@ -60,33 +75,52 @@ getent passwd ngircd >/dev/null || \
 exit 0
 
 %post
+%if 0%{?rhel} > 6 || 0%{?fedora} > 18
+%systemd_post ngircd.service
+%else
 # This adds the proper /etc/rc*.d links for the script
 /sbin/chkconfig --add ngircd
+%endif
 
 %preun
+%if 0%{?rhel} > 6 || 0%{?fedora} > 18
+%systemd_preun ngircd.service
+%else
 if [ $1 = 0 ]; then
         /sbin/service ngircd stop >/dev/null 2>&1 || :
         /sbin/chkconfig --del ngircd
 fi
+%endif
 
 %postun
+%if 0%{?rhel} > 6 || 0%{?fedora} > 18
+%systemd_postun_with_restart ngircd.service
+%else
 if [ "$1" -ge "1" ]; then
         /sbin/service ngircd condrestart >/dev/null 2>&1 || :
 fi
+%endif
 
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING ChangeLog NEWS README doc/*
 %config(noreplace) %attr(660, root, ngircd) %{_sysconfdir}/ngircd.conf
 %ghost %config(noreplace) %attr(660, root, ngircd) %{_sysconfdir}/ngircd.motd
+%if 0%{?rhel} > 6 || 0%{?fedora} > 18
+%{_unitdir}/ngircd.service
+%else
 %{_initrddir}/ngircd
+%endif
 %{_sbindir}/ngircd
 %{_mandir}/man5/ngircd.conf*
 %{_mandir}/man8/ngircd.8*
 %dir %attr(775, root, ngircd) %{_localstatedir}/run/ngircd/
 
-
 %changelog
+* Sat Feb  2 2013 Kevin Fenzi <kevin at scrye.com> 20.1-1
+- Update to 20.1
+- Convert to systemd units for f19+
+
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 18-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/sources b/sources
index 16c4575..0af7bf6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4958c8b2d128cf3e9888af3f782892a1  ngircd-18.tar.gz
+f37a949af4ab0cd76faabc48011790bb  ngircd-20.1.tar.gz


More information about the scm-commits mailing list