wifite: create a proper module for python2/3 white waiting for https://github.com/derv82/wifite2/issues/102

This commit is contained in:
blshkv 2018-06-10 17:35:02 +08:00
parent 302c352bdc
commit f36bc300d8
No known key found for this signature in database
GPG key ID: 273E3E90D1A6294F

View file

@ -3,7 +3,6 @@
EAPI=6
#PYTHON_COMPAT=( python2_7 )
PYTHON_COMPAT=( python{2_7,3_5,3_6} )
inherit python-r1
@ -43,22 +42,15 @@ RDEPEND="net-wireless/aircrack-ng
net-analyzer/macchanger
)"
src_install() {
dodir /usr/$(get_libdir)/${PN}
cp -R * "${ED}"/usr/$(get_libdir)/${PN} || die "Copy files failed"
dosym "${EPREFIX}"/usr/$(get_libdir)/${PN}/Wifite.py /usr/sbin/${PN}2
src_prepare() {
#make a module
sed -e 's|from .|from wifite.|' -i wifite/wifite.py || die "sed failed"
default
}
#src_prepare() {
# #make it a module
# sed -e 's|from .|from wifite.|' -i wifite/wifite.py || die "sed failed"
# touch __init__.py
# default
#}
#src_install() {
# python_moduleinto ${PN}
# python_foreach_impl python_domodule wifite __init__.py
# newsbin wifite/wifite.py wifite2
# dodoc README.md LICENSE
#}
src_install() {
python_moduleinto .
python_foreach_impl python_domodule wifite
newsbin wifite/wifite.py wifite2
dodoc README.md LICENSE
}