/[gentoo-x86]/sys-apps/net-tools/net-tools-9999.ebuild
Gentoo

Contents of /sys-apps/net-tools/net-tools-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon May 13 16:29:38 2013 UTC (7 days, 2 hours ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +11 -11 lines
Version bump w/cleaned up selinux support #469224 by Sven Vermeulen.

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

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/net-tools/net-tools-9999.ebuild,v 1.3 2012/07/23 01:12:43 vapier Exp $
4
5 EAPI="3"
6
7 inherit flag-o-matic toolchain-funcs eutils
8
9 if [[ ${PV} == "9999" ]] ; then
10 EGIT_REPO_URI="git://net-tools.git.sourceforge.net/gitroot/net-tools/net-tools"
11 inherit git-2
12 KEYWORDS=""
13 else
14 PATCH_VER="1"
15 SRC_URI="mirror://gentoo/${P}.tar.xz
16 mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz"
17 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
18 fi
19
20 DESCRIPTION="Standard Linux networking tools"
21 HOMEPAGE="http://net-tools.sourceforge.net/"
22
23 LICENSE="GPL-2"
24 SLOT="0"
25 IUSE="nls old-output selinux static"
26
27 RDEPEND="!<sys-apps/openrc-0.9.9.3
28 selinux? ( sys-libs/libselinux )"
29 DEPEND="${RDEPEND}
30 selinux? ( virtual/pkgconfig )
31 app-arch/xz-utils"
32
33 maint_pkg_create() {
34 cd /usr/local/src/net-tools
35 #git-update
36 local stamp=$(date --date="$(git log -n1 --pretty=format:%ci master)" -u +%Y%m%d%H%M%S)
37 local pv="${PV/_p*}_p${stamp}"; pv=${pv/9999/1.60}
38 local p="${PN}-${pv}"
39 git archive --prefix="${p}/" master | tar xf - -C "${T}"
40 pushd "${T}" >/dev/null
41 sed -i "/^RELEASE/s:=.*:=${pv}:" */Makefile || die
42 tar cf - ${p}/ | xz > ${p}.tar.xz
43 popd >/dev/null
44
45 local patches="${p}-patches-${PATCH_VER:-1}"
46 local d="${T}/${patches}"
47 mkdir "${d}"
48 git format-patch -o "${d}" master..gentoo > /dev/null
49 echo "From http://git.overlays.gentoo.org/gitweb/?p=proj/net-tools.git" > "${d}"/README
50 tar cf - -C "${T}" ${d##*/} | xz > "${T}"/${patches}.tar.xz
51 rm -rf "${d}"
52
53 du -b "${T}"/*.tar.xz
54 }
55
56 pkg_setup() { [[ -n ${VAPIER_LOVES_YOU} ]] && maint_pkg_create ; }
57
58 set_opt() {
59 local opt=$1 ans
60 shift
61 ans=$("$@" && echo y || echo n)
62 einfo "Setting option ${opt} to ${ans}"
63 sed -i \
64 -e "/^bool.* ${opt} /s:[yn]$:${ans}:" \
65 config.in || die
66 }
67
68 src_prepare() {
69 if [[ -n ${PATCH_VER} ]] ; then
70 use old-output || EPATCH_EXCLUDE="0001-revert-621a2f376334f8097604b9fee5783e0f1141e66d-for-.patch"
71 EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch "${WORKDIR}"/${P}-patches-${PATCH_VER}
72 fi
73 }
74
75 src_configure() {
76 set_opt I18N use nls
77 set_opt HAVE_HWIB has_version '>=sys-kernel/linux-headers-2.6'
78 set_opt HAVE_HWTR has_version '<sys-kernel/linux-headers-3.5'
79 set_opt HAVE_HWSTRIP has_version '<sys-kernel/linux-headers-3.6'
80 set_opt SELINUX use selinux
81 if use static ; then
82 append-flags -static
83 append-ldflags -static
84 fi
85 tc-export AR CC
86 yes "" | ./configure.sh config.in || die
87 }
88
89 src_install() {
90 emake DESTDIR="${ED}" install || die
91 dodoc README README.ipv6 TODO
92 }
93
94 pkg_postinst() {
95 einfo "etherwake and such have been split into net-misc/ethercard-diag"
96 }

  ViewVC Help
Powered by ViewVC 1.1.13