You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-wireless/lorcon/lorcon-2020.06.06.ebuild

71 lines
1.4 KiB

# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9})
DISTUTILS_OPTIONAL=1
inherit distutils-r1
DESCRIPTION="A generic library for injecting 802.11 frames"
HOMEPAGE="https://github.com/kismetwireless/lorcon"
if [[ ${PV} == "9999" ]] ; then
#EGIT_REPO_URI="https://www.kismetwireless.net/lorcon.git"
EGIT_REPO_URI="https://github.com/kismetwireless/lorcon.git"
inherit git-r3
S="${WORKDIR}"/${P}
else
SRC_URI="https://github.com/kismetwireless/lorcon/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="python"
DEPEND="
python? ( ${PYTHON_DEPS} )
dev-libs/libnl:3=
net-libs/libpcap"
RDEPEND="${DEPEND}"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RESTRICT="test"
src_unpack() {
if [[ ${PV} == "9999" ]] ; then
git-r3_src_unpack
cp -R "${S}/" "${WORKDIR}/all"
fi
default_src_unpack
}
src_prepare() {
default
use python && distutils-r1_src_prepare
}
src_configure() {
econf --disable-static
}
src_compile() {
default_src_compile
if use python; then
LDFLAGS+=" -L${S}/.libs/"
cd pylorcon2 || die
distutils-r1_src_compile
fi
}
src_install() {
emake DESTDIR="${ED}" install
if use python; then
cd pylorcon2 || die
distutils-r1_src_install
fi
find "${ED}" -name '*.la' -delete || die
}