blob: 239687e8a75ff1cd6da23955a22216c80e231943 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Copyright 2022-2026 Liguros Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..14} )
PYTHON_REQ_USE="sqlite"
inherit bash-completion-r1 python-single-r1 wrapper
DESCRIPTION="An automatic SQL injection and database takeover tool"
HOMEPAGE="https://github.com/sqlmapproject/sqlmap"
SRC_URI="https://github.com/sqlmapproject/sqlmap/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 ~arm64 x86"
LICENSE="GPL-2"
SLOT=0
IUSE="doc mysql psycopg"
RDEPEND="
${PYTHON_DEPS}
psycopg? ( dev-python/psycopg )
mysql? ( dev-python/pymysql )
dev-python/sqlalchemy
"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
pkg_setup() {
python-single-r1_pkg_setup
}
src_prepare() {
mv doc/ "${T}"/doc || die
default
}
src_install () {
dodoc -r \
README.md \
$(use doc && echo "${T}/doc/*")
dodir "/usr/share/${PN}/"
cp -R * "${D}/usr/share/${PN}/" || die
python_optimize "${D}/usr/share/${PN}"
make_wrapper $PN \
"python3 /usr/share/${PN}/sqlmap.py"
newbashcomp "${FILESDIR}"/sqlmap.bash-completion sqlmap
}
|