updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / cl-closer-mop-darcs / PKGBUILD
blobb263a04649170ce65c609dadfff7e1a3d59d965e
1 # Maintainer: mrshpot <mrshpot at gmail dot com>
2 # Contributor:  veox <box 55 [shift-two] mail [dot] ru>
4 pkgname=cl-closer-mop-darcs
5 _clname=closer-mop   # used in CL scope, not package scope
6 pkgver=20090809
7 pkgrel=1
8 pkgdesc="A compatibility layer for the CLOS MOP that rectifies many of the absent MOP features as detected by MOP Feature Tests."
9 arch=('i686' 'x86_64')
10 url="http://common-lisp.net/project/closer/"
11 license=('MIT')
12 provides=('cl-closer-mop')
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=('darcs') 
30 install=cl-closer-mop.install
31 source=()
32 md5sums=()
33 options=('docs')
35 _repo=${url}repos/${_clname}
37 build() {
39     cat << EOM
41         WARNING!
43         You are about to build a package using a snapshot from a repository.
44         The resulting package may be unusable or pose a security risk, since
45         the install script does not check source file hashes. Do not continue
46         if this is undesirable.
48 EOM
50         install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/test
52         install -d ${pkgdir}/usr/share/common-lisp/systems
54         cd ${srcdir}
55         echo "Getting source from darcs repository at ${_repo}" | fmt
56         if [ -d ${_clname} ]; then  # already pulled once, update instead
57           cd ${_clname}
58           darcs pull || return 1
59         else
60           darcs get ${_repo} || return 1
61           cd ${_clname} || return 1
62         fi
64         
65         install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/test/ \
66           test/*
67         install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/ \
68           *.lisp
70 # docs
71         install -d ${pkgdir}/usr/share/doc/${_clname}
72         install -m 644 -t ${pkgdir}/usr/share/doc/${_clname}/ \
73           *.txt
75         install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} \
76           *.asd
78         cd ${pkgdir}/usr/share/common-lisp/systems
79         ln -s ../source/${_clname}/${_clname}.asd .