mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-18 21:00:56 +02:00
pyrit: Split out ebuild for opencl and cuda support
This commit is contained in:
parent
b1a96f240a
commit
e50727187d
9 changed files with 109 additions and 78 deletions
1
app-crypt/cpyrit_cuda/Manifest
Normal file
1
app-crypt/cpyrit_cuda/Manifest
Normal file
|
|
@ -0,0 +1 @@
|
|||
EBUILD cpyrit_cuda-0.3.ebuild 697 RMD160 cf6eecec7edbf57fe619ae62ccbeb939aac4427c SHA1 a0d3adc4851c50c096cf038fa77725de27952dcd SHA256 936fdf68c7a6e4409d408f5c669b17021a06b31d91a624c585db9bd57ac12a1e
|
||||
38
app-crypt/cpyrit_cuda/cpyrit_cuda-0.3.ebuild
Normal file
38
app-crypt/cpyrit_cuda/cpyrit_cuda-0.3.ebuild
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=2
|
||||
|
||||
inherit eutils python distutils subversion
|
||||
|
||||
DESCRIPTION="A GPU-based WPA-PSK and WPA2-PSK cracking tool"
|
||||
HOMEPAGE="http://code.google.com/p/pyrit/"
|
||||
ESVN_REPO_URI="http://pyrit.googlecode.com/svn/trunk/@242"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-util/nvidia-cuda-sdk-2.2[pentoo]
|
||||
x11-drivers/nvidia-drivers"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
cd "${S}/cpyrit_cuda"
|
||||
distutils_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/cpyrit_cuda"
|
||||
distutils_src_install
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
python_mod_optimize
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup
|
||||
}
|
||||
2
app-crypt/cpyrit_opencl/Manifest
Normal file
2
app-crypt/cpyrit_opencl/Manifest
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
AUX cpyrit_opencl-0.3.patch 826 RMD160 62f810c2697cb3a2e6ea3dea565c9e6134c20d40 SHA1 b83721a565cb86ad5552fd2fdce23eaf1ef5c9c2 SHA256 4dd600140f6592f353dd96504b4381a32319a670ca168611a0f1d5e45a3c89c4
|
||||
EBUILD cpyrit_opencl-0.3.ebuild 786 RMD160 07484b275ca417307c36db6a992f82d9a788e6c6 SHA1 2df3bc81d2bf6e94945cacfdaadaaaa28cd348c9 SHA256 8da745c39ee492fa87a8ebf5e909924e8e6606e09149d6c71283e5d653ff235b
|
||||
|
|
@ -8,7 +8,7 @@ inherit eutils python distutils subversion
|
|||
|
||||
DESCRIPTION="A GPU-based WPA-PSK and WPA2-PSK cracking tool"
|
||||
HOMEPAGE="http://code.google.com/p/pyrit/"
|
||||
ESVN_REPO_URI="http://pyrit.googlecode.com/svn/trunk/@168"
|
||||
ESVN_REPO_URI="http://pyrit.googlecode.com/svn/trunk/@242"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
|
|
@ -17,37 +17,19 @@ IUSE="cuda stream"
|
|||
|
||||
DEPEND="dev-db/sqlite:3
|
||||
dev-lang/python[sqlite]
|
||||
stream? ( >=dev-util/ati-stream-sdk-bin-1.4.0_beta
|
||||
>=x11-drivers/ati-drivers-8.573 )
|
||||
cuda? ( >=dev-util/nvidia-cuda-sdk-2.2
|
||||
x11-drivers/nvidia-drivers )"
|
||||
>=dev-util/ati-stream-sdk-bin-2.0
|
||||
>=x11-drivers/ati-drivers-10.0"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
epatch "${FILESDIR}/${P}.patch"
|
||||
cd "${S}/pyrit"
|
||||
cd "${S}/cpyrit_opencl"
|
||||
distutils_src_compile
|
||||
if use cuda; then
|
||||
cd "${S}/cpyrit_cuda"
|
||||
distutils_src_compile
|
||||
fi
|
||||
if use stream; then
|
||||
cd "${S}/cpyrit_stream"
|
||||
distutils_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/pyrit"
|
||||
cd "${S}/cpyrit_opencl"
|
||||
distutils_src_install
|
||||
if use cuda; then
|
||||
cd "${S}/cpyrit_cuda"
|
||||
distutils_src_install
|
||||
fi
|
||||
if use stream; then
|
||||
cd "${S}/cpyrit_stream"
|
||||
distutils_src_install
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
21
app-crypt/cpyrit_opencl/files/cpyrit_opencl-0.3.patch
Normal file
21
app-crypt/cpyrit_opencl/files/cpyrit_opencl-0.3.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Index: cpyrit_opencl/setup.py
|
||||
===================================================================
|
||||
--- cpyrit_opencl/setup.py (revision 225)
|
||||
+++ cpyrit_opencl/setup.py (working copy)
|
||||
@@ -32,7 +32,7 @@
|
||||
OPENCL_INC_DIRS = []
|
||||
for path in ('/usr/local/opencl/OpenCL/common/inc', \
|
||||
'/opt/opencl/OpenCL/common/inc', \
|
||||
- '/usr/local/opencl/include'):
|
||||
+ '/opt/ati-stream-sdk/include'):
|
||||
if os.path.exists(path):
|
||||
OPENCL_INC_DIRS.append(path)
|
||||
break
|
||||
@@ -91,6 +91,7 @@
|
||||
libraries = ['ssl', 'OpenCL', 'z'],
|
||||
sources = ['_cpyrit_opencl.c'],
|
||||
include_dirs = OPENCL_INC_DIRS,
|
||||
+ library_dirs = ['/opt/ati-stream-sdk/lib'],
|
||||
extra_compile_args = EXTRA_COMPILE_ARGS)
|
||||
|
||||
setup_args = dict(
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
AUX pyrit-0.2.2.patch 1072 RMD160 a78dfe38760d6146848f054da2b2b2ea2abf9a8e SHA1 8848b76dda5d332975537021bb9d7996d7c17f91 SHA256 3c424fab44379b5e81f001887baf15ba0afc2e0466d29d612865303e689fa980
|
||||
AUX pyrit-0.2.4.patch 1106 RMD160 ddb3374356d684376420eb6ca0032945f0bd9492 SHA1 4d4399a4e2b4c0fee932dad2ec4e9562a5fb6704 SHA256 6f0345c00c6dc7fc4b13a3b6ce94c030d2db568b1b772100bd68cb200dce0f43
|
||||
AUX pyrit-0.3.patch 826 RMD160 62f810c2697cb3a2e6ea3dea565c9e6134c20d40 SHA1 b83721a565cb86ad5552fd2fdce23eaf1ef5c9c2 SHA256 4dd600140f6592f353dd96504b4381a32319a670ca168611a0f1d5e45a3c89c4
|
||||
AUX pyrit-9999.patch 950 RMD160 4bade1fc92ab97c77d62f7d3ebee960e8b1b71f7 SHA1 8c83d40418b69088f0cfcc48336722889e5cb289 SHA256 663f821ee8e30b3f0e35d6415379b3268c5ada29d163fb21d9a3ba576698b0b6
|
||||
EBUILD pyrit-0.2.4-r1.ebuild 1156 RMD160 931b385925e884fafd1e4d245d1e1f6ea27beafb SHA1 6108369f296a445af4ec79af7c239e8c58317747 SHA256 d0465f8cf70e2a137f791136b0c04535302b836a6610230ebe9ccc187b8f390b
|
||||
EBUILD pyrit-0.3-r1.ebuild 772 RMD160 67415ca6ef2751548a406a127cc38ae241fa965d SHA1 0c6fbd499dd3e171665de375ce5c777f2846e8a3 SHA256 897261adde4c0ad279ca4f54e521d1b93a755747605d0fe49977461834135d47
|
||||
EBUILD pyrit-0.3.ebuild 1148 RMD160 6cd54b5372655b703b0b61bb2487a8d705353795 SHA1 d89ba89e6b65d0df23c79349b6668546177c8cbb SHA256 8e850120842228177f41a6d6c2d3af65ef9bdf5562d8b3a6688b90d610184024
|
||||
EBUILD pyrit-9999.ebuild 1214 RMD160 b642620388b5cac9850f72e04f104c5bdd36152c SHA1 e9e093107d35bb53c7c889d1f0c29bba5b09d1c5 SHA256 5813456b0507ed7116c5851476b31a7b4f2d18f2e46c2278f3ddb03cbe8a8281
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
Index: cpyrit_stream/setup.py
|
||||
===================================================================
|
||||
--- cpyrit_stream/setup.py (revision 89)
|
||||
+++ cpyrit_stream/setup.py (working copy)
|
||||
@@ -29,19 +29,10 @@
|
||||
INCLUDE_DIRS = []
|
||||
|
||||
# Try to find the Brook+ library and headers
|
||||
-STREAM_LIB_DIRS = []
|
||||
-STREAM_INC_DIRS = []
|
||||
+STREAM_INC_DIRS = ['/opt/atibrook/include','/opt/atibrook/include/brook']
|
||||
+STREAM_LIB_DIRS = ['/opt/atibrook/lib','/usr/lib']
|
||||
BRCC = 'brcc'
|
||||
-for path in ('/usr/local/atibrook/sdk','/opt/atibrook/sdk'):
|
||||
- if os.path.exists(path):
|
||||
- STREAM_LIB_DIRS.append(os.path.sep.join((path, 'lib')))
|
||||
- STREAM_INC_DIRS.append(os.path.sep.join((path, 'include')))
|
||||
- BRCC = os.path.sep.join((path, 'bin', 'brcc'))
|
||||
- break
|
||||
-else:
|
||||
- print >>sys.stderr, "The AMD-Stream compiler, headers and libraries required to build the kernel were not found. Trying to continue anyway..."
|
||||
|
||||
-
|
||||
# Custom build_ext phase to create the GPU code with special compilers before building the whole thing
|
||||
class GPUBuilder(build_ext):
|
||||
def _call(self, comm):
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
Index: cpyrit_stream/setup.py
|
||||
===================================================================
|
||||
--- cpyrit_stream/setup.py (revision 168)
|
||||
+++ cpyrit_stream/setup.py (working copy)
|
||||
@@ -27,19 +27,10 @@
|
||||
import subprocess
|
||||
|
||||
# Try to find the Brook+ library and headers
|
||||
-STREAM_LIB_DIRS = []
|
||||
-STREAM_INC_DIRS = []
|
||||
+STREAM_INC_DIRS = ['/opt/atibrook/include','/opt/atibrook/include/brook']
|
||||
+STREAM_LIB_DIRS = ['/opt/atibrook/lib','/usr/lib']
|
||||
BRCC = 'brcc'
|
||||
-for path in ('/usr/local/atibrook/sdk','/opt/atibrook/sdk'):
|
||||
- if os.path.exists(path):
|
||||
- STREAM_LIB_DIRS.append(os.path.sep.join((path, 'lib')))
|
||||
- STREAM_INC_DIRS.append(os.path.sep.join((path, 'include')))
|
||||
- BRCC = os.path.sep.join((path, 'bin', 'brcc'))
|
||||
- break
|
||||
-else:
|
||||
- print >>sys.stderr, "The AMD-Stream compiler, headers and libraries required to build the kernel were not found. Trying to continue anyway..."
|
||||
|
||||
-
|
||||
try:
|
||||
svn_info = subprocess.Popen(('svn', 'info'), stdout=subprocess.PIPE).stdout.read()
|
||||
version_string = '0.2.4 (svn r%i)' % int(re.compile('Revision: ([0-9]*)').findall(svn_info)[0])
|
||||
41
app-crypt/pyrit/pyrit-0.3-r1.ebuild
Normal file
41
app-crypt/pyrit/pyrit-0.3-r1.ebuild
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=2
|
||||
|
||||
inherit eutils python distutils subversion
|
||||
|
||||
DESCRIPTION="A GPU-based WPA-PSK and WPA2-PSK cracking tool"
|
||||
HOMEPAGE="http://code.google.com/p/pyrit/"
|
||||
ESVN_REPO_URI="http://pyrit.googlecode.com/svn/trunk/@242"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="cuda opencl"
|
||||
|
||||
DEPEND="dev-db/sqlite:3
|
||||
dev-lang/python[sqlite]
|
||||
net-analyzer/scapy
|
||||
opencl? ( ~app-crypt/cpyrit_opencl-0.3 )
|
||||
cuda? ( ~app-crypt/cpyrit_cuda-0.3 )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_compile() {
|
||||
cd "${S}/pyrit"
|
||||
distutils_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/pyrit"
|
||||
distutils_src_install
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
python_mod_optimize
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup
|
||||
}
|
||||
Loading…
Reference in a new issue