updated on Wed Jan 25 20:08:56 UTC 2012
[aur-mirror.git] / cl-trivial-backtrace-git / PKGBUILD
blobbbce2115bfa378e3369d060a9370df821da02c21
1 # Maintainer:  mrshpot <mrshpot at gmail dot com>
2 # Contributor:  veox <box 55 [shift-two] mail [dot] ru>
4 pkgname=cl-trivial-backtrace-git
5 _clname=trivial-backtrace   # used in CL scope, not package scope
6 pkgver=20101120
7 pkgrel=1
8 pkgdesc="A library to display backtraces portably across Common Lisp implementations"
9 arch=('i686' 'x86_64')
10 url="http://common-lisp.net/project/trivial-backtrace/"
11 license=('LGPL')
12 provides=('cl-trivial-backtrace')
14 # TODO: replace this segment with 'common-lisp' when all provide it.
15 if pacman -Qq clisp-new-clx &>/dev/null; then
16     depends=('clisp-new-clx' 'cl-asdf')
17 elif pacman -Qq clisp-gtk2 &>/dev/null; then
18     depends=('clisp-gtk2' 'cl-asdf')
19 elif pacman -Qq sbcl &>/dev/null; then
20     depends=('sbcl')
21 elif pacman -Qq clisp &>/dev/null; then
22     depends=('clisp' 'cl-asdf')
23 elif pacman -Qq cmucl &>/dev/null; then
24     depends=('cmucl' 'cl-asdf')
25 else
26     depends=('sbcl')
28 makedepends=('git') 
30 install=cl-trivial-backtrace.install
31 source=()
32 md5sums=()
33 options=('docs')
35 _gitroot="http://common-lisp.net/project/trivial-backtrace/trivial-backtrace.git"
36 _gitname="cl-trivial-backtrace"
39 build() {
41   cat << EOM
43         WARNING!
45         You are about to build a package using a snapshot from a repository.
46         The resulting package may be unusable or pose a security risk, since
47         the install script does not check source file hashes. Do not continue
48         if this is undesirable.
50 EOM
52   install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}
53   install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/dev
54   install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/test
55   install -d ${pkgdir}/usr/share/common-lisp/systems
56   install -d ${pkgdir}/usr/share/licenses/${pkgname}
58         ### Git checkout
59   cd "$srcdir"
60   msg "Connecting to GIT server...."
62   if [ -d $_gitname ] ; then
63     cd $_gitname && git pull origin
64     msg "The local files are updated."
65   else
66     git clone $_gitroot $_gitname
67   fi
68   cd "$srcdir/$_gitname"
69   
70   msg "GIT checkout done or server timeout"
72   install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/dev \
73     dev/*
74   install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/test \
75     test/*
76   install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} \
77     *.asd
79   cd ${pkgdir}/usr/share/common-lisp/systems
80   ln -s ../source/${_clname}/${_clname}.asd .