Added net-wireless/wireless-tools-30_pre9.
[underlay.git] / net-wireless / wireless-tools / wireless-tools-30_pre9.ebuild
blobf3eb83ad3cc4f3a052884badccc072add8ad97b9
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-wireless/wireless-tools/wireless-tools-30_pre8.ebuild,v 1.1 2009/10/20 09:03:50 bangert Exp $
5 EAPI="2"
7 inherit toolchain-funcs multilib eutils
9 # The following works with both pre-releases and releases
10 MY_P=${PN/-/_}.${PV/_/.}
11 S="${WORKDIR}/${MY_P/\.pre*/}"
13 DESCRIPTION="A collection of tools to configure IEEE 802.11 wireless LAN cards"
14 HOMEPAGE="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"
15 SRC_URI="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/${MY_P}.tar.gz"
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
20 IUSE="linguas_cs linguas_fr multicall"
22 DEPEND="sys-apps/sed"
23 RDEPEND=""
25 src_prepare() {
26 epatch "${FILESDIR}"/${PN}-29-asneeded.patch
28 sed -i \
29 -e "s:^\(CC\) = gcc:\1 = $(tc-getCC):" \
30 -e "s:^\(AR\) = ar:\1 = $(tc-getAR):" \
31 -e "s:^\(RANLIB\) = ranlib:\1 = $(tc-getRANLIB):" \
32 -e "s:^\(CFLAGS=-Os\):#\1:" \
33 -e "s:\(@\$(LDCONFIG).*\):#\1:" \
34 -e "s:^\(INSTALL_MAN= \$(PREFIX)\)/man:\1/usr/share/man:" \
35 -e "s:^\(INSTALL_LIB= \$(PREFIX)\)/lib:\1/$(get_libdir)/:" \
36 -e "s:^\(INSTALL_INC= \$(PREFIX)\)/include:\1/usr/include:" \
37 -e "s:^\(BUILD_STATIC = y\):#\1:" \
38 -e '/\$(CC)/s:-Wl,-s\>::' \
39 "${S}"/Makefile || die
42 src_compile() {
43 emake || die "emake failed"
45 if use multicall; then
46 emake iwmulticall || die "emake iwmulticall failed"
50 src_install() {
51 emake PREFIX="${D}" install || die "emake install failed"
53 if use multicall; then
54 # 'make install-iwmulticall' will overwrite some of the tools
55 # with symlinks - this is intentional (brix)
56 emake PREFIX="${D}" install-iwmulticall || die "emake install-iwmulticall failed"
59 has cs ${LINGUAS} || rm -rf "${D}"/usr/share/man/cs
60 has fr ${LINGUAS} || rm -rf "${D}"/usr/share/man/fr.{ISO8859-1,UTF-8}
62 dodoc CHANGELOG.h HOTPLUG-UDEV.txt IFRENAME-VS-XXX.txt PCMCIA.txt README
63 has fr ${LINGUAS} && dodoc README.fr