blob: 95ee72e03c46de9431b9185604df3dcf86b5e0f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edo 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"
BDEPEND="
virtual/pkgconfig
doc? ( app-text/asciidoc )
"
# Fix QA with install into path /run/pingu must be created at runtime
PATCHES=( "${FILESDIR}"/"${P}"-makefile.patch )
QA_CONFIG_IMPL_DECL_SKIP=( 'strlcpy' )
src_prepare() {
default
# Fix compilation issue
sed -e '/icp->un.frag.__unused = 0;/d' -i src/icmp.c || die
}
src_configure() {
local myconf=(
$(use_enable debug)
$(use_enable doc)
--prefix=/usr
)
edo ./configure "${myconf[@]}"
}
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
}
|