/[gentoo-x86]/net-misc/badvpn/badvpn-1.999.126.ebuild
Gentoo

Contents of /net-misc/badvpn/badvpn-1.999.126.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Dec 26 02:22:00 2012 UTC (2 years, 3 months ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
version bump by Ambroz Bizjak wrt #448226

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

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/badvpn/badvpn-1.999.123-r3.ebuild,v 1.4 2012/12/11 16:56:32 axs Exp $
4
5 EAPI=5
6 inherit eutils cmake-utils user toolchain-funcs
7
8 MY_P=${PN}-${PV/_rc/rc}
9 DESCRIPTION="Peer-to-peer VPN, NCD scripting language, tun2socks proxifier"
10 HOMEPAGE="http://code.google.com/p/badvpn/"
11 SRC_URI="http://badvpn.googlecode.com/files/${MY_P}.tar.bz2"
12
13 LICENSE="BSD"
14 KEYWORDS="~amd64 ~arm ~x86"
15 SLOT="0"
16 TARGETS="+client +ncd +server +tun2socks +udpgw"
17 IUSE="${TARGETS} debug"
18 # tests are only ncd related
19 RESTRICT="!ncd? ( test )"
20
21 COMMON_DEPEND="
22 client? (
23 dev-libs/nspr
24 dev-libs/nss
25 dev-libs/openssl
26 )
27 server? (
28 dev-libs/nspr
29 dev-libs/nss
30 dev-libs/openssl
31 )
32 ncd? (
33 dev-libs/openssl
34 )"
35 RDEPEND="${COMMON_DEPEND}
36 ncd? (
37 sys-apps/iproute2
38 >=virtual/udev-171
39 )"
40 DEPEND="${COMMON_DEPEND}
41 virtual/pkgconfig"
42 # we need at least one target
43 REQUIRED_USE="|| ( ${TARGETS//+/} )"
44
45 S=${WORKDIR}/${MY_P}
46
47 pkg_setup() {
48 enewuser ${PN}
49 }
50
51 src_prepare() {
52 # allow user to easily apply patches
53 epatch_user
54 }
55
56 src_configure() {
57 local mycmakeargs=(
58 -DBUILD_NOTHING_BY_DEFAULT=1
59 $(cmake-utils_use_build client CLIENT)
60 $(cmake-utils_use_build server SERVER)
61 $(cmake-utils_use_build ncd NCD)
62 $(cmake-utils_use_build tun2socks TUN2SOCKS)
63 $(cmake-utils_use_build udpgw UDPGW)
64 )
65
66 cmake-utils_src_configure
67 }
68
69 src_test() {
70 # OOHMSA: do this on portage level?
71 tc-is-cross-compiler && die "these tests do not work when cross compiling!"
72
73 einfo "Running NCD tests"
74 cd "${S}"/ncd/tests || die
75 bash ./run_tests "${CMAKE_BUILD_DIR}/ncd/badvpn-ncd" \
76 || die "one or more tests failed"
77 }
78
79 src_install() {
80 cmake-utils_src_install
81 dodoc ChangeLog
82
83 if use server; then
84 newinitd "${FILESDIR}"/${PN}-server.init ${PN}-server
85 newconfd "${FILESDIR}"/${PN}-server.conf ${PN}-server
86 fi
87
88 if use ncd; then
89 newinitd "${FILESDIR}"/${PN}-ncd.init ${PN}-ncd
90 newconfd "${FILESDIR}"/${PN}-ncd.conf ${PN}-ncd
91 fi
92 }

  ViewVC Help
Powered by ViewVC 1.1.20