From 7464a5736ee375984a4feda0376278ea82c3e59a Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Sat, 29 Dec 2018 11:00:14 +0100 Subject: [PATCH 1/6] Initial package. --- .SRCINFO | 19 +++++++++++++++++++ PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ cuda.patch | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD create mode 100644 cuda.patch diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..b21e4ef --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = hashclash-git + pkgdesc = Project HashClash - MD5 & SHA-1 cryptanalysis + pkgver = r45.c1159e9 + pkgrel = 1 + url = https://github.com/cr-marcstevens/hashclash + arch = x86_64 + license = GPL + makedepends = git + makedepends = boost + depends = boost-libs + provides = hashclash + conflicts = hashclash + source = hashclash::git+https://github.com/cr-marcstevens/hashclash + source = cuda.patch + md5sums = SKIP + md5sums = e50c821804f404ed10ccecc790382f8f + +pkgname = hashclash-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..b540f11 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# This is an example PKGBUILD file. Use this as a start to creating your own, +# and remove these comments. For more information, see 'man PKGBUILD'. +# NOTE: Please fill out the license field for your package! If it is unknown, +# then please put 'unknown'. + +# The following guidelines are specific to BZR, GIT, HG and SVN packages. +# Other VCS sources are not natively supported by makepkg yet. + +# Maintainer: Your Name +pkgname=hashclash-git +pkgver=r45.c1159e9 +pkgrel=1 +pkgdesc="Project HashClash - MD5 & SHA-1 cryptanalysis " +arch=(x86_64) +url="https://github.com/cr-marcstevens/hashclash" +license=('GPL') +depends=(boost-libs) +makedepends=('git' 'boost') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=("${pkgname%-git}::git+https://github.com/cr-marcstevens/hashclash" + "cuda.patch") +md5sums=('SKIP' + 'e50c821804f404ed10ccecc790382f8f') + +# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for +# a description of each element in the source array. + +prepare() { + cd "$srcdir/${pkgname%-git}" + patch -p1 < "$srcdir/cuda.patch" +} + +pkgver() { + cd "$srcdir/${pkgname%-git}" + +# Git, no tags available + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/${pkgname%-git}" + autoreconf --install + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/${pkgname%-git}" + make DESTDIR="$pkgdir/" install +} diff --git a/cuda.patch b/cuda.patch new file mode 100644 index 0000000..a18d797 --- /dev/null +++ b/cuda.patch @@ -0,0 +1,32 @@ +diff --git a/m4/ax_cuda.m4 b/m4/ax_cuda.m4 +index f9d9f8e..82646b0 100644 +--- a/m4/ax_cuda.m4 ++++ b/m4/ax_cuda.m4 +@@ -88,17 +88,9 @@ then + # test if nvcc version is >= 2.3 + NVCC_VERSION=`$NVCC --version | grep release | awk 'gsub(/,/, "") {print [$]5}'` + AC_MSG_RESULT([nvcc version : $NVCC_VERSION]) +- ++ + # test if architecture is 64 bits and NVCC version >= 2.3 + libdir=lib +- AX_COMPARE_VERSION([$NVCC_VERSION],[gt],[2.2],[ +- if test "x$host_cpu" = xx86_64 ; then +- libdir=lib64 +- fi +- if test "x$host_cpu" = xpowerpc64le ; then +- libdir=lib64 +- fi +- ]) + + # set CUDA flags + if test -n "$cuda_home_path" +@@ -163,7 +155,7 @@ then + + CPPFLAGS=$saved_CPPFLAGS + LIBS=$saved_LIBS +-fi ++fi + + have_cuda="no" + if test "$want_cuda" != "no" -a "$have_cuda_headers" = "yes" -a "$have_cuda_libs" = "yes" -a "$have_nvcc" = "yes" From 05e7fb62d9ad74a99dfe7c4637e7c28494be184f Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Sat, 29 Dec 2018 11:06:36 +0100 Subject: [PATCH 2/6] Fix License --- .SRCINFO | 4 ++-- PKGBUILD | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index b21e4ef..9e35f06 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,10 +1,10 @@ pkgbase = hashclash-git pkgdesc = Project HashClash - MD5 & SHA-1 cryptanalysis pkgver = r45.c1159e9 - pkgrel = 1 + pkgrel = 2 url = https://github.com/cr-marcstevens/hashclash arch = x86_64 - license = GPL + license = MIT makedepends = git makedepends = boost depends = boost-libs diff --git a/PKGBUILD b/PKGBUILD index b540f11..e1d7785 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,11 +9,11 @@ # Maintainer: Your Name pkgname=hashclash-git pkgver=r45.c1159e9 -pkgrel=1 +pkgrel=2 pkgdesc="Project HashClash - MD5 & SHA-1 cryptanalysis " arch=(x86_64) url="https://github.com/cr-marcstevens/hashclash" -license=('GPL') +license=('MIT') depends=(boost-libs) makedepends=('git' 'boost') provides=("${pkgname%-git}") @@ -48,4 +48,5 @@ build() { package() { cd "$srcdir/${pkgname%-git}" make DESTDIR="$pkgdir/" install + install -D "$srcdir/${pkgname%-git}/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } From 70d1e542a7da8facb9ea988a0b92ddd49f3193ef Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Sat, 29 Dec 2018 11:07:01 +0100 Subject: [PATCH 3/6] Remove example comments. --- PKGBUILD | 8 -------- 1 file changed, 8 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index e1d7785..79f329c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,11 +1,3 @@ -# This is an example PKGBUILD file. Use this as a start to creating your own, -# and remove these comments. For more information, see 'man PKGBUILD'. -# NOTE: Please fill out the license field for your package! If it is unknown, -# then please put 'unknown'. - -# The following guidelines are specific to BZR, GIT, HG and SVN packages. -# Other VCS sources are not natively supported by makepkg yet. - # Maintainer: Your Name pkgname=hashclash-git pkgver=r45.c1159e9 From b8b7c658ccc2641a4191bca8aac6617e08c314ef Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Sat, 29 Dec 2018 11:16:44 +0100 Subject: [PATCH 4/6] Include example scripts. --- .SRCINFO | 2 +- PKGBUILD | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.SRCINFO b/.SRCINFO index 9e35f06..1980e1a 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = hashclash-git pkgdesc = Project HashClash - MD5 & SHA-1 cryptanalysis pkgver = r45.c1159e9 - pkgrel = 2 + pkgrel = 3 url = https://github.com/cr-marcstevens/hashclash arch = x86_64 license = MIT diff --git a/PKGBUILD b/PKGBUILD index 79f329c..fd62fd8 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Your Name pkgname=hashclash-git pkgver=r45.c1159e9 -pkgrel=2 +pkgrel=3 pkgdesc="Project HashClash - MD5 & SHA-1 cryptanalysis " arch=(x86_64) url="https://github.com/cr-marcstevens/hashclash" @@ -41,4 +41,6 @@ package() { cd "$srcdir/${pkgname%-git}" make DESTDIR="$pkgdir/" install install -D "$srcdir/${pkgname%-git}/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -d "$pkgdir/usr/share/${pkgname%-git}/scripts" + install -Dt "$pkgdir/usr/share/${pkgname%-git}/scripts" -m755 scripts/* } From b5e82ed60be6dd38585a8f01f9034bf27c4e49bc Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Sun, 30 Dec 2018 12:20:37 +0100 Subject: [PATCH 5/6] Maintainer email. --- PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKGBUILD b/PKGBUILD index fd62fd8..769a27f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,4 +1,4 @@ -# Maintainer: Your Name +# Maintainer: Bert Peters pkgname=hashclash-git pkgver=r45.c1159e9 pkgrel=3 From 84675c66cdc3248336b51fa13765ba3cbcd048e2 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Mon, 21 Jan 2019 20:59:51 +0100 Subject: [PATCH 6/6] Upstream fixed the configure problem, no need to patch. --- .SRCINFO | 6 ++---- PKGBUILD | 18 ++++-------------- cuda.patch | 32 -------------------------------- 3 files changed, 6 insertions(+), 50 deletions(-) delete mode 100644 cuda.patch diff --git a/.SRCINFO b/.SRCINFO index 1980e1a..ea9b6ea 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = hashclash-git pkgdesc = Project HashClash - MD5 & SHA-1 cryptanalysis - pkgver = r45.c1159e9 - pkgrel = 3 + pkgver = r46.d833657 + pkgrel = 1 url = https://github.com/cr-marcstevens/hashclash arch = x86_64 license = MIT @@ -11,9 +11,7 @@ pkgbase = hashclash-git provides = hashclash conflicts = hashclash source = hashclash::git+https://github.com/cr-marcstevens/hashclash - source = cuda.patch md5sums = SKIP - md5sums = e50c821804f404ed10ccecc790382f8f pkgname = hashclash-git diff --git a/PKGBUILD b/PKGBUILD index 769a27f..763f814 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Bert Peters pkgname=hashclash-git -pkgver=r45.c1159e9 -pkgrel=3 +pkgver=r46.d833657 +pkgrel=1 pkgdesc="Project HashClash - MD5 & SHA-1 cryptanalysis " arch=(x86_64) url="https://github.com/cr-marcstevens/hashclash" @@ -10,18 +10,8 @@ depends=(boost-libs) makedepends=('git' 'boost') provides=("${pkgname%-git}") conflicts=("${pkgname%-git}") -source=("${pkgname%-git}::git+https://github.com/cr-marcstevens/hashclash" - "cuda.patch") -md5sums=('SKIP' - 'e50c821804f404ed10ccecc790382f8f') - -# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for -# a description of each element in the source array. - -prepare() { - cd "$srcdir/${pkgname%-git}" - patch -p1 < "$srcdir/cuda.patch" -} +source=("${pkgname%-git}::git+https://github.com/cr-marcstevens/hashclash") +md5sums=('SKIP') pkgver() { cd "$srcdir/${pkgname%-git}" diff --git a/cuda.patch b/cuda.patch deleted file mode 100644 index a18d797..0000000 --- a/cuda.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/m4/ax_cuda.m4 b/m4/ax_cuda.m4 -index f9d9f8e..82646b0 100644 ---- a/m4/ax_cuda.m4 -+++ b/m4/ax_cuda.m4 -@@ -88,17 +88,9 @@ then - # test if nvcc version is >= 2.3 - NVCC_VERSION=`$NVCC --version | grep release | awk 'gsub(/,/, "") {print [$]5}'` - AC_MSG_RESULT([nvcc version : $NVCC_VERSION]) -- -+ - # test if architecture is 64 bits and NVCC version >= 2.3 - libdir=lib -- AX_COMPARE_VERSION([$NVCC_VERSION],[gt],[2.2],[ -- if test "x$host_cpu" = xx86_64 ; then -- libdir=lib64 -- fi -- if test "x$host_cpu" = xpowerpc64le ; then -- libdir=lib64 -- fi -- ]) - - # set CUDA flags - if test -n "$cuda_home_path" -@@ -163,7 +155,7 @@ then - - CPPFLAGS=$saved_CPPFLAGS - LIBS=$saved_LIBS --fi -+fi - - have_cuda="no" - if test "$want_cuda" != "no" -a "$have_cuda_headers" = "yes" -a "$have_cuda_libs" = "yes" -a "$have_nvcc" = "yes"