* Tue Feb 28 2012 Paul Wouters <pwouters@redhat.com> - 1.3.1-3

- Converted to systemd
- Added -Wunused patch to fix two minor warnings
epel9
Paul Wouters 13 years ago
parent 76d8d21930
commit 23c5a05ca9

@ -1,2 +1 @@
28264284552c442b24cf421755a2bb48 xl2tpd-1.3.0.tar.gz
cf61576fef5c2d6c68279a408ec1f0d5 xl2tpd-1.3.1.tar.gz

@ -1,22 +1,23 @@
Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661)
Name: xl2tpd
Version: 1.3.1
Release: 2%{?dist}
Release: 3%{?dist}
# No version specified.
License: GPL+
Url: http://www.xelerance.com/software/xl2tpd/
Group: System Environment/Daemons
Source0: http://www.xelerance.com/software/xl2tpd/xl2tpd-%{version}.tar.gz
Source1: xl2tpd.service
Source2: tmpfiles-xl2tpd.conf
Patch1: xl2tpd-1.3.1-Wunused.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: ppp
%if 0%{?el3}%{?el4}
BuildRequires: libpcap
%else
BuildRequires: libpcap-devel
%endif
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
BuildRequires: systemd-units
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description
xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (RFC 2661).
@ -45,6 +46,7 @@ It was de-facto maintained by Jacco de Leeuw <jacco2@dds.nl> in 2002 and 2003.
%prep
%setup -q
%patch1 -p1
%build
#make DFLAGS="$RPM_OPT_FLAGS -g -DDEBUG_HELLO -DDEBUG_CLOSE -DDEBUG_FLOW -DDEBUG_PAYLOAD -DDEBUG_CONTROL -DDEBUG_CONTROL_XMIT -DDEBUG_FLOW_MORE -DDEBUG_MAGIC -DDEBUG_ENTROPY -DDEBUG_HIDDEN -DDEBUG_PPPD -DDEBUG_AAA -DDEBUG_FILE -DDEBUG_FLOW -DDEBUG_HELLO -DDEBUG_CLOSE -DDEBUG_ZLB -DDEBUG_AUTH"
@ -53,31 +55,46 @@ make DFLAGS="$RPM_OPT_FLAGS -g "
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} PREFIX=%{_prefix} install
install -d 0755 %{buildroot}%{_unitdir}
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/xl2tpd.service
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d/
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
install -p -D -m644 examples/xl2tpd.conf %{buildroot}%{_sysconfdir}/xl2tpd/xl2tpd.conf
install -p -D -m644 examples/ppp-options.xl2tpd %{buildroot}%{_sysconfdir}/ppp/options.xl2tpd
install -p -D -m600 doc/l2tp-secrets.sample %{buildroot}%{_sysconfdir}/xl2tpd/l2tp-secrets
install -p -D -m600 examples/chapsecrets.sample %{buildroot}%{_sysconfdir}/ppp/chap-secrets.sample
install -p -D -m755 packaging/fedora/xl2tpd.init %{buildroot}%{_initrddir}/xl2tpd
install -p -D -m755 -d %{buildroot}%{_localstatedir}/run/xl2tpd
%clean
rm -rf %{buildroot}
%post
/sbin/chkconfig --add xl2tpd
%preun
if [ $1 -eq 0 ]; then
/sbin/service xl2tpd stop > /dev/null 2>&1
/sbin/chkconfig --del xl2tpd
# 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
%postun
if [ $1 -ge 1 ]; then
/sbin/service xl2tpd condrestart 2>&1 >/dev/null
/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
%triggerun -- xl2td < 1.3.1-3
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply xl2tpd
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save xl2tpd >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del xl2tpd >/dev/null 2>&1 || :
/bin/systemctl try-restart xl2tpd.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root)
%doc BUGS CHANGES CREDITS LICENSE README.* TODO doc/rfc2661.txt
@ -89,11 +106,16 @@ fi
%dir %{_sysconfdir}/xl2tpd
%config(noreplace) %{_sysconfdir}/xl2tpd/*
%config(noreplace) %{_sysconfdir}/ppp/*
%attr(0755,root,root) %{_initrddir}/xl2tpd
%ghost %dir %{_localstatedir}/run/xl2tpd
%dir %{_localstatedir}/run/xl2tpd
%{_unitdir}/%{name}.service
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
%ghost %attr(0600,root,root) %{_localstatedir}/run/xl2tpd/l2tp-control
%changelog
* Tue Feb 28 2012 Paul Wouters <pwouters@redhat.com> - 1.3.1-3
- Converted to systemd
- Added -Wunused patch to fix two minor warnings
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

Loading…
Cancel
Save