* Introduce new systemd-rpm macros in xl2tpd spec file

epel9
Paul Wouters 12 years ago
parent f526fca0ad
commit d374fe85ac

@ -20,16 +20,14 @@ Patch3: xl2tpd-1.3.1-kernelmode.patch
Patch4: xl2tpd-1.3.1-conf.patch
Patch5: xl2tpd-1.3.1-pty.patch
Patch6: xl2tpd-1.3.1-ipparam-to-remotenumber.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ppp >= 2.4.5-18, kernel-modules-extra
# If you want to authenticate against a Microsoft PDC/Active Directory
# Requires: samba-winbind
BuildRequires: libpcap-devel
BuildRequires: systemd-units
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description
xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (RFC 2661).
@ -88,24 +86,13 @@ install -p -D -m600 doc/l2tp-secrets.sample %{buildroot}%{_sysconfdir}/xl2tpd/l2
install -p -D -m600 examples/chapsecrets.sample %{buildroot}%{_sysconfdir}/ppp/chap-secrets.sample
install -p -D -m755 -d %{buildroot}%{_localstatedir}/run/xl2tpd
%clean
rm -rf %{buildroot}
%preun
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable xl2tpd.service > /dev/null 2>&1 || :
/bin/systemctl stop xl2tpd.service > /dev/null 2>&1 || :
fi
%systemd_preun xl2tpd.service
%post
%systemd_post xl2tpd.service
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart xl2tpd.service >/dev/null 2>&1 || :
fi
%systemd_postun_with_restart xl2tpd.service
%triggerun -- xl2td < 1.3.1-3
# Save the current service runlevel info
@ -117,7 +104,6 @@ fi
/bin/systemctl try-restart xl2tpd.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root)
%doc BUGS CHANGES CREDITS LICENSE README.* TODO doc/rfc2661.txt
%doc doc/README.patents examples/chapsecrets.sample
%{_sbindir}/xl2tpd
@ -135,6 +121,7 @@ fi
%changelog
* Mon Apr 01 2013 Paul Wouters <pwouters@redhat.com> - 1.3.1-12
- rhbz#929447 - Fix ipparam so ipv6-up does not fail (Michal Bruncko)
- rhbz#850372 - Introduce new systemd-rpm macros in xl2tpd spec file
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

Loading…
Cancel
Save