updated on Wed Jan 18 16:10:53 UTC 2012
[aur-mirror.git] / openbsd-pdksh-git / PKGBUILD
blob7d93034f646ad039800187dca32b9f199ba8e62a
1 # Maintainer: Andrew Antle <andrew dot antle at gmail dot com>
3 pkgname=openbsd-pdksh-git
4 pkgver=20111202
5 pkgrel=1
6 pkgdesc="Portable version of OpenBSD's ksh, git version"
7 arch=('i686' 'x86_64')
8 url="http://github.com/dryfish/openbsd-pdksh"
9 license=('custom')
10 makedepends=('git')
11 provides=('pdksh' 'ksh')
12 conflicts=('pdksh' 'ksh')
13 install=$pkgname.install
15 _gitroot="http://github.com/dryfish/openbsd-pdksh.git"
16 _gitname="openbsd-pdksh"
18 build() {
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"
29   msg "Starting make..."
31   rm -rf "$srcdir/$_gitname-build"
32   git clone "$srcdir/$_gitname"{,-build}
33   cd "$srcdir/$_gitname-build"
35   sh ./autogen.sh
36   ./configure --prefix=/ --mandir=/usr/share/man
37   make
40 package() {
41   cd "$_gitname-build"
43   make prefix="$pkgdir" mandir="$pkgdir/usr/share/man/man1" install
45   install -D -m644 src/bin/ksh/ksh.1 "$pkgdir/usr/share/man/man1/ksh.1"
46   install -D -m644 src/bin/ksh/LEGAL "$pkgdir/usr/share/licenses/$pkgname/LICENSE"