updated on Wed Jan 25 12:16:47 UTC 2012
[aur-mirror.git] / cl-parse-js-git / PKGBUILD
blobb7a8b011f3a8fb5a32cb2672e930910bd8178200
1 # Maintainer:  mrshpot <mrshpot at gmail dot com>
3 pkgname=cl-parse-js-git
4 _clname=parse-js   # used in CL scope, not package scope
5 pkgver=20101213
6 pkgrel=1
7 pkgdesc="A Javascript parser in Common Lisp"
8 arch=('i686' 'x86_64')
9 url="http://marijnhaverbeke.nl/parse-js/"
10 license=('custom')
11 provides=('cl-parse-js')
13 # TODO: replace this segment with 'common-lisp' when all provide it.
14 if pacman -Qq clisp-new-clx &>/dev/null; then
15     depends=('clisp-new-clx' 'cl-asdf')
16 elif pacman -Qq clisp-gtk2 &>/dev/null; then
17     depends=('clisp-gtk2' 'cl-asdf')
18 elif pacman -Qq sbcl &>/dev/null; then
19     depends=('sbcl')
20 elif pacman -Qq clisp &>/dev/null; then
21     depends=('clisp' 'cl-asdf')
22 elif pacman -Qq cmucl &>/dev/null; then
23     depends=('cmucl' 'cl-asdf')
24 else
25     depends=('sbcl')
27 makedepends=('git') 
29 install=cl-parse-js.install
30 source=()
31 md5sums=()
32 options=('docs')
34 _gitroot="http://marijnhaverbeke.nl/git/parse-js"
35 _gitname="cl-parse-js"
38 build() {
40   cat << EOM
42         WARNING!
44         You are about to build a package using a snapshot from a repository.
45         The resulting package may be unusable or pose a security risk, since
46         the install script does not check source file hashes. Do not continue
47         if this is undesirable.
49 EOM
51   install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/src
52   install -d ${pkgdir}/usr/share/common-lisp/systems
53   install -d ${pkgdir}/usr/share/licenses/${pkgname}
54   install -d ${pkgdir}/usr/share/doc/${pkgname}
55   
56         ### Git checkout
57   cd "$srcdir"
58   msg "Connecting to GIT server...."
60   if [ -d $_gitname ] ; then
61     cd $_gitname && git pull origin
62     msg "The local files are updated."
63   else
64     git clone $_gitroot $_gitname
65   fi
66   cd "$srcdir/$_gitname"
67   
68   msg "GIT checkout done or server timeout"
70   install -m 644 -t ${pkgdir}/usr/share/licenses/${pkgname} LICENSE
71   install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/src \
72     src/*.lisp
73   install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} \
74     *.asd
75   install -m 644 -t ${pkgdir}/usr/share/doc/${pkgname} index.html
77   cd ${pkgdir}/usr/share/common-lisp/systems
78   ln -s ../source/${_clname}/${_clname}.asd .