updated on Mon Jan 16 20:00:43 UTC 2012
[aur-mirror.git] / cl-javascript-git / PKGBUILD
blob81871dacdea69698b704c571023bff47ba8c108a
1 # Maintainer:  mrshpot <mrshpot at gmail dot com>
3 pkgname=cl-javascript-git
4 _clname=cl-js   # used in CL scope, not package scope
5 pkgver=20101213
6 pkgrel=1
7 pkgdesc="CL-JavaScript allows you to add user scripting to your Common Lisp application"
8 arch=('i686' 'x86_64')
9 url="http://marijnhaverbeke.nl/cl-javascript/"
10 license=('custom')
11 provides=('cl-js' 'cl-javascript')
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' 'cl-parse-js' 'cl-ppcre')
16 elif pacman -Qq clisp-gtk2 &>/dev/null; then
17     depends=('clisp-gtk2' 'cl-asdf' 'cl-parse-js' 'cl-ppcre')
18 elif pacman -Qq sbcl &>/dev/null; then
19     depends=('sbcl' 'cl-parse-js' 'cl-ppcre')
20 elif pacman -Qq clisp &>/dev/null; then
21     depends=('clisp' 'cl-asdf' 'cl-parse-js' 'cl-ppcre')
22 elif pacman -Qq cmucl &>/dev/null; then
23     depends=('cmucl' 'cl-asdf' 'cl-parse-js' 'cl-ppcre')
24 else
25     depends=('sbcl' 'cl-parse-js' 'cl-ppcre')
27 optdepends=('cl-local-time: for the Date implementation')
28 makedepends=('git') 
30 install=cl-javascript.install
31 source=()
32 md5sums=()
33 options=('docs')
35 _gitroot="https://github.com/akapav/js.git"
36 _gitname="cl-js"
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/systems
54   install -d ${pkgdir}/usr/share/licenses/${pkgname}
55   install -d ${pkgdir}/usr/share/doc/${pkgname}
56   
57         ### Git checkout
58   cd "$srcdir"
59   msg "Connecting to GIT server...."
61   if [ -d $_gitname ] ; then
62     cd $_gitname && git pull origin
63     msg "The local files are updated."
64   else
65     git clone $_gitroot $_gitname
66   fi
67   cd "$srcdir/$_gitname"
68   
69   msg "GIT checkout done or server timeout"
71   install -m 644 -t ${pkgdir}/usr/share/licenses/${pkgname} LICENSE
72   install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} \
73     *.lisp
74   install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} \
75     *.asd
76   install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} \
77     *.js
78   install -m 644 -t ${pkgdir}/usr/share/doc/${pkgname} index.html
79   install -m 644 -t ${pkgdir}/usr/share/doc/${pkgname} README.md
81   cd ${pkgdir}/usr/share/common-lisp/systems
82   ln -s ../source/${_clname}/${_clname}.asd .