summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/hashcat/PKGBUILD39
-rw-r--r--libre/hashcat/makefile.patch41
2 files changed, 80 insertions, 0 deletions
diff --git a/libre/hashcat/PKGBUILD b/libre/hashcat/PKGBUILD
new file mode 100644
index 000000000..59fc0d6c5
--- /dev/null
+++ b/libre/hashcat/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer (Arch): Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor (Arch): Sam Stuewe <halosghost at archlinux dot info>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+pkgname=hashcat
+pkgver=3.00
+pkgrel=2.parabola1
+pkgdesc='Multithreaded advanced password recovery utility, without nonfree libxnvctrl and opencl-nvidia recommendation'
+url='https://hashcat.net/hashcat'
+arch=('i686' 'x86_64')
+depends=('gmp' 'libcl')
+optdepends=('opencl-mesa: OpenCL support for AMD/ATI Radeon mesa drivers')
+makedepends=('opencl-headers')
+license=('MIT')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/hashcat/hashcat/archive/v${pkgver}.tar.gz
+ ${pkgname}-${pkgver}.tar.gz.asc::https://hashcat.net/files/v${pkgver}.tar.gz.asc
+ makefile.patch)
+sha512sums=('cdaf00830a1f4b52b008c5c6499cd6246eb328a1711be1446ea7b8b3d6ad9afeb9f3626cf9cef58a04b4a414d10e09e5a8429bc47684a9d6dbf511effbc2eedb'
+ 'SKIP'
+ 'be389cce5f325437b965c755819c09d6b997c534caebd74a947659f8d950e9b3cee365c993928c5522188e53412156eb64218dd844952125de96e7b764716a7d')
+validpgpkeys=('A70833229D040B4199CC00523C17DA8B8A16544F') # Hashcat signing key <signing@hashcat.net>
+
+prepare() {
+ cd ${pkgname}-${pkgver}
+ patch -p1 < "${srcdir}/makefile.patch"
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ make PREFIX=/usr
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" PREFIX=/usr install
+ install -Dm 644 docs/license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+# vim: ts=2 sw=2 et:
diff --git a/libre/hashcat/makefile.patch b/libre/hashcat/makefile.patch
new file mode 100644
index 000000000..7e1730d47
--- /dev/null
+++ b/libre/hashcat/makefile.patch
@@ -0,0 +1,41 @@
+From 7f8aaf74302816d03fbff62dab5c987d498acdde Mon Sep 17 00:00:00 2001
+From: anthraxx <levente@leventepolyak.net>
+Date: Mon, 4 Jul 2016 21:01:51 +0200
+Subject: [PATCH] extend global CFLAGS and LDFLAGS to aid distro packaging
+
+This preserves globally defined CFLAGS and LDFLAGS and simply
+extends those variables to aid distro based packaging toolchains
+and predefined distro wide defaults like SSP, relro etc.
+---
+ src/Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 9f11325..cf44590 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -90,7 +90,7 @@ VERSION_TAG := $(shell test -d .git && git describe --tags --dirty=
+ ## Compiler flags
+ ##
+
+-CFLAGS := -pipe -W -Wall -std=c99 -Iinclude/ -IOpenCL/ -I$(OPENCL_HEADERS_KHRONOS)/
++CFLAGS += -pipe -W -Wall -std=c99 -Iinclude/ -IOpenCL/ -I$(OPENCL_HEADERS_KHRONOS)/
+
+ ifndef DEBUG
+ CFLAGS += -O2
+@@ -112,6 +112,7 @@ export MACOSX_DEPLOYMENT_TARGET=10.9
+ CFLAGS_NATIVE := -D_POSIX -DDARWIN
+ CFLAGS_NATIVE += $(CFLAGS)
+ LFLAGS_NATIVE := -lpthread
++LFLAGS_NATIVE += $(LDFLAGS)
+ endif # darwin
+
+ ifeq ($(UNAME),Linux)
+@@ -122,6 +123,7 @@ endif
+ CFLAGS_NATIVE += $(CFLAGS)
+ LFLAGS_NATIVE := -lpthread -ldl
+ CFLAGS_NATIVE += -DHAVE_HWMON
++LFLAGS_NATIVE += $(LDFLAGS)
+ endif # linux
+
+ ##