]> git.pld-linux.org Git - packages/openl2tp.git/commitdiff
- new package
authorJacek Konieczny <jajcus@pld-linux.org>
Sat, 26 Nov 2011 12:00:35 +0000 (12:00 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    openl2tp-no_Werror.patch -> 1.1
    openl2tp.spec -> 1.1
    openl2tpd.init -> 1.1
    openl2tpd.sysconfig -> 1.1

openl2tp-no_Werror.patch [new file with mode: 0644]
openl2tp.spec [new file with mode: 0644]
openl2tpd.init [new file with mode: 0644]
openl2tpd.sysconfig [new file with mode: 0644]

diff --git a/openl2tp-no_Werror.patch b/openl2tp-no_Werror.patch
new file mode 100644 (file)
index 0000000..d275be5
--- /dev/null
@@ -0,0 +1,36 @@
+diff -dur openl2tp-1.8.orig/Makefile openl2tp-1.8/Makefile
+--- openl2tp-1.8.orig/Makefile 2010-11-22 10:47:26.000000000 +0100
++++ openl2tp-1.8/Makefile      2011-11-26 12:20:48.000000000 +0100
+@@ -154,7 +154,7 @@
+ CPPFLAGS=             $(CPPFLAGS.l2tptest) $(CPPFLAGS-y)
+ CFLAGS=                       -I. -Iusl -Icli -isystem include \
+-                              -MMD -Wall -Werror -Wno-strict-aliasing \
++                              -MMD -Wall -Wno-strict-aliasing \
+                               $(CPPFLAGS) $(CPPFLAGS.dmalloc) \
+                               -DSYS_LIBDIR=$(SYS_LIBDIR)
+ LDFLAGS.l2tpd=                -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc
+diff -dur openl2tp-1.8.orig/cli/Makefile openl2tp-1.8/cli/Makefile
+--- openl2tp-1.8.orig/cli/Makefile     2010-11-12 13:28:47.000000000 +0100
++++ openl2tp-1.8/cli/Makefile  2011-11-26 12:21:10.000000000 +0100
+@@ -7,7 +7,7 @@
+ LDFLAGS.cli_test=     -L.. -L. $(READLINE_LDFLAGS) -lcli -lusl -lreadline -lcurses -lc
+-CFLAGS=                       $(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS)
++CFLAGS=                       $(CFLAGS.optimize) -MMD -Wall -I.. $(READLINE_CFLAGS)
+ .PHONY:                       all test clean
+diff -dur openl2tp-1.8.orig/usl/Makefile openl2tp-1.8/usl/Makefile
+--- openl2tp-1.8.orig/usl/Makefile     2010-11-04 17:27:08.000000000 +0100
++++ openl2tp-1.8/usl/Makefile  2011-11-26 12:20:57.000000000 +0100
+@@ -14,7 +14,7 @@
+ endif
+ CPPFLAGS+=            $(CFLAGS.optimize) -g
+-CFLAGS=                       -I. -MMD -Wall -Werror -Wno-strict-aliasing $(CPPFLAGS) $(CPPFLAGS.dmalloc)
++CFLAGS=                       -I. -MMD -Wall -Wno-strict-aliasing $(CPPFLAGS) $(CPPFLAGS.dmalloc)
+ .PHONY:                       all test clean
diff --git a/openl2tp.spec b/openl2tp.spec
new file mode 100644 (file)
index 0000000..a0de4d2
--- /dev/null
@@ -0,0 +1,96 @@
+#
+Summary:       An L2TP client/server, designed for VPN use
+Name:          openl2tp
+Version:       1.8
+Release:       1
+License:       GPL
+Group:         Networking/Daemons
+Source0:       ftp://downloads.sourceforge.net/projects/openl2tp/%{name}-%{version}.tar.gz
+# Source0-md5: e3d08dedfb9e6a9a1e24f6766f6dadd0
+Source1:       %{name}d.init
+Source2:       %{name}d.sysconfig
+Patch0:                %{name}-no_Werror.patch
+URL:           http://www.openl2tp.org/
+BuildRequires: bison
+BuildRequires: flex
+BuildRequires: linux-libc-headers >= 2.6.23
+BuildRequires: readline-devel >= 4.2
+Requires:      portmap
+Requires:      ppp >= 2.4.5
+Requires:      readline >= 4.2
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+OpenL2TP is a complete implementation of RFC2661 - Layer Two Tunneling
+Protocol Version 2, able to operate as both a server and a client. It
+is ideal for use as an enterprise L2TP VPN server, supporting more
+than 100 simultaneous connected users. It may also be used as a client
+on a home PC or roadwarrior laptop.
+
+OpenL2TP has been designed and implemented specifically for Linux. It
+consists of
+
+- a daemon, openl2tpd, handling the L2TP control protocol exchanges
+  for all tunnels and sessions
+
+- a plugin for pppd to allow its PPP connections to run over L2TP
+  sessions
+
+- a Linux kernel driver for efficient datapath (integrated into the
+  standard kernel from 2.6.23).
+
+- a command line application, l2tpconfig, for management.
+
+%package devel
+Summary:       OpenL2TP support files for plugin development
+Group:         Development/Libraries
+
+%description devel
+This package contains support files for building plugins for OpenL2TP,
+or applications that use the OpenL2TP APIs.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__make} CFLAGS.optimize="%{rpmcflags}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
+
+%{__make} install DESTDIR=$RPM_BUILD_ROOT
+
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/openl2tpd
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/openl2tpd
+touch $RPM_BUILD_ROOT%{_sysconfdir}/openl2tpd.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README LICENSE
+%dir %{_libdir}/openl2tp
+%attr(755,root,root) %{_bindir}/l2tpconfig
+%attr(755,root,root) %{_sbindir}/openl2tpd
+%attr(755,root,root) %{_libdir}/openl2tp/ppp_null.so
+%attr(755,root,root) %{_libdir}/openl2tp/ppp_unix.so
+%attr(755,root,root) %{_libdir}/openl2tp/ipsec.so
+%attr(755,root,root) %{_libdir}/openl2tp/event_sock.so
+%{_mandir}/man1/l2tpconfig.1*
+%{_mandir}/man4/openl2tp_rpc.4*
+%{_mandir}/man5/openl2tpd.conf.5*
+%{_mandir}/man7/openl2tp.7*
+%{_mandir}/man8/openl2tpd.8*
+%attr(754,root,root) /etc/rc.d/init.d/openl2tpd
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/openl2tpd
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openl2tpd.conf
+
+%files devel
+%defattr(644,root,root,755)
+%doc plugins/README doc/README.event_sock
+%{_libdir}/openl2tp/l2tp_rpc.x
+%{_libdir}/openl2tp/l2tp_event.h
+%{_libdir}/openl2tp/event_sock.h
diff --git a/openl2tpd.init b/openl2tpd.init
new file mode 100644 (file)
index 0000000..65e2bbc
--- /dev/null
@@ -0,0 +1,137 @@
+#!/bin/sh
+#
+# openl2tpd          Start/Stop the OpenL2TP protocol daemon.
+#
+# chkconfig: 2345 57 76
+# description: OpenL2TP is a complete implementation of RFC2661 - Layer Two Tunneling
+#             Protocol Version 2, able to operate as both a server and a client.  It
+#              can be used to implement L2TP VPNs. As a server, it can handle
+#              hundreds of tunnels and sessions.
+# processname: openl2tpd
+# config: /etc/sysconfig/openl2tpd
+# pidfile: /var/run/openl2tpd.pid
+
+# Source function library.
+. /etc/init.d/functions
+
+OPENL2TPDARGS=""
+OPENL2TPD_CONFIG_FILE=""
+
+[ -f /etc/sysconfig/openl2tpd ] && . /etc/sysconfig/openl2tpd
+start() {
+       # Check if the service is already running?
+       if [ -f /var/lock/subsys/openl2tpd ]; then
+               msg_already_running "openl2tpd"
+               return
+       fi
+       
+       msg_starting "openl2tpd"
+       emit starting JOB=openl2tpd
+       
+       modprobe -s pppol2tp || modprobe -s l2tp_ppp
+       RETVAL=$?
+       if [ $RETVAL -eq 0 ]; then
+           daemon openl2tpd $OPENL2TPDARGS
+           RETVAL=$?
+       fi
+       if [ $RETVAL -eq 0 ]; then
+           touch /var/lock/subsys/openl2tpd
+           emit started JOB=openl2tpd
+           if [ -n "$OPENL2TPD_CONFIG_FILE" -a -f "$OPENL2TPD_CONFIG_FILE" ]; then
+               sleep 1
+               show "Restoring saved openl2tpd configuration..." ; busy
+               /usr/bin/l2tpconfig config restore file="$OPENL2TPD_CONFIG_FILE"
+               RETVAL=$?
+               if [ $RETVAL -eq 0 ] ; then
+                       ok
+               else
+                       fail
+               fi
+           fi
+       fi
+}
+
+stop() {
+       if [ ! -f /var/lock/subsys/openl2tpd ]; then
+               msg_not_running "openl2tpd"
+               return
+       fi
+       msg_stopping "openl2tpd"
+       killproc openl2tpd
+       emit --no-wait stopped JOB=openl2tpd
+       rm -f /var/run/openl2tpd.pid /var/lock/subsys/openl2tpd >/dev/null 2>&1
+       return 0
+}      
+
+condrestart() {
+       if [ ! -f /var/lock/subsys/openl2tpd ]; then
+               msg_not_running "openl2tpd"
+               RETVAL=$1
+               return
+       fi
+
+       stop
+       start
+}      
+
+restart() {
+       stop
+       start
+}      
+
+reload() {
+       if [ ! -f /var/lock/subsys/openl2tpd ]; then
+               msg_not_running "openl2tpd"
+               RETVAL=7
+               return
+       fi
+
+       if [ -n "$OPENL2TPD_CONFIG_FILE" -a -f "$OPENL2TPD_CONFIG_FILE" ]; then
+               msg_reloading "openl2tpd"
+               /usr/bin/l2tpconfig config restore file="$OPENL2TPD_CONFIG_FILE"
+               RETVAL=$?
+               if [ $RETVAL -eq 0 ] ; then
+                       ok
+               else
+                       fail
+               fi
+       else
+               stop
+               start
+       fi
+}      
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       restart
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  reload|force-reload)
+       reload
+       ;;
+  status)
+       status openl2tpd
+       RETVAL=$?
+       l2tpconfig system show status
+       ;;
+  condrestart)
+       condrestart
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
+
diff --git a/openl2tpd.sysconfig b/openl2tpd.sysconfig
new file mode 100644 (file)
index 0000000..d4eddec
--- /dev/null
@@ -0,0 +1,19 @@
+# Settings for the OpenL2TP daemon.
+
+# Set nice level for openl2tpd
+#SERVICE_RUN_NICE_LEVEL="+2"
+
+# OPENL2TPDARGS= :  any extra command-line startup arguments for crond
+#      -R              - allow remote management using RPC
+#      -d nnn          - set debug trace mask to nnn
+#       -L log-facility - set syslog facility (default LOG_DAEMON) 
+#
+# OPENL2TPD_CONFIG_FILE= : a file containing L2TP config that
+#                          is loaded when openl2tpd starts up.
+
+# Use ipsec.so plugin for IPSec setups.
+#OPENL2TPDARGS="-p ipsec.so"
+OPENL2TPDARGS=
+
+# Config file to load at openl2tpd startup
+OPENL2TPD_CONFIG_FILE=/etc/openl2tpd.conf
This page took 0.044642 seconds and 4 git commands to generate.