blob: 931284652421907e07d977d53d9c5a3c19b9a0f2 (
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
65
66
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/portfwd/portfwd-0.26_rc6.ebuild,v 1.8 2005/05/06 14:58:54 swegener Exp $
DESCRIPTION="Port Forwarding Daemon"
SRC_URI="mirror://sourceforge/${PN}/${P/_/}.tar.gz"
HOMEPAGE="http://portfwd.sourceforge.net"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ia64 ~amd64"
IUSE=""
DEPEND=">=sys-apps/sed-4"
RDEPEND="${DEPEND}"
src_unpack() {
unpack ${A}
cd ${WORKDIR}/${P/_/}
cd src
sed -iorig \
-e "s:^CFLAGS =.*:CFLAGS = @CFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
-e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
Makefile.am
cd ../tools
sed -iorig \
-e "s:^CXXFLAGS =.*:CPPFLAGS = @CXXFLAGS@ -Wall -DPORTFWD_CONF=\\\\\"\$(sysconfdir)/portfwd.cfg\\\\\":" \
Makefile.am
cd ../getopt
sed -iorig -e "s:$.CC.:\$(CC) @CFLAGS@:g" Makefile.am
cd ../doc
sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am
cd ..
sed -iorig -e "s:/doc/portfwd:/share/doc/$P:" Makefile.am
}
src_compile() {
cd ${WORKDIR}/${P/_/}
./bootstrap
econf || die "econf failed"
emake
}
src_install() {
cd ${WORKDIR}/${P/_/}
einstall
prepalldocs
dodoc cfg/*
insinto /etc/init.d
insopts -m0755
newins ${FILESDIR}/${PN}.init ${PN}
insinto /etc/conf.d
insopts -m0644
newins ${FILESDIR}/${PN}.confd ${PN}
}
pkg_postinst() {
einfo "Many configuration file (/etc/portfwd.cfg) samples are available in /usr/share/doc/${P}"
einfo
}
|