@ -17,7 +17,7 @@ Requires: pcre
Requires: libopenssl1_0_0
Requires: libopenssl1_0_0
BuildRequires: libopenssl-devel
BuildRequires: libopenssl-devel
%else
%else
Requires: openssl-libs
Requires: openssl
BuildRequires: openssl-devel
BuildRequires: openssl-devel
%endif
%endif
@ -84,11 +84,13 @@ install -m 644 %{_builddir}/%{buildsubdir}/completions/bash/* %{buildroot}%{_dat
%post
%post
%if ! 0%{?use_systemd}
%if ! 0%{?use_systemd}
/sbin/chkconfig --add shadowsocks-libev > /dev/null 2>&1 || :
/sbin/chkconfig --add shadowsocks-libev > /dev/null 2>&1 || :
%elif 0%{?suse_version}
%else
%if 0%{?suse_version}
%service_add_post shadowsocks-libev.service
%service_add_post shadowsocks-libev.service
%else
%else
%systemd_post shadowsocks-libev.service
%systemd_post shadowsocks-libev.service
%endif
%endif
%endif
%preun
%preun
%if ! 0%{?use_systemd}
%if ! 0%{?use_systemd}
@ -96,20 +98,22 @@ if [ $1 -eq 0 ]; then
/sbin/service shadowsocks-libev stop > /dev/null 2>&1 || :
/sbin/service shadowsocks-libev stop > /dev/null 2>&1 || :
/sbin/chkconfig --del shadowsocks-libev > /dev/null 2>&1 || :
/sbin/chkconfig --del shadowsocks-libev > /dev/null 2>&1 || :
fi
fi
%elif 0%{?suse_version}
%else
%if 0%{?suse_version}
%service_del_preun shadowsocks-libev.service
%service_del_preun shadowsocks-libev.service
%else
%else
%systemd_preun shadowsocks-libev.service
%systemd_preun shadowsocks-libev.service
%endif
%endif
%endif
%postun
%postun
%if ! 0%{?use_systemd}
%el if 0%{?suse_version}
%if 0%{?use_systemd}
%if 0%{?suse_version}
%service_del_postun shadowsocks-libev.service
%service_del_postun shadowsocks-libev.service
%else
%else
%systemd_postun_with_restart shadowsocks-libev.service
%systemd_postun_with_restart shadowsocks-libev.service
%endif
%endif
%endif
%files
%files
/usr/share/doc/shadowsocks-libev/shadowsocks-libev.html
/usr/share/doc/shadowsocks-libev/shadowsocks-libev.html