summaryrefslogtreecommitdiff
blob: a1943d4c596d16606d6304ab01f66fb68bbf8654 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/miniupnpd/miniupnpd-1.3.ebuild,v 1.1 2009/04/24 23:43:24 gurligebis Exp $

EAPI="2"

inherit eutils linux-info

DESCRIPTION="MiniUPnP IGD Daemon"
SRC_URI="http://miniupnp.free.fr/files/${P}.tar.gz"
HOMEPAGE="http://miniupnp.free.fr/"
LICENSE="miniupnpd"

KEYWORDS="~x86"
SLOT="0"
IUSE=""

DEPEND=">=net-firewall/iptables-1.4.3
	sys-apps/lsb-release"
RDEPEND="${DEPEND}"

src_prepare() {
	mv Makefile.linux Makefile
	epatch "${FILESDIR}/${P}-iptables_path.diff"
	epatch "${FILESDIR}/${P}-Makefile_fix.diff"
	sed -i -e "s#^CFLAGS = #CFLAGS = -I${KV_OUT_DIR}/include #" Makefile
		# we don't use netfilter/Makefile
	gmake config.h
}

src_install () {
	PREFIX="${D}" einstall || die

	newinitd "${FILESDIR}/${P}-init.d" "${PN}"
	newconfd "${FILESDIR}/${P}-conf.d" "${PN}"
}

pkg_postinst() {
	elog "Please correct the external interface in the top of the two"
	elog "scripts in /etc/miniupnpd and edit the config file in there too"
}