updated on Sat Jan 21 16:18:39 UTC 2012
[aur-mirror.git] / apkg-git / PKGBUILD
blobeedcb00dd8efa237e5ae385eb7499ee315211260
1 # Maintainer: strake <strake888@gmail.com>
2 pkgname=apkg-git
3 pkgver=20111126
4 pkgrel=1
5 pkgdesc="Fetch, build, install packages and those they need, deeply"
6 arch=('any')
7 url="https://gitorious.org/apkg"
8 license=('GPL')
9 groups=()
10 depends=('zlib' 'curl' 'gmp' 'libssh2' 'glibc' 'package-query')
11 makedepends=('git' 'ghc' 'haskell-tar' 'haskell-zlib' 'haskell-monad-control' 'haskell-control-monad-failure' 'haskell-transformers' 'haskell-mtl' 'haskell-bytestring' 'haskell-split' 'haskell-containers' 'haskell-archlinux' 'haskell-cabal' 'haskell-curl' 'haskell-http' 'haskell-directory' 'haskell-unix' 'haskell-temporary' 'haskell-process' 'haskell-parsec')
12 provides=('apkg')
13 conflicts=('apkg')
14 replaces=()
15 backup=()
16 options=()
17 install=
18 source=()
19 noextract=()
20 md5sums=() #generate with 'makepkg -g'
22 _gitroot="git://gitorious.org/apkg/apkg.git"
23 _gitname=apkg
25 build() {
26   cd "$srcdir"
27   msg "Connecting to GIT server...."
29   if [[ -d "$_gitname" ]]; then
30     cd "$_gitname" && git pull origin
31     msg "The local files are updated."
32   else
33     git clone "$_gitroot" "$_gitname"
34   fi
36   msg "GIT checkout done or server timeout"
37   msg "Starting build..."
39   rm -rf "$srcdir/$_gitname-build"
40   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
41   cd "$srcdir/$_gitname-build"
43   make
46 package() {
47   cd "$srcdir/$_gitname-build"
48   git clone https://github.com/archhaskell/cabal2arch.git
49   mkdir -p "${pkgdir}/usr/bin/"
50   cp apkg "${pkgdir}/usr/bin/"
51   mkdir -p "${pkgdir}/usr/share/man/man8/"
52   gzip apkg.8
53   cp apkg.8.gz "${pkgdir}/usr/share/man/man8/"
54   mkdir -p "${pkgdir}/usr/share/apkg/cabal"
55   cp cabal2arch/data/*.txt "${pkgdir}/usr/share/apkg/cabal/"