Fix various bugs

This commit is contained in:
Nick Bebout 2013-11-11 17:30:20 -06:00
parent b0ce3e5b1f
commit 5526916761
2 changed files with 10 additions and 16 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,7 +14,7 @@ Name: znc
Version: 1.2
#Release: 0.1.20110801git%{?dist}
#Release: 0.4.rc2%{?dist}
Release: 1%{?dist}
Release: 2%{?dist}
License: ASL 2.0
Group: System Environment/Daemons
URL: http://znc.in
@ -143,10 +145,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}
@ -157,11 +156,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}
@ -173,11 +168,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}
@ -276,6 +267,9 @@ fi
%{_libdir}/znc/modpython.so
%changelog
* 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