public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/pingu/files/, net-misc/pingu/
@ 2018-10-30 10:30 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2018-10-30 10:30 UTC (permalink / raw
  To: gentoo-commits

commit:     f3042e074b7763c09bf274d366bbe31f0e55e417
Author:     Vladimir Pavljuchenkov (SpiderX) <spiderx <AT> spiderx <DOT> dp <DOT> ua>
AuthorDate: Sat Jan 20 17:05:13 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct 30 10:28:43 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3042e07

net-misc/pingu: new ebuild

Pingu is a daemon that takes care of policy routing and
fail-over in multi ISP setups.

Signed-off-by: Vladimir Pavljuchenkov <spiderx <AT> spiderx.dp.ua>
Package-Manager: Portage-2.3.49, Repoman-2.3.11
Closes: https://github.com/gentoo/gentoo/pull/10194
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 net-misc/pingu/Manifest                       |  1 +
 net-misc/pingu/files/pingu-1.5-makefile.patch | 21 ++++++++++
 net-misc/pingu/files/pingu.confd              |  5 +++
 net-misc/pingu/files/pingu.initd              | 13 ++++++
 net-misc/pingu/files/pingu.service            | 11 ++++++
 net-misc/pingu/files/pingu.tmpfile            |  1 +
 net-misc/pingu/metadata.xml                   | 19 +++++++++
 net-misc/pingu/pingu-1.5.ebuild               | 57 +++++++++++++++++++++++++++
 net-misc/pingu/pingu-9999.ebuild              | 50 +++++++++++++++++++++++
 9 files changed, 178 insertions(+)

diff --git a/net-misc/pingu/Manifest b/net-misc/pingu/Manifest
new file mode 100644
index 00000000000..dff3f8cd1f8
--- /dev/null
+++ b/net-misc/pingu/Manifest
@@ -0,0 +1 @@
+DIST pingu-1.5.tar.gz 31565 BLAKE2B 13d1fa075f32d5a32cece55c5292cda08f72e711a8567cc8b25ce0e2bb0325395f1346e9feb96eb266c93d10d04609d87562192f7b7d0c22730fd4a8561c6c1a SHA512 71e5fbe93f831f24d168957cdeaff2817a22f407575316d6515755bec760d10724821070549eaab562924237b96976a1a776ca903d5fe0cd9f9b69a38eadd8c9

diff --git a/net-misc/pingu/files/pingu-1.5-makefile.patch b/net-misc/pingu/files/pingu-1.5-makefile.patch
new file mode 100644
index 00000000000..a4c04aac31f
--- /dev/null
+++ b/net-misc/pingu/files/pingu-1.5-makefile.patch
@@ -0,0 +1,21 @@
+--- a/src/Makefile	2017-11-25 18:39:32.667570139 +0200
++++ b/src/Makefile	2017-11-25 18:41:29.285573031 +0200
+@@ -17,7 +17,7 @@
+ 
+ rundir ?= $(localstatedir)/run
+ 
+-pingustatedir = $(rundir)/pingu
++pingustatedir = /run/pingu
+ 
+ DESTDIR ?=
+ 
+@@ -93,8 +93,7 @@
+ 	$(MAKE) -C $@
+ 
+ install: $(TARGETS) $(INSTALL_LUA_TARGET)
+-	$(INSTALLDIR) $(DESTDIR)/$(bindir) $(DESTDIR)/$(sbindir) \
+-		$(DESTDIR)/$(pingustatedir)
++	$(INSTALLDIR) $(DESTDIR)/$(bindir) $(DESTDIR)/$(sbindir)
+ 	$(INSTALL) $(BIN_TARGETS) $(DESTDIR)/$(bindir)
+ 	$(INSTALL) $(SBIN_TARGETS) $(DESTDIR)/$(sbindir)
+ 	for dir in $(SUBDIRS); do \

diff --git a/net-misc/pingu/files/pingu.confd b/net-misc/pingu/files/pingu.confd
new file mode 100644
index 00000000000..ae4ae8603fd
--- /dev/null
+++ b/net-misc/pingu/files/pingu.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/pingu
+
+# Various options.
+# run `pingu -h` for valid cmdline options
+OPTS=""

diff --git a/net-misc/pingu/files/pingu.initd b/net-misc/pingu/files/pingu.initd
new file mode 100644
index 00000000000..c4de6a754c3
--- /dev/null
+++ b/net-misc/pingu/files/pingu.initd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/sbin/pingu
+command_args="-d ${OPTS}"
+description="Policy routing daemon"
+name="Policy routing daemon"
+pidfile=/run/pingu/pingu.pid
+
+depend() {
+	need net
+}

diff --git a/net-misc/pingu/files/pingu.service b/net-misc/pingu/files/pingu.service
new file mode 100644
index 00000000000..6677e9b8efd
--- /dev/null
+++ b/net-misc/pingu/files/pingu.service
@@ -0,0 +1,11 @@
+[Unit]
+Description="Policy routing daemon"
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/pingu -d
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-misc/pingu/files/pingu.tmpfile b/net-misc/pingu/files/pingu.tmpfile
new file mode 100644
index 00000000000..c48124d1e47
--- /dev/null
+++ b/net-misc/pingu/files/pingu.tmpfile
@@ -0,0 +1 @@
+d	/run/pingu	0755	root	root

diff --git a/net-misc/pingu/metadata.xml b/net-misc/pingu/metadata.xml
new file mode 100644
index 00000000000..4a306e8d361
--- /dev/null
+++ b/net-misc/pingu/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>spiderx@spiderx.dp.ua</email>
+		<name>Vladimir Pavljuchenkov</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<longdescription lang="en">
+	Pingu is a daemon that takes care of policy routing and
+	fail-over in multi ISP setups.
+	</longdescription>
+	<upstream>
+		<remote-id type="github">ncopa/pingu</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/net-misc/pingu/pingu-1.5.ebuild b/net-misc/pingu/pingu-1.5.ebuild
new file mode 100644
index 00000000000..1d074daa34e
--- /dev/null
+++ b/net-misc/pingu/pingu-1.5.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd tmpfiles toolchain-funcs
+
+DESCRIPTION="Policy routing daemon with failover and load-balancing"
+HOMEPAGE="https://github.com/ncopa/pingu"
+SRC_URI="https://github.com/ncopa/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc"
+
+RDEPEND="dev-libs/libev:="
+DEPEND="${RDEPEND}
+	sys-kernel/linux-headers
+	virtual/pkgconfig
+	doc? ( app-text/asciidoc )"
+
+# Fix QA with install into path /run/pingu must be created at runtime
+PATCHES=( "${FILESDIR}"/"${P}"-makefile.patch )
+
+src_prepare() {
+	default
+
+	# Fix compilation issue
+	sed -i '/icp->un.frag.__unused = 0;/d' src/icmp.c \
+		|| die "sed failed for src/icmp.c"
+}
+
+src_configure() {
+	./configure "$(use_enable debug)" "$(use_enable doc)" \
+		--prefix=/usr || die "configure failed"
+}
+
+src_compile() {
+	emake CC="$(tc-getCC)"
+}
+
+src_install() {
+	default
+
+	newtmpfiles "${FILESDIR}"/pingu.tmpfile pingu.conf
+	newinitd "${FILESDIR}"/pingu.initd pingu
+	newconfd "${FILESDIR}"/pingu.confd pingu
+	systemd_dounit "${FILESDIR}"/pingu.service
+	keepdir /var/lib/pingu
+	insinto /etc/pingu
+	newins pingu.conf pingu.conf.example
+}
+
+pkg_postinst() {
+	tmpfiles_process pingu.conf
+}

diff --git a/net-misc/pingu/pingu-9999.ebuild b/net-misc/pingu/pingu-9999.ebuild
new file mode 100644
index 00000000000..30ea3b2eab7
--- /dev/null
+++ b/net-misc/pingu/pingu-9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit git-r3 systemd tmpfiles toolchain-funcs
+
+DESCRIPTION="Policy routing daemon with failover and load-balancing"
+HOMEPAGE="https://github.com/ncopa/pingu"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/ncopa/${PN}.git"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug doc"
+
+RDEPEND="dev-libs/libev:="
+DEPEND="${RDEPEND}
+	sys-kernel/linux-headers
+	virtual/pkgconfig
+	doc? ( app-text/asciidoc )"
+
+# Fix QA with install into path /run/pingu must be created at runtime
+PATCHES=( "${FILESDIR}"/"${PN}"-1.5-makefile.patch )
+
+src_configure() {
+	./configure "$(use_enable debug)" "$(use_enable doc)" \
+		--prefix=/usr || die "configure failed"
+}
+
+src_compile() {
+	emake CC="$(tc-getCC)"
+}
+
+src_install() {
+	default
+
+	newtmpfiles "${FILESDIR}"/pingu.tmpfile pingu.conf
+	newinitd "${FILESDIR}"/pingu.initd pingu
+	newconfd "${FILESDIR}"/pingu.confd pingu
+	systemd_dounit "${FILESDIR}"/pingu.service
+	keepdir /var/lib/pingu
+	insinto /etc/pingu
+	newins pingu.conf pingu.conf.example
+}
+
+pkg_postinst() {
+	tmpfiles_process pingu.conf
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-30 10:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-30 10:30 [gentoo-commits] repo/gentoo:master commit in: net-misc/pingu/files/, net-misc/pingu/ Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox