diff --git a/dev-db/sqlmap/Manifest b/dev-db/sqlmap/Manifest index be5a77bff..2c821c672 100644 --- a/dev-db/sqlmap/Manifest +++ b/dev-db/sqlmap/Manifest @@ -1,2 +1,2 @@ DIST sqlmap-1.3.6.tar.gz 7452711 BLAKE2B e6d5af4885b291e4942213f315f8e770df27b1b706054745b9075188febc82a5e83cb897fe5dd196f70734bbe6081ff2a4051e5812797b03da7e4ea1b4a17c74 SHA512 bf1b0e3422e979e34c36014c8dadf2d64aec95810ceb3f1fce11231d3b11026b3575f8f390ac6dab4ff8695f74f19cd0373cb91b63ae15978c6d3cc9487e5db5 -DIST sqlmap-1.3.7.tar.gz 7482163 BLAKE2B e4b993a6de1b59a301661dbeab0efad11840e309f3b96072483273c1a9f4dc9da093aa1e85f06eab057375783d1a3491f1fd8ea63154f8d2c3312d3500b5a867 SHA512 0d1cfe7dabb3d53d380fd3ad5a69948e3fabd11578bb001672adf2c7a76b0a164f723f17454bc1984a7dfc28a4de9cd50c7593ba44c7ff1e50990bc8e2340cb4 +DIST sqlmap-1.3.8.tar.gz 7484007 BLAKE2B 67f973bf2e3a5369a701fdd1328ef2da11de0f39799c27251f8a04a44f9f2e17d810cf7c114870ddee9a1485e6c01c7102a68c607b02753b662ce488ad1d0da1 SHA512 9b117aced75070b23a92c8c349692dbf6112c23da1e50b2b5f3f48e95b3eaee2d24abf3c928e6248c58b74ae6725b2e588c2a2cb00153aea59111f5b3777b7d4 diff --git a/dev-db/sqlmap/sqlmap-1.3.7.ebuild b/dev-db/sqlmap/sqlmap-1.3.8.ebuild similarity index 100% rename from dev-db/sqlmap/sqlmap-1.3.7.ebuild rename to dev-db/sqlmap/sqlmap-1.3.8.ebuild diff --git a/dev-db/sqlmap/sqlmap-9999.ebuild b/dev-db/sqlmap/sqlmap-9999.ebuild index e4e7149c7..4aa0ce44b 100644 --- a/dev-db/sqlmap/sqlmap-9999.ebuild +++ b/dev-db/sqlmap/sqlmap-9999.ebuild @@ -3,54 +3,60 @@ EAPI=7 -PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) -inherit python-r1 bash-completion-r1 +PYTHON_COMPAT=( python3_{5,6,7} ) -if [[ ${PV} == "9999" ]]; then +inherit eutils bash-completion-r1 python-single-r1 + +DESCRIPTION="Automatic SQL injection and database takeover tool" +HOMEPAGE="https://github.com/sqlmapproject/sqlmap" + +if [[ ${PV} == *9999 ]]; then inherit git-r3 - EGIT_REPO_URI="https://github.com/sqlmapproject/sqlmap.git" - KEYWORDS="" + EGIT_REPO_URI="https://github.com/sqlmapproject/sqlmap" else SRC_URI="https://github.com/sqlmapproject/sqlmap/archive/${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~x86" fi -DESCRIPTION="Automatic SQL injection and database takeover tool " - LICENSE="GPL-2" -SLOT="0" -IUSE="ntlm" +SLOT=0 +IUSE="doc" -DEPEND="" -RDEPEND="ntlm? ( dev-python/python-ntlm[${PYTHON_USEDEP}] )" +DEPEND="${PYTHON_DEPS}" +RDEPEND="" -QA_PREBUILT=" - usr/share/${PN}/udf/mysql/linux/32/lib_mysqludf_sys.so - usr/share/${PN}/udf/mysql/linux/64/lib_mysqludf_sys.so - usr/share/${PN}/udf/postgresql/linux/32/8.2/lib_postgresqludf_sys.so - usr/share/${PN}/udf/postgresql/linux/32/8.3/lib_postgresqludf_sys.so - usr/share/${PN}/udf/postgresql/linux/32/8.4/lib_postgresqludf_sys.so - usr/share/${PN}/udf/postgresql/linux/32/9.0/lib_postgresqludf_sys.so - usr/share/${PN}/udf/postgresql/linux/32/9.1/lib_postgresqludf_sys.so - usr/share/${PN}/udf/postgresql/linux/64/8.2/lib_postgresqludf_sys.so - usr/share/${PN}/udf/postgresql/linux/64/8.3/lib_postgresqludf_sys.so - usr/share/${PN}/udf/postgresql/linux/64/8.4/lib_postgresqludf_sys.so - usr/share/${PN}/udf/postgresql/linux/64/9.0/lib_postgresqludf_sys.so" +pkg_setup() { + python-single-r1_pkg_setup +} + +src_prepare() { + if [[ ${PV} == *9999 ]]; then + # fix broken tarball + find ./ -name .git | xargs rm -rf || die + + # Don't forget to disable the revision check since we removed the SVN files + sed \ + -e 's/= getRevisionNumber()/= "Unknown revision"/' \ + -i lib/core/settings.py || die 'sed failed!' + fi + + mv doc/ "${T}"/doc || die + #python_fix_shebang "${S}" + + default +} src_install () { - if [[ ${PV} == "9999" ]]; then - # fix broken tarball - find ./ -name .git | xargs rm -rf - # Don't forget to disable the revision check since we removed the SVN files - sed -i -e 's/= getRevisionNumber()/= "Unknown revision"/' lib/core/settings.py - fi - dodoc -r doc/* - rm -rf doc/ - dodir /usr/share/${PN}/ + dodoc -r \ + README.md \ + $(use doc && echo "${T}/doc/*") - cp -R * "${ED}"/usr/share/${PN}/ -# python_fix_shebang "${ED}"/usr/share/${PN} - dosym "${EPREFIX}"/usr/share/${PN}/sqlmap.py /usr/bin/${PN} + 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 }