summaryrefslogtreecommitdiff
path: root/net-dialup/rp-l2tp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-dialup/rp-l2tp
reinit the tree, so we can have metadata
Diffstat (limited to 'net-dialup/rp-l2tp')
-rw-r--r--net-dialup/rp-l2tp/Manifest9
-rw-r--r--net-dialup/rp-l2tp/files/rp-l2tp-0.4-build.patch68
-rw-r--r--net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch54
-rw-r--r--net-dialup/rp-l2tp/files/rp-l2tp-0.4-gentoo.patch233
-rw-r--r--net-dialup/rp-l2tp/files/rp-l2tpd-init19
-rw-r--r--net-dialup/rp-l2tp/metadata.xml8
-rw-r--r--net-dialup/rp-l2tp/rp-l2tp-0.4-r4.ebuild35
7 files changed, 426 insertions, 0 deletions
diff --git a/net-dialup/rp-l2tp/Manifest b/net-dialup/rp-l2tp/Manifest
new file mode 100644
index 000000000000..5aeb4a712420
--- /dev/null
+++ b/net-dialup/rp-l2tp/Manifest
@@ -0,0 +1,9 @@
+AUX rp-l2tp-0.4-build.patch 1807 SHA256 5eef8c096e47906adda1ce5f64675fed960d8bc0dced4f579254210a04510f0c SHA512 e9f268c50ffccc4808d5c5d49727ec9d33d4179153481bb991bc94def1edb444fae3e5fd1b02f6b5815ab6d2343083bb62b888f16f72a82a9e35661182b08123 WHIRLPOOL 5d033eb42c00c0126c693bd4e6483a3e8c6ab1d27cdaf484fb91a7fe829f74629060d807ab8de806e785f4c1758374d932b5dc474e34b985b1b82eb51ef0cc41
+AUX rp-l2tp-0.4-flags.patch 1776 SHA256 66d8ba333c6f4aecfa102acb42397a2af6b3e41d2dc7d9b7a45dabe6b9c48c5f SHA512 f8c91791a381139a07941b25901aba1673c3c39df5d6e0f428c7b2a8785e3d11b10263ffd5d708cd45eb4752cb7261858521ac8556c1fdb8194959aa5239a825 WHIRLPOOL 508fe6a5c5fb41fafd557f739eaa30d3fc2ac547c0e797e53402f86055162ceb3e902863e9493b93c6219cdbba2f5da26f05d7f07118a9dab719553ca02f7bbb
+AUX rp-l2tp-0.4-gentoo.patch 9421 SHA256 1b0a96f9260212e5635714f0e348f8131723ef93fd93afbdaad0e46258f0daee SHA512 fdff7068aa6811391bc37497914f58e9239f78f84e5928e61799c523e8a1c859f036a55d7f2517ea316a55816e76ffa83f8ffce10fc188adb6ab79541d20a601 WHIRLPOOL 9fd5786807584b7fc83c28023fb6305a732d572e75ece8d793f47de20aac5a2fdc8a609ad459f265653d247d52be869818e58cb7f0462120fdb8d50fb640f95f
+AUX rp-l2tpd-init 370 SHA256 ce7902d8a5723437c61542ce4785cb39e6ba638c412b67a4e6575880c9c11660 SHA512 a0fcf486af04e5fd90903be8fca7d6235a791bc4a406bd4e09a85a3d29964aa20bb6aefa409d992701be9901aefb2fd52b9d7b57b24ea926b3031bf70a05a3f7 WHIRLPOOL 338cfa7c77c1be9d0cbaba9cf2e482000f6976e120f021054c3d37e02116c8017ff7be9903265da7704793d02b7721788395f2822349f780a5debd3615dc3093
+DIST rp-l2tp-0.4.tar.gz 198869 SHA256 1b5bfbd130867e55018a4e64c720c09d821688c81e6e687858948837e137d555 SHA512 43a1ce8728323ed25f8b92c981731b21db8714f8d157343deb1da49f2c7b25e1833de5012238098ad9d1add7daec228a48f2cb8d6d0b60afbcc1c385ae79d3c9 WHIRLPOOL 1f3ef1841629f6f5a2d1bd199b8a86af69ee39998e424a6259798bd510700206d6a8ab4fe4f00349e9c0f825e9f48788bccdc100f21330dd80a1f2685c4b7286
+EBUILD rp-l2tp-0.4-r4.ebuild 793 SHA256 72234c6f8209234b3169829bbd1787155b0bc679da1cccaa8bbf9718d20db989 SHA512 c7a9f169223bcd8b0a9e4e69a82e77ac72f618232bfe2bab086cdeec19cfdeaf257e0ab464a3df42bb02a372b61d5b354e5d9e3a33b7d5c4068feff4fc4228dc WHIRLPOOL 52ad020a0e6f6c2dd9f90959fdf5d9f953807bdc02a1c1d03439bde1fd063632bbfa3728e82b8e7d0c403a781af3153677947df9dd740e13ae30b06644e97529
+MISC ChangeLog 3104 SHA256 4035dc1e4cfdc1da7b484ef83fca6cdcf959c7331f12db51c1874c0d883286a7 SHA512 c45d90add8b8b81e41dc73e988f736f12bc2c14ce7ea21827b2cb494b3a4bf65d27e1b0fcdc46bb6d5d0935dae45a631a94e69ee2543e314eae06bc131c75661 WHIRLPOOL 046a15c0893dcfe5084eda89f8d396431753df4f176a01034354eb67b8bab2ef1a45bfce170a754fd5cde8a5c010e67e9e761b9429a4195e9363d61fded9f5cb
+MISC ChangeLog-2015 3330 SHA256 c239547e0d48140a891daec2d457f0e747759b3f1cefc083fc299ec1f886d4ef SHA512 d11b3c94873fe37b1ec9c23bcea1253978a524bb4170885f1971838f447352f67fa86b910a85f5b86cea9375fc72f211c3f0ca83e1a7240757b285e4ccb28ce5 WHIRLPOOL d1122f5d978f434dca7ba8da4183fff6f35c6e04e47910f2b36442bc25808805680fc7a27fdd23d475f42a0c7775909423928bcdfa351a1ce881b3c039852c69
+MISC metadata.xml 244 SHA256 adca951ace70c548b336298e0ce38f79d7baa334b4ebf7f7a1a8b01bacefc8e3 SHA512 c9b38861937a6e1f07e3461eba4a51b97c0d18deb5868b0aa2d2cfd9464549aa0dde6757e941ce0da7e5f860b8836cc747639aa4b16d9676275ecc38bf0a6332 WHIRLPOOL 406089fcd93a5e1c23322cde61f0fa9dd101668de1baea42030846c8f5fc26b6c4288bedceef46bed08ccd12bc860cd2fe11932be8af05c18f8e7a59db01d29d
diff --git a/net-dialup/rp-l2tp/files/rp-l2tp-0.4-build.patch b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-build.patch
new file mode 100644
index 000000000000..7bb534b67940
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-build.patch
@@ -0,0 +1,68 @@
+--- Makefile.in.orig 2014-06-24 15:20:47.028342728 +0400
++++ Makefile.in 2014-06-24 15:21:07.468320934 +0400
+@@ -39,8 +39,8 @@
+
+ libl2tp.a: $(OBJS)
+ rm -f $@
+- ar -rc $@ $^
+- ranlib $@ || true
++ $(AR) -rc $@ $^
++ @RANLIB@ $@ || true
+
+ l2tpd: libl2tp.a libevent/libevent.a
+ $(MAKE) -C handlers
+--- libevent/Makefile.in.orig 2002-09-30 23:45:00.000000000 +0400
++++ libevent/Makefile.in 2014-06-24 15:24:31.535105268 +0400
+@@ -18,20 +18,20 @@
+
+ libevent.a: $(OBJS)
+ rm -f libevent.a
+- ar -cq libevent.a $(OBJS)
++ $(AR) -cq libevent.a $(OBJS)
+ @RANLIB@ libevent.a
+
+ event.o: event.c $(HDRS)
+- gcc $(CFLAGS) -c -o event.o event.c
++ $(CC) $(CFLAGS) -c -o event.o event.c
+
+ hash.o: hash.c $(HDRS)
+- gcc $(CFLAGS) -c -o hash.o hash.c
++ $(CC) $(CFLAGS) -c -o hash.o hash.c
+
+ event_sig.o: event_sig.c $(HDRS)
+- gcc $(CFLAGS) -c -o event_sig.o event_sig.c
++ $(CC) $(CFLAGS) -c -o event_sig.o event_sig.c
+
+ event_tcp.o: event_tcp.c $(HDRS)
+- gcc $(CFLAGS) -c -o event_tcp.o event_tcp.c
++ $(CC) $(CFLAGS) -c -o event_tcp.o event_tcp.c
+
+ clean: FORCE
+ rm -f *.a *.o *~
+--- handlers/Makefile.in.orig 2014-06-24 15:31:35.186667624 +0400
++++ handlers/Makefile.in 2014-06-24 15:32:26.659615281 +0400
+@@ -20,19 +20,19 @@
+ all: $(HANDLERS) l2tp-control
+
+ l2tp-control: cmd-control.o
+- gcc $(LDFLAGS) -o l2tp-control cmd-control.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o l2tp-control cmd-control.o
+
+ cmd-control.o: cmd-control.c
+- gcc $(CFLAGS) -c -o $@ $^
++ $(CC) $(CFLAGS) -c -o $@ $^
+
+ %.o: %.c
+- gcc $(CFLAGS) -fPIC -c -o $@ $<
++ $(CC) $(CFLAGS) -fPIC -c -o $@ $<
+
+ sync-pppd.so: pty.o sync-pppd.o
+- gcc $(LDFLAGS) -shared -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^
+
+ cmd.so: cmd.o dstring.o
+- gcc $(LDFLAGS) -shared -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^
+
+ clean:
+ rm -f *.so *.o *~
diff --git a/net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch
new file mode 100644
index 000000000000..bf5d0cf82b3f
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-flags.patch
@@ -0,0 +1,54 @@
+diff -ru rp-l2tp-0.4.orig/handlers/Makefile.in rp-l2tp-0.4/handlers/Makefile.in
+--- rp-l2tp-0.4.orig/handlers/Makefile.in 2008-10-18 08:35:39.000000000 +0000
++++ rp-l2tp-0.4/handlers/Makefile.in 2008-10-18 08:47:02.000000000 +0000
+@@ -15,24 +15,24 @@
+
+ OBJS=pty.o sync-pppd.o dstring.o
+ SRCS=$(OBJS:.o=.c)
+-CFLAGS=-g -O2 -I.. -I../libevent -I../../libevent -Wall
++CFLAGS=@CFLAGS@ -I.. -I../libevent -I../../libevent -Wall
+
+ all: $(HANDLERS) l2tp-control
+
+ l2tp-control: cmd-control.o
+- gcc -o l2tp-control cmd-control.o
++ gcc $(LDFLAGS) -o l2tp-control cmd-control.o
+
+ cmd-control.o: cmd-control.c
+- gcc -c -o $@ $^
++ gcc $(CFLAGS) -c -o $@ $^
+
+ %.o: %.c
+ gcc $(CFLAGS) -fPIC -c -o $@ $<
+
+ sync-pppd.so: pty.o sync-pppd.o
+- gcc -shared -o $@ $^
++ gcc $(LDFLAGS) -shared -o $@ $^
+
+ cmd.so: cmd.o dstring.o
+- gcc -shared -o $@ $^
++ gcc $(LDFLAGS) -shared -o $@ $^
+
+ clean:
+ rm -f *.so *.o *~
+diff -ru rp-l2tp-0.4.orig/Makefile.in rp-l2tp-0.4/Makefile.in
+--- rp-l2tp-0.4.orig/Makefile.in 2008-10-18 08:35:39.000000000 +0000
++++ rp-l2tp-0.4/Makefile.in 2008-10-18 08:40:38.000000000 +0000
+@@ -31,7 +31,7 @@
+ EXTRA_LIBS=@LIBEVENT@/*.o -ldl
+
+ SRCS=$(OBJS:.o=.c)
+-CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DLIBDIR=\"$(libdir)\"
++CFLAGS=@CFLAGS@ -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DLIBDIR=\"$(libdir)\"
+
+ TARGETS=l2tpd libl2tp.a handlers
+
+@@ -44,7 +44,7 @@
+
+ l2tpd: libl2tp.a libevent/libevent.a
+ $(MAKE) -C handlers
+- @CC@ -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS)
++ @CC@ $(LDFLAGS) -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS)
+
+ libevent/libevent.a:
+ test -d libevent || ln -s ../libevent .
diff --git a/net-dialup/rp-l2tp/files/rp-l2tp-0.4-gentoo.patch b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-gentoo.patch
new file mode 100644
index 000000000000..1138b37b20e2
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tp-0.4-gentoo.patch
@@ -0,0 +1,233 @@
+diff -Nru rp-l2tp-0.4.orig/handlers/cmd.c rp-l2tp-0.4/handlers/cmd.c
+--- rp-l2tp-0.4.orig/handlers/cmd.c 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/handlers/cmd.c 2007-04-15 13:29:18.000000000 +0300
+@@ -162,7 +162,7 @@
+
+ /* We have hit the end of our options. Open command socket */
+ if (!sockname) {
+- sockname = "/var/run/l2tpctrl";
++ sockname = "/var/run/rp-l2tpdctrl";
+ }
+
+ (void) remove(sockname);
+diff -Nru rp-l2tp-0.4.orig/handlers/cmd-control.c rp-l2tp-0.4/handlers/cmd-control.c
+--- rp-l2tp-0.4.orig/handlers/cmd-control.c 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/handlers/cmd-control.c 2007-04-15 13:29:18.000000000 +0300
+@@ -52,7 +52,7 @@
+
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_LOCAL;
+- strncpy(addr.sun_path, "/var/run/l2tpctrl", sizeof(addr.sun_path) - 1);
++ strncpy(addr.sun_path, "/var/run/rp-l2tpdctrl", sizeof(addr.sun_path) - 1);
+
+ fd = socket(AF_LOCAL, SOCK_STREAM, 0);
+ if (fd < 0) {
+diff -Nru rp-l2tp-0.4.orig/handlers/Makefile.in rp-l2tp-0.4/handlers/Makefile.in
+--- rp-l2tp-0.4.orig/handlers/Makefile.in 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/handlers/Makefile.in 2007-04-15 13:33:41.000000000 +0300
+@@ -9,6 +9,7 @@
+ install=@INSTALL@
+ install_dir=@INSTALL@ -d
+ sbindir=@sbindir@
++libdir=@libdir@
+
+ HANDLERS=sync-pppd.so cmd.so
+
+@@ -39,7 +40,7 @@
+
+ install: all
+ -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir)
+- -mkdir -p $(RPM_INSTALL_ROOT)$(prefix)/lib/l2tp/plugins
+- $(install) -m 755 -s l2tp-control $(RPM_INSTALL_ROOT)$(sbindir)
+- $(install) -m 755 $(HANDLERS) $(RPM_INSTALL_ROOT)$(prefix)/lib/l2tp/plugins
++ -mkdir -p $(RPM_INSTALL_ROOT)$(libdir)/rp-l2tpd/plugins
++ $(install) -m 755 l2tp-control $(RPM_INSTALL_ROOT)$(sbindir)/rp-l2tpd-control
++ $(install) -m 755 $(HANDLERS) $(RPM_INSTALL_ROOT)$(libdir)/rp-l2tpd/plugins
+ distclean: clean
+diff -Nru rp-l2tp-0.4.orig/main.c rp-l2tp-0.4/main.c
+--- rp-l2tp-0.4.orig/main.c 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/main.c 2007-04-15 13:29:18.000000000 +0300
+@@ -27,7 +27,7 @@
+ static void
+ usage(int argc, char *argv[], int exitcode)
+ {
+- fprintf(stderr, "\nl2tpd Version %s Copyright 2002 Roaring Penguin Software Inc.\n", VERSION);
++ fprintf(stderr, "\nrp-l2tpd Version %s Copyright 2002 Roaring Penguin Software Inc.\n", VERSION);
+ fprintf(stderr, "http://www.roaringpenguin.com/\n\n");
+ fprintf(stderr, "Usage: %s [options]\n", argv[0]);
+ fprintf(stderr, "Options:\n");
+@@ -68,7 +68,7 @@
+ l2tp_peer_init();
+ l2tp_debug_set_bitmask(debugmask);
+
+- if (l2tp_parse_config_file(es, "/etc/l2tp/l2tp.conf") < 0) {
++ if (l2tp_parse_config_file(es, "/etc/rp-l2tp/rp-l2tpd.conf") < 0) {
+ l2tp_die();
+ }
+
+diff -Nru rp-l2tp-0.4.orig/Makefile.in rp-l2tp-0.4/Makefile.in
+--- rp-l2tp-0.4.orig/Makefile.in 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/Makefile.in 2007-04-15 13:39:09.000000000 +0300
+@@ -25,12 +25,13 @@
+ install=@INSTALL@
+ install_dir=@INSTALL@ -d
+ sbindir=@sbindir@
++libdir=@libdir@
+
+ OBJS=auth.o debug.o dgram.o main.o md5.o network.o options.o peer.o session.o tunnel.o utils.o
+ EXTRA_LIBS=@LIBEVENT@/*.o -ldl
+
+ SRCS=$(OBJS:.o=.c)
+-CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\"
++CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DLIBDIR=\"$(libdir)\"
+
+ TARGETS=l2tpd libl2tp.a handlers
+
+@@ -81,13 +82,13 @@
+
+ install: all
+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
+- $(install) -m 755 -s l2tpd $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
+- -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp
+- $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp/l2tp.conf.example
++ $(install) -m 755 l2tpd $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)/rp-l2tpd
++ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rp-l2tp
++ $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rp-l2tp/rp-l2tpd.conf.example
+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
+ -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5
+- $(install) -m 644 man/l2tpd.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
+- $(install) -m 644 man/l2tp.conf.5 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5
++ $(install) -m 644 man/l2tpd.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8/rp-l2tpd.8
++ $(install) -m 644 man/l2tp.conf.5 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5/rp-l2tpd.conf.5
+
+ $(MAKE) -C handlers install
+
+diff -Nru rp-l2tp-0.4.orig/man/l2tp.conf.5 rp-l2tp-0.4/man/l2tp.conf.5
+--- rp-l2tp-0.4.orig/man/l2tp.conf.5 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/man/l2tp.conf.5 2007-04-15 13:29:18.000000000 +0300
+@@ -1,13 +1,13 @@
+ .\" $Id$
+ .\" LIC: GPL
+-.TH L2TP.CONF 5 "11 March 2002"
++.TH RP-L2TPD.CONF 5 "11 March 2002"
+ .\""
+ .UC 4
+ .SH NAME
+-l2tp.conf \- L2TP configuration file
++rp-l2tpd.conf \- L2TP configuration file
+ .SH DESCRIPTION
+-The \fBl2tp.conf\fP file contains the configuration for
+-the L2TP daemon \fBl2tpd\fP(8).
++The \fBrp-l2tpd.conf\fP file contains the configuration for
++the L2TP daemon \fBrp-l2tpd\fP(8).
+ Each line in the file takes one of the following forms:
+ .\"
+ .IP "# \fIcomment\fR"
+@@ -155,9 +155,9 @@
+ in the global section. The only option available is:
+ .IP "\fBsocket-path\fP \fIpathname\fR"
+ Specifies the path name of the UNIX-domain socket for controlling the
+-daemon. Defaults to \fI/var/run/l2tpctrl\fR.
++daemon. Defaults to \fI/var/run/rp-l2tpdctrl\fR.
+ .PP
+ Even if you do not supply any options to cmd, you \fImust\fR have
+ a \fBsection cmd\fR line to activate the handler.
+ .SH AUTHORS
+-\fBl2tpd\fR was written by David F. Skoll <dfs@roaringpenguin.com>.
++\fBrp-l2tpd\fR was written by David F. Skoll <dfs@roaringpenguin.com>.
+diff -Nru rp-l2tp-0.4.orig/man/l2tpd.8 rp-l2tp-0.4/man/l2tpd.8
+--- rp-l2tp-0.4.orig/man/l2tpd.8 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/man/l2tpd.8 2007-04-15 13:29:18.000000000 +0300
+@@ -1,14 +1,14 @@
+ .\" $Id$
+ .\" LIC: GPL
+-.TH L2TPD 8 "11 March 2002"
++.TH RP-L2TPD 8 "11 March 2002"
+ .UC 4
+ .SH NAME
+-l2tpd \- user-space L2TP daemon.
++rp-l2tpd \- user-space L2TP daemon.
+ .SH SYNOPSIS
+-.B l2tpd \fR[\fIoptions\fR]
++.B rp-l2tpd \fR[\fIoptions\fR]
+
+ .SH DESCRIPTION
+-\fBl2tpd\fR is a user-space L2TP daemon. L2TP is the Layer Two
++\fBrp-l2tpd\fR is a user-space L2TP daemon. L2TP is the Layer Two
+ Tunneling Protocol described in RFC 2661. It allows you to tunnel
+ PPP sessions over a network or transport protocol (in this case, UDP.)
+
+@@ -16,50 +16,50 @@
+ .TP
+ .B \-d \fInum\fR
+ Sets the debug level to \fInum\fR. Of interest mostly to
+-\fBl2tpd\fR developers. \fInum\fR is a bitmask; set it to
++\fBrp-l2tpd\fR developers. \fInum\fR is a bitmask; set it to
+ 65535 for maximum debugging information.
+
+ .TP
+ .B \-f
+-Do not fork. Normally, \fBl2tpd\fR forks and puts itself in the
++Do not fork. Normally, \fBrp-l2tpd\fR forks and puts itself in the
+ background. This option causes it to stay running in the foreground.
+
+ .SH L2TPD ARCHITECTURE
+
+-The \fBl2tpd\fR program itself contains \fIonly\fR code necessary
++The \fBrp-l2tpd\fR program itself contains \fIonly\fR code necessary
+ for processing L2TP datagrams and maintaining L2TP tunnels and
+ sessions. It does \fInot\fR contain code for interacting with
+ \fBpppd\fR or for users to control session establishment and teardown.
+ These functions are performed by \fIhandlers\fR, which are
+ shared-object libraries dynamically loaded at run-time.
+ .PP
+-The handlers currently distributed with \fBl2tpd\fR include:
++The handlers currently distributed with \fBrp-l2tpd\fR include:
+ .TP
+ .B sync-pppd.so
+-A shared-library which interfaces with \fBpppd\fR and allows \fBl2tpd\fR
++A shared-library which interfaces with \fBpppd\fR and allows \fBrp-l2tpd\fR
+ to act as both an LAC and an LNS.
+ .TP
+ .B cmd.so
+ A simple command-interpreter which listens on a UNIX-domain socket
+ and allows you to start and stop L2TP sessions.
+ .PP
+-\fBl2tpd\fR is a single-threaded, event-driven program. It should be
++\fBrp-l2tpd\fR is a single-threaded, event-driven program. It should be
+ fairly lightweight and efficient.
+
+ .SH L2TPD CONFIGURATION
+-On startup, \fBl2tpd\fR reads the configuration file \fB/etc/l2tp/l2tp.conf\fR.
++On startup, \fBrp-l2tpd\fR reads the configuration file \fB/etc/rp-l2tp/rp-l2tpd.conf\fR.
+ This configuration file sets operating parameters, describes peers and loads
+-and configures handlers. See \fBl2tp.conf\fR(5) for configuration
++and configures handlers. See \fBrp-l2tp.conf\fR(5) for configuration
+ file details.
+
+ .SH FILES
+ .TP
+-.B /etc/l2tp/l2tp.conf
++.B /etc/rp-l2tp/rp-l2tp.conf
+ Main configuration file.
+ .TP
+-.B /var/run/l2tpctrl
++.B /var/run/rp-l2tpdctrl
+ Control socket for \fBcmd.so\fR handler.
+
+ .SH AUTHORS
+-\fBl2tpd\fR was written by David F. Skoll <dfs@roaringpenguin.com>.
++\fBrp-l2tpd\fR was written by David F. Skoll <dfs@roaringpenguin.com>.
+
+diff -Nru rp-l2tp-0.4.orig/utils.c rp-l2tp-0.4/utils.c
+--- rp-l2tp-0.4.orig/utils.c 2007-04-15 13:30:55.000000000 +0300
++++ rp-l2tp-0.4/utils.c 2007-04-15 13:34:20.000000000 +0300
+@@ -196,7 +196,7 @@
+ if (*fname == '/') {
+ handle = dlopen(fname, RTLD_NOW);
+ } else {
+- snprintf(buf, sizeof(buf), "%s/lib/l2tp/plugins/%s", PREFIX, fname);
++ snprintf(buf, sizeof(buf), "%s/rp-l2tpd/plugins/%s", LIBDIR, fname);
+ buf[sizeof(buf)-1] = 0;
+ handle = dlopen(buf, RTLD_NOW);
+ }
diff --git a/net-dialup/rp-l2tp/files/rp-l2tpd-init b/net-dialup/rp-l2tp/files/rp-l2tpd-init
new file mode 100644
index 000000000000..7af7cf6f6567
--- /dev/null
+++ b/net-dialup/rp-l2tp/files/rp-l2tpd-init
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting rp-l2tpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/rp-l2tpd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rp-l2tpd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rp-l2tpd
+ eend $?
+}
diff --git a/net-dialup/rp-l2tp/metadata.xml b/net-dialup/rp-l2tp/metadata.xml
new file mode 100644
index 000000000000..9e7736c5340f
--- /dev/null
+++ b/net-dialup/rp-l2tp/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="sourceforge">rp-l2tp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-dialup/rp-l2tp/rp-l2tp-0.4-r4.ebuild b/net-dialup/rp-l2tp/rp-l2tp-0.4-r4.ebuild
new file mode 100644
index 000000000000..cfe036f1c588
--- /dev/null
+++ b/net-dialup/rp-l2tp/rp-l2tp-0.4-r4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="User-space implementation of L2TP for Linux and other UNIX systems"
+HOMEPAGE="https://sourceforge.net/projects/rp-l2tp/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc x86"
+SLOT="0"
+
+src_prepare() {
+ tc-export AR CC RANLIB
+ epatch \
+ "${FILESDIR}/${P}-gentoo.patch" \
+ "${FILESDIR}/${P}-flags.patch" \
+ "${FILESDIR}/${P}-build.patch"
+ epatch_user
+}
+
+src_install() {
+ emake RPM_INSTALL_ROOT="${D}" install
+
+ dodoc README
+ newdoc l2tp.conf rp-l2tpd.conf
+ docinto libevent
+ dodoc libevent/Doc/*
+ docompress -x "/usr/share/doc/${PF}/libevent"
+
+ newinitd "${FILESDIR}/rp-l2tpd-init" rp-l2tpd
+}