summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina <zerochaos@gentoo.org>2012-07-04 02:58:19 +0000
committerRick Farina <zerochaos@gentoo.org>2012-07-04 02:58:19 +0000
commitab6e86969c937e2eab90cea271339ced63349c24 (patch)
treedd5a52ab9aff3911d9106926fd9038bb4527f8d7 /app-crypt/oclhashcat-lite-bin
parentBump (diff)
downloadgentoo-2-ab6e86969c937e2eab90cea271339ced63349c24.tar.gz
gentoo-2-ab6e86969c937e2eab90cea271339ced63349c24.tar.bz2
gentoo-2-ab6e86969c937e2eab90cea271339ced63349c24.zip
move loader and simplify ebuild with a for loop
(Portage version: 2.1.11.3/cvs/Linux x86_64)
Diffstat (limited to 'app-crypt/oclhashcat-lite-bin')
-rw-r--r--app-crypt/oclhashcat-lite-bin/ChangeLog6
-rw-r--r--app-crypt/oclhashcat-lite-bin/oclhashcat-lite-bin-0.10.ebuild105
2 files changed, 55 insertions, 56 deletions
diff --git a/app-crypt/oclhashcat-lite-bin/ChangeLog b/app-crypt/oclhashcat-lite-bin/ChangeLog
index 6085972a32a0..057e191168a2 100644
--- a/app-crypt/oclhashcat-lite-bin/ChangeLog
+++ b/app-crypt/oclhashcat-lite-bin/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-crypt/oclhashcat-lite-bin
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/oclhashcat-lite-bin/ChangeLog,v 1.1 2012/07/02 01:25:52 zerochaos Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/oclhashcat-lite-bin/ChangeLog,v 1.2 2012/07/04 02:58:19 zerochaos Exp $
+
+ 04 Jul 2012; Rick Farina <zerochaos@gentoo.org>
+ oclhashcat-lite-bin-0.10.ebuild:
+ move loader and simplify ebuild with a for loop
*oclhashcat-lite-bin-0.10 (02 Jul 2012)
diff --git a/app-crypt/oclhashcat-lite-bin/oclhashcat-lite-bin-0.10.ebuild b/app-crypt/oclhashcat-lite-bin/oclhashcat-lite-bin-0.10.ebuild
index dbfcbc0ffe87..474e237ab340 100644
--- a/app-crypt/oclhashcat-lite-bin/oclhashcat-lite-bin-0.10.ebuild
+++ b/app-crypt/oclhashcat-lite-bin/oclhashcat-lite-bin-0.10.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/oclhashcat-lite-bin/oclhashcat-lite-bin-0.10.ebuild,v 1.1 2012/07/02 01:25:52 zerochaos Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/oclhashcat-lite-bin/oclhashcat-lite-bin-0.10.ebuild,v 1.2 2012/07/04 02:58:19 zerochaos Exp $
EAPI=4
@@ -34,22 +34,22 @@ QA_PREBUILT="*Hashcat-lite*.bin"
src_install() {
dodoc docs/*
- rm -rf *.exe docs
+ rm -rf *.exe docs || die
if use x86; then
- rm oclHashcat-lite64.bin
- rm cudaHashcat-lite64.bin
+ rm oclHashcat-lite64.bin || die
+ rm cudaHashcat-lite64.bin || die
fi
if use amd64; then
- rm oclHashcat-lite32.bin
- rm cudaHashcat-lite32.bin
+ rm oclHashcat-lite32.bin || die
+ rm cudaHashcat-lite32.bin || die
fi
if ! use video_cards_fglrx; then
- rm -rf kernels/4098
- rm -f oclHashcat-lite*.bin
+ rm -rf kernels/4098 || die
+ rm -f oclHashcat-lite*.bin || die
fi
if ! use video_cards_nvidia; then
- rm -rf kernels/4318
- rm -f cudaHashcat-lite*.bin
+ rm -rf kernels/4318 || die
+ rm -f cudaHashcat-lite*.bin || die
fi
#I assume this is needed but I didn't check
@@ -58,53 +58,48 @@ src_install() {
insinto /opt/${PN}
doins -r "${S}"/*
- dodir /usr/bin
- echo '#! /bin/sh' > "${ED}"/usr/bin/oclhashcat-lite
- echo 'echo "oclHashcat-lite and all related files have been installed in /opt/oclhashcat-lite-bin"' >> "${ED}"/usr/bin/oclhashcat-lite
- echo 'echo "Please run one of the following binaries to use gpu accelerated hashcat:"' >> "${ED}"/usr/bin/oclhashcat-lite
- if [ -f "${ED}"/opt/${PN}/oclHashcat-lite64.bin ]
- then
- echo 'echo "64 bit ATI accelerated \"oclHashcat-lite64.bin\""' >> "${ED}"/usr/bin/oclhashcat-lite
- fperms +x /opt/${PN}/oclHashcat-lite64.bin
- echo '#! /bin/sh' > "${ED}"/usr/bin/oclHashcat-lite64.bin
- echo 'cd /opt/oclhashcat-lite-bin' >> "${ED}"/usr/bin/oclHashcat-lite64.bin
- echo 'echo "Warning: oclHashcat-lite64.bin is running from $(pwd) so be careful of relative paths."' >> "${ED}"/usr/bin/oclHashcat-lite64.bin
- echo './oclHashcat-lite64.bin $@' >> "${ED}"/usr/bin/oclHashcat-lite64.bin
- fperms +x /usr/bin/oclHashcat-lite64.bin
+ dodir /opt/bin
- fi
- if [ -f "${ED}"/opt/${PN}/oclHashcat-lite32.bin ]
- then
- echo 'echo "32 bit ATI accelerated \"oclHashcat-lite32.bin\""' >> "${ED}"/usr/bin/oclhashcat-lite
- fperms +x /opt/${PN}/oclHashcat-lite32.bin
- echo '#! /bin/sh' > "${ED}"/usr/bin/oclHashcat-lite32.bin
- echo 'cd /opt/oclhashcat-lite-bin' >> "${ED}"/usr/bin/oclHashcat-lite32.bin
- echo 'echo "Warning: oclHashcat-lite32.bin is running from $(pwd) so be careful of relative paths."' >> "${ED}"/usr/bin/oclHashcat-lite32.bin
- echo './oclHashcat-lite32.bin $@' >> "${ED}"/usr/bin/oclHashcat-lite32.bin
- fperms +x /usr/bin/oclHashcat-lite32.bin
- fi
- if [ -f "${ED}"/opt/${PN}/cudaHashcat-lite64.bin ]
- then
- echo 'echo "64 bit NVIDIA accelerated \"cudaHashcat-lite64.bin\""' >> "${ED}"/usr/bin/oclhashcat-lite
- fperms +x /opt/${PN}/cudaHashcat-lite64.bin
- echo '#! /bin/sh' > "${ED}"/usr/bin/cudaHashcat-lite64.bin
- echo 'cd /opt/oclhashcat-lite-bin' >> "${ED}"/usr/bin/cudaHashcat-lite64.bin
- echo 'echo "Warning: cudaHashcat-lite64.bin is running from $(pwd) so be careful of relative paths."' >> "${ED}"/usr/bin/cudaHashcat-lite64.bin
- echo './cudaHashcat-lite64.bin $@' >> "${ED}"/usr/bin/cudaHashcat-lite64.bin
- fperms +x /usr/bin/cudaHashcat-lite64.bin
+ cat <<-EOF > "${ED}"/opt/bin/oclhashcat-lite
+ #! /bin/sh
+ echo "oclHashcat-lite and all related files have been installed in /opt/${PN}"
+ echo "Please run one of the following binaries to use gpu accelerated hashcat:"
+ EOF
- fi
- if [ -f "${ED}"/opt/${PN}/cudaHashcat-lite32.bin ]
- then
- echo 'echo 32 bit NVIDIA accelerated \"cudaHashcat-lite32.bin\""' >> "${ED}"/usr/bin/oclhashcat-lite
- fperms +x /opt/${PN}/cudaHashcat-lite32.bin
- echo '#! /bin/sh' > "${ED}"/usr/bin/cudaHashcat-lite32.bin
- echo 'cd /opt/oclhashcat-lite-bin' >> "${ED}"/usr/bin/cudaHashcat-lite32.bin
- echo 'echo "Warning: cudaHashcat-lite32.bin is running from $(pwd) so be careful of relative paths."' >> "${ED}"/usr/bin/cudaHashcat-lite32.bin
- echo './cudaHashcat-lite32.bin $@' >> "${ED}"/usr/bin/cudaHashcat-lite32.bin
- fperms +x /usr/bin/oclHashcat-lite32.bin
- fi
- fperms +x /usr/bin/oclhashcat-lite
+ for x in oclHashcat-lite64.bin oclHashcat-lite32.bin cudaHashcat-lite64.bin cudaHashcat-lite32.bin
+ do
+ if [ -f "${ED}"/opt/${PN}/${x} ]
+ then
+ case "${x}" in
+ oclHashcat-lite64.bin)
+ echo "echo '64 bit ATI accelerated \"oclHashcat-lite64.bin\"'" >> "${ED}"/opt/bin/oclhashcat-lite
+ ;;
+ oclHashcat-lite32.bin)
+ echo "echo '32 bit ATI accelerated \"oclHashcat-lite32.bin\"'" >> "${ED}"/opt/bin/oclhashcat-lite
+ ;;
+ cudaHashcat-lite64.bin)
+ echo "echo '64 bit NVIDIA accelerated \"cudaHashcat-lite64.bin\"'" >> "${ED}"/opt/bin/oclhashcat-lite
+ ;;
+ cudaHashcat-lite32.bin)
+ echo "echo '32 bit NVIDIA accelerated \"cudaHashcat-lite32.bin\"'" >> "${ED}"/opt/bin/oclhashcat-lite
+ ;;
+ esac
+
+ fperms +x /opt/${PN}/${x}
+
+ cat <<-EOF > "${ED}"/opt/bin/${x}
+ #! /bin/sh
+ cd /opt/${PN}
+ echo "Warning: ${x} is running from /opt/${PN} so be careful of relative paths."
+ ./${x} "\$@"
+ EOF
+
+ fperms +x /opt/bin/${x}
+
+ fi
+ done
+
+ fperms +x /opt/bin/oclhashcat-lite
fowners root:video /opt/${PN}
einfo "oclhashcat-lite can be run as user if you are in the video group"
}