summaryrefslogtreecommitdiff
blob: 2887d7a02020d0dfa9c754fec1bfb737119ba360 (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
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit eutils linux-info systemd toolchain-funcs

DESCRIPTION="AICCU Client to configure an IPv6 tunnel to SixXS"
HOMEPAGE="https://www.sixxs.net/tools/aiccu"
SRC_URI="https://www.sixxs.net/archive/sixxs/aiccu/unix/aiccu_${PV//\./}.tar.gz"

LICENSE="SixXS"
SLOT="0"
KEYWORDS="amd64 arm hppa ppc sparc x86"
IUSE="systemd"

RDEPEND="
	net-libs/gnutls
	sys-apps/iproute2
	systemd? ( sys-apps/systemd )
"
DEPEND="${RDEPEND}
	virtual/pkgconfig
"

S=${WORKDIR}/${PN}

CONFIG_CHECK="~TUN"

src_prepare() {
	epatch \
		"${FILESDIR}"/${P}-r2-init.gentoo.patch \
		"${FILESDIR}"/${P}-Makefile.patch \
		"${FILESDIR}"/${P}-setupscript.patch \
		"${FILESDIR}"/${P}-uclibc.patch \
		"${FILESDIR}"/${P}-systemd.patch \
		"${FILESDIR}"/${P}-gnutls-3.4.patch
}

src_compile() {
	# Don't use main Makefile since it requires additional
	# dependencies which are useless for us.
	emake CC=$(tc-getCC) STRIP= -C unix-console \
		HAVE_SYSTEMD=$(usex systemd 1 0)
}

src_install() {
	dosbin unix-console/${PN}

	insopts -m 600
	insinto /etc
	doins doc/${PN}.conf
	newinitd doc/${PN}.init.gentoo ${PN}

	use systemd && systemd_dounit doc/${PN}.service

	dodoc doc/{HOWTO,README,changelog}
}