mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
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@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@gentoo.org>
This commit is contained in:
committed by
Michał Górny
parent
9fcab634ff
commit
f3042e074b
1
net-misc/pingu/Manifest
Normal file
1
net-misc/pingu/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST pingu-1.5.tar.gz 31565 BLAKE2B 13d1fa075f32d5a32cece55c5292cda08f72e711a8567cc8b25ce0e2bb0325395f1346e9feb96eb266c93d10d04609d87562192f7b7d0c22730fd4a8561c6c1a SHA512 71e5fbe93f831f24d168957cdeaff2817a22f407575316d6515755bec760d10724821070549eaab562924237b96976a1a776ca903d5fe0cd9f9b69a38eadd8c9
|
||||
21
net-misc/pingu/files/pingu-1.5-makefile.patch
Normal file
21
net-misc/pingu/files/pingu-1.5-makefile.patch
Normal file
@@ -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 \
|
||||
5
net-misc/pingu/files/pingu.confd
Normal file
5
net-misc/pingu/files/pingu.confd
Normal file
@@ -0,0 +1,5 @@
|
||||
# Config file for /etc/init.d/pingu
|
||||
|
||||
# Various options.
|
||||
# run `pingu -h` for valid cmdline options
|
||||
OPTS=""
|
||||
13
net-misc/pingu/files/pingu.initd
Normal file
13
net-misc/pingu/files/pingu.initd
Normal file
@@ -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
|
||||
}
|
||||
11
net-misc/pingu/files/pingu.service
Normal file
11
net-misc/pingu/files/pingu.service
Normal file
@@ -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
|
||||
1
net-misc/pingu/files/pingu.tmpfile
Normal file
1
net-misc/pingu/files/pingu.tmpfile
Normal file
@@ -0,0 +1 @@
|
||||
d /run/pingu 0755 root root
|
||||
19
net-misc/pingu/metadata.xml
Normal file
19
net-misc/pingu/metadata.xml
Normal file
@@ -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>
|
||||
57
net-misc/pingu/pingu-1.5.ebuild
Normal file
57
net-misc/pingu/pingu-1.5.ebuild
Normal file
@@ -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
|
||||
}
|
||||
50
net-misc/pingu/pingu-9999.ebuild
Normal file
50
net-misc/pingu/pingu-9999.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user