updated on Fri Jan 20 12:03:34 UTC 2012
[aur-mirror.git] / hashcat / PKGBUILD
blob7e19c06152a615eb088de8fc39d96b450c4c6690
1 # Maintainer: Stefan Seering <stefanarch@gmx.de>
2 pkgname='hashcat'
3 pkgver='0.38'
4 pkgrel='1'
5 pkgdesc='Multithreaded cross platform hash cracker.'
6 arch=('i686' 'x86_64')
7 url='http://hashcat.net/hashcat/'
8 license=('Proprietary. Run with --eula for details. The author gave explicit permission for hashcat to be packages for Archlinux on 01.11.2011.')
9 makedepends=('p7zip')
10 depends=('glibc')
12 build() {
13   local hcURL='http://hashcat.net/files/download.php?proj=hashcat'
14   local hcFile="${pkgname}-${pkgver}.7z"
16   cd "${srcdir}"
18   # The developers of hashcat introduced a cookie based obscurfaction to the download of hashcat as 
19   # their website was under high load from leechers. Therefore downloading hashcat is a little complicated
20   rm -f ./cookiefile
21   wget -O /dev/null --save-cookies ./cookiefile "${hcURL}"
22   wget -O "${hcFile}" --load-cookies ./cookiefile "${hcURL}"
23   rm ./cookiefile
25   7z x "${hcFile}"
28 package() {
29   cd "${srcdir}/${pkgname}-${pkgver}"
31   rm *.exe
33   if [ "${CARCH}" = 'x86_64' ] ; then
34         mv hashcat-cli64.bin hashcat
35   else  
36         mv hashcat-cli32.bin hashcat
37   fi
38   rm *.bin
40   mkdir -p "${pkgdir}/usr/bin"
41   mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
42   mkdir -p "${pkgdir}/etc/${pkgname}"
43   
44   cp hashcat "${pkgdir}/usr/bin"
45   cp docs/*      "${pkgdir}/usr/share/doc/${pkgname}"
46   cp -r examples "${pkgdir}/usr/share/doc/${pkgname}"
47   cp -r rules     "${pkgdir}/etc/${pkgname}"
48   cp -r salts     "${pkgdir}/etc/${pkgname}"
49   cp -r tables    "${pkgdir}/etc/${pkgname}"
51   cd "${pkgdir}"
52   # the 7z archive causes the wrong file permissions to be set and the automation of pacman/makepkg wont handle it properly in this case
53   find . -type d -exec chmod 755 {} \+
54   find . -type f -exec chmod 644 {} \+
55   chmod a+x "${pkgdir}/usr/bin/hashcat"
58 # vim:set ts=2 sw=2 et: