rcracki_mt: update ebuild, add gtk flag support

This commit is contained in:
Yury Martynov 2019-08-04 22:53:29 +03:00
parent fb8b0e6e34
commit 5d9fb370f7
No known key found for this signature in database
GPG key ID: EBE62DD0CCEAE19E
4 changed files with 95 additions and 75 deletions

View file

@ -1,2 +1 @@
DIST rcracki_mt_0.6.6_src.7z 60299 SHA256 def2e8cdb325402501af7df5b1524ae8615ad73c55fae9d25932fb161d6ba596 SHA512 ff586e6319d354345ab7b7e3ce623a08cdbdd43214d05d6646507936bd9dac3bb62f3aee7eeeda9f2b3c5f97e5108cd888f70cdcca719bb05b2c6d99b2636d36 WHIRLPOOL 7f180fbc6c606fb21ac6bd40e4946bd461ddb042de49a2fe648ad3591346949d1ba24e1a6f3dd594fcc0bb20ab6f6f5ae74aed3a9619bfba7a13f9086190df6d DIST rcracki_mt-0.7.0.7z 171634 BLAKE2B c4461ae500bc0451582ce10972b73e09a67a1a7f8424763a237152f136d112b4296e75e3c50a5f5dac85641fff97321d18dbca35f32cfce038d004c18285c3c4 SHA512 f93dc1d7ca1f18c63a9612b053d86ad639589e2534361c2fb3d3c064c162002798082bc1219737ae9567a23daa6ef7a0f7a52e7debbeb8ceceb2e1724c71bf0d
DIST rcracki_mt_0.7.0_src.7z 171634 SHA256 904c73d040fa91b0871907fc772da977b273579ee42036ab2596f3d3a644a000 SHA512 f93dc1d7ca1f18c63a9612b053d86ad639589e2534361c2fb3d3c064c162002798082bc1219737ae9567a23daa6ef7a0f7a52e7debbeb8ceceb2e1724c71bf0d WHIRLPOOL 5ce47b79b16d9e7c915ed14608817ea3049185299c096961222f5281efedd86a79a1caa63f327ad648f28b5e0e085e903bb1e0c0e020c7c683c624548e96e9ef

View file

@ -1,39 +0,0 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=2
inherit eutils toolchain-funcs
DESCRIPTION="perform a rainbow table attack on password hashes"
HOMEPAGE="http://sourceforge.net/projects/rcracki/"
SRC_URI="mirror://sourceforge/rcracki/${PN}_${PV}_src.7z"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="dev-libs/openssl"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${PN}_${PV}_src"
src_prepare() {
epatch "${FILESDIR}/${PN}-share.patch"
sed -i "s#@@SHARE@@#/usr/share/${P}#g" ChainWalkContext.cpp || die
sed -i "s|-O3|$CXXFLAGS|" Makefile || die
sed -i "s|\$(LFLAGS)|$LDFLAGS|" Makefile || die
}
src_compile() {
# force only one Makejob
emake -j1 || die
}
src_install() {
dobin rcracki_mt || die
insinto "/usr/share/${P}"
doins charset.txt || die
}

View file

@ -0,0 +1,94 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools desktop eutils multilib toolchain-funcs xdg-utils
DESCRIPTION="Perform a rainbow table attack on password hashes"
HOMEPAGE="https://freerainbowtables.com/"
SRC_URI="mirror://sourceforge/rcracki/rcracki_mt_${PV}_src.7z -> ${P}.7z"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~x86"
IUSE="gtk"
RDEPEND="
app-arch/p7zip
dev-libs/openssl:0
gtk? (
dev-libs/glib:2
x11-libs/cairo
x11-libs/gtk+:2
x11-libs/pango
)"
DEPEND="${RDEPEND}"
S="${WORKDIR}/rcracki_mt_${PV}_src/${PN}"
src_prepare() {
sed -e "s#GetApplicationPath() + \"charset.txt\"#\"/usr/share/${PN}/charset.txt\"#g" \
-i ChainWalkContext.cpp || die
sed -e "s|CC = g++|CC = $(tc-getCXX)|" \
-e "s|-O3|${CXXFLAGS}|" \
-e "s|\$(LFLAGS)|${LDFLAGS}|" \
-e "s|-L/usr/lib|-L/usr/$(get_libdir)|" \
-e "s|-L/lib|-L/$(get_libdir)|" \
-i Makefile || die
if use gtk; then
cd ../${PN}-gui || die
sed -e "s|@LDFLAGS@|@LDFLAGS@ -pthread|" -i Makefile.in || die
mv configure.in configure.ac || die
eautoreconf
fi
default
}
src_configure() {
if use gtk; then
cd ../${PN}-gui || die
econf
fi
}
src_compile() {
if use gtk; then
cd ../${PN}-gui || die
emake -j1
else
emake
fi
}
src_install() {
insinto "/usr/share/${PN}"
doins charset.txt
if use gtk; then
cd ../${PN}-gui || die
insinto "/usr/share/pixmaps"
newins icon.png ${PN}.png
newbin rcracki_mt-gui $PN
make_desktop_entry $PN \
"${PN}-GUI" \
"${PN}" "Utility"
else
dobin rcracki_mt
fi
}
pkg_postinst() {
xdg_icon_cache_update
xdg_desktop_database_update
}
pkg_postrm() {
xdg_icon_cache_update
xdg_desktop_database_update
}

View file

@ -1,34 +0,0 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
inherit eutils toolchain-funcs
DESCRIPTION="perform a rainbow table attack on password hashes"
HOMEPAGE="http://sourceforge.net/projects/rcracki/"
SRC_URI="mirror://sourceforge/rcracki/${PN}_${PV}_src.7z"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="dev-libs/openssl
app-arch/p7zip"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${PN}_${PV}_src/${PN}"
src_prepare() {
sed -i "s#GetApplicationPath() + "charset.txt"#"/usr/share/charset.txt"${P}#g" ChainWalkContext.cpp || die
sed -i "s|-O3|$CXXFLAGS|" Makefile || die
sed -i "s|\$(LFLAGS)|$LDFLAGS|" Makefile || die
}
src_install() {
dobin rcracki_mt || die
insinto "/usr/share/${P}"
doins charset.txt || die
}