Merge branch 'master' into el6

This commit is contained in:
Nick Bebout 2014-04-14 20:34:29 -05:00
commit 729609fd12
2 changed files with 15 additions and 17 deletions

View File

@ -1,5 +1,5 @@
[Unit]
Description=Daemon to do something
Description=ZNC - an advanced IRC bouncer
After=network.target
[Service]

View File

@ -5,6 +5,8 @@
%define use_systemd 1
%endif
%global _hardened_build 1
%global __python %{__python3}
Summary: An advanced IRC bouncer
@ -12,11 +14,12 @@ Name: znc
Version: 1.2
#Release: 0.1.20110801git%{?dist}
#Release: 0.4.rc2%{?dist}
Release: 1%{?dist}
Release: 3%{?dist}
License: ASL 2.0
Group: System Environment/Daemons
URL: http://znc.in
Source0: http://znc.in/releases/znc-1.2.tar.gz
Patch0: znc-crashbug.patch
%if %{use_systemd}
Source1: znc.service
@ -94,7 +97,7 @@ perl module for ZNC
%prep
%setup -q -n %{name}-%{version}
#%setup -q -n znc-1.2-rc2
#%patch0 -p1
%patch0 -p1
%__perl -pi.add_release -e 's|(?<="ZNC \%1\.3f)|-%{release}|' znc.cpp
chmod -x modules/q.cpp
@ -134,10 +137,7 @@ install -Dp -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/znc
%post
%if %{use_systemd}
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%systemd_post znc.service
%endif
%if !%{use_systemd}
@ -148,11 +148,7 @@ fi
%postun
%if %{use_systemd}
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart znc.service >/dev/null 2>&1 || :
fi
%systemd_postun_with_restart znc.service
%endif
%if !%{use_systemd}
@ -164,11 +160,7 @@ fi
%preun
%if %{use_systemd}
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable znc.service > /dev/null 2>&1 || :
/bin/systemctl stop znc.service > /dev/null 2>&1 || :
fi
%systemd_preun znc.service
%endif
%if !%{use_systemd}
@ -262,6 +254,12 @@ fi
%{_libdir}/znc/perleval.pm
%changelog
* Mon Apr 14 2014 Nick Bebout <nb@fedoraproject.org> - 1.2-3
- Fix potential crash bug when adding channels
* Mon Nov 11 2013 Nick Bebout <nb@fedoraproject.org> - 1.2-2
- Enable PIE, Fix systemd description, use systemd macros
* Mon Nov 11 2013 Nick Bebout <nb@fedoraproject.org> - 1.2-1
- Upgrade to 1.2