summaryrefslogtreecommitdiff
path: root/community/chntpw/PKGBUILD
blob: bbbc62e13dc6b3d876cd7ffee4bc665a8503b09e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# $Id: PKGBUILD 48999 2011-06-09 15:13:27Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>

pkgname=chntpw
pkgver=110511
pkgrel=1
pkgdesc='Offline NT Password Editor - reset passwords in a Windows NT SAM userdatabase file'
arch=('i686' 'x86_64')
url='http://pogostick.net/~pnh/ntpasswd/'
license=('GPL' 'LGPL')
makedepends=('openssl')
source=("http://pogostick.net/~pnh/ntpasswd/${pkgname}-source-${pkgver}.zip")
md5sums=('a3fb358d1adec589cd6bc8dedf68896c')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  [ "$CARCH" = "x86_64" ] && sed -i "s|CFLAGS= -DUSEOPENSSL -g -I. -I\$(OSSLINC) -Wall -m32|CFLAGS= -DUSEOPENSSL -g -I. -I\$(OSSLINC) -Wall|" Makefile
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # install binaries, don't install static binaries!
  install -Dm0755 "${srcdir}/${pkgname}-${pkgver}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
  install -Dm0755 "${srcdir}/${pkgname}-${pkgver}/reged" "${pkgdir}/usr/bin/reged"
  install -Dm0755 "${srcdir}/${pkgname}-${pkgver}/cpnt" "${pkgdir}/usr/bin/cpnt"

  for _f in *.txt; do
    install -Dm0644 "${_f}" "${pkgdir}/usr/share/doc/${pkgname}/${_f}"
  done
}