updated on Mon Jan 23 20:11:11 UTC 2012
[aur-mirror.git] / xkcd-password-generator-git / PKGBUILD
blob4e0f339a75667ee579ffd55f72d85fdd3c3e146c
1 # Maintainer: Spencer Judd <spencercjudd@gmail.com>
3 pkgname=xkcd-password-generator-git
4 pkgver=20120123
5 pkgrel=1
6 pkgdesc="A simple command line script that generates XKCD-style multiword passwords."
7 arch=('any')
8 url="https://github.com/redacted/XKCD-password-generator"
9 license=('BSD')
10 depends=('python2' 'words')
11 makedepends=('git')
12 provides=('xkcd-password-generator')
14 _gitroot="git://github.com/redacted/XKCD-password-generator.git"
15 _gitname="xkcd-password-generator"
17 build() {
18     cd ${srcdir}
19     msg "Connecting to GIT server...."
21     if [ -d ${_gitname} ]; then
22         cd ${_gitname} && git pull origin
23         msg "The local files are updated."
24     else
25         git clone ${_gitroot} ${_gitname}
26     fi
28     msg "GIT checkout done or server timeout."
30     sed -i "s/^#\!\/usr\/bin\/env python$/#\!\/usr\/bin\/env python2/g" "${srcdir}/${_gitname}/xkcd-password.py"
33 package() {
34     install -D -m755 ${srcdir}/${_gitname}/xkcd-password.py ${pkgdir}/usr/bin/xkcd-password
35     install -D -m644 ${srcdir}/${_gitname}/2of12.txt ${pkgdir}/usr/share/dict/2of12
36     install -D -m644 ${srcdir}/${_gitname}/3esl.txt ${pkgdir}/usr/share/dict/3esl