/[gentoo-x86]/net-misc/gogoc/gogoc-1.2-r1.ebuild
Gentoo

Contents of /net-misc/gogoc/gogoc-1.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Thu May 23 20:39:53 2013 UTC (6 years, 6 months ago) by voyageur
Branch: MAIN
CVS Tags: HEAD
Changes since 1.13: +1 -1 lines
FILE REMOVED
Fix typo in postinst message, spotted by Chris Kerr <gingekerr@yahoo.co.uk> in bug #470116. Remove previous stable version

(Portage version: 2.2.0_alpha176/cvs/Linux x86_64, signed Manifest commit with key C74525F2)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/gogoc/gogoc-1.2-r1.ebuild,v 1.13 2012/07/12 08:45:15 voyageur Exp $
4
5 EAPI=2
6
7 inherit eutils versionator toolchain-funcs
8
9 MY_P=${PN}-$(replace_all_version_separators "_")
10 if [[ ${MY_P/_beta/} != ${MY_P} ]]; then
11 MY_P=${MY_P/_beta/-BETA}
12 else
13 MY_P=${MY_P}-RELEASE
14 fi
15
16 DESCRIPTION="Client to connect to a tunnel broker using the TSP protocol (freenet6 for example)"
17 HOMEPAGE="http://gogonet.gogo6.com/page/download-1"
18 SRC_URI="http://gogo6.com/downloads/${MY_P}.tar.gz"
19
20 # GPL-2 for Gentoo init script
21 LICENSE="MIT GPL-2"
22 SLOT="0"
23 KEYWORDS="amd64 hppa sparc x86"
24 IUSE="debug"
25
26 DEPEND="dev-libs/openssl"
27 RDEPEND="${DEPEND}
28 sys-apps/iproute2
29 <sys-apps/net-tools-1.60_p20120127084908"
30
31 S="${WORKDIR}/${MY_P}"
32
33 src_prepare() {
34 epatch "${FILESDIR}"/${P}-overflow.patch
35 epatch "${FILESDIR}"/${P}+gcc-4.6.patch
36
37 # Make the makefile handle linking correctly
38 find . -name Makefile -exec sed -i \
39 -e 's:LDFLAGS:LDLIBS:g' \
40 -e '/\$(LDLIBS)/s:-o:$(LDFLAGS) -o:' \
41 {} + || die "multised failed"
42
43 sed -i -e 's:/usr/local/etc/gogoc:/etc/gogoc:' \
44 gogoc-tsp/platform/*/tsp_local.c \
45 || die "sed failed"
46 }
47
48 src_configure() { :; }
49
50 src_compile() {
51 # parallel make fails as inter-directory dependecies are missing.
52 emake -j1 \
53 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
54 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getCXX)" \
55 EXTRA_CFLAGS="${CFLAGS}" EXTRA_CXXFLAGS="${CXXFLAGS}" \
56 $(use debug && echo DEBUG=1) \
57 all target=linux || die "Build Failed"
58
59 emake -C gogoc-tsp/conf \
60 PLATFORM=linux PLATFORM_DIR=../platform BIN_DIR=../bin \
61 gogoc.conf.sample || die
62 }
63
64 src_install() {
65 dodoc README || die
66
67 cd "${S}"/gogoc-tsp
68 dosbin bin/gogoc || die
69
70 dodoc bin/gogoc.conf.sample || die
71
72 exeinto /etc/gogoc/template
73 doexe template/linux.sh || die
74
75 newinitd "${FILESDIR}"/gogoc.rc gogoc || die
76
77 doman man/{man5/gogoc.conf.5,man8/gogoc.8} || die
78 keepdir /var/lib/gogoc || die
79
80 diropts -m0700
81 keepdir /etc/gogoc || die
82 }
83
84 pkg_postinst() {
85 elog "You should create an /etc/gogoc/gogoc.conf file starting from"
86 elog "the sample configuration in /usr/share/doc/${PF}/gogo.conf.sample.*"
87 elog ""
88 elog "To add support for a TSP IPv6 connection at startup,"
89 elog "remember to run:"
90 elog "# rc-update add gogoc default"
91 }

  ViewVC Help
Powered by ViewVC 1.1.20