diff options
author | Peter Mukhachev | 2015-07-21 15:36:55 +0300 |
---|---|---|
committer | Peter Mukhachev | 2015-07-21 15:47:34 +0300 |
commit | a8132f7a8993a1ec77f86bc9d760fe611bc15b2e (patch) | |
tree | c552257188d58de4c40bf1addedccf14f1d17ce1 | |
download | aur-a8132f7a8993a1ec77f86bc9d760fe611bc15b2e.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | cl-named-readtables-git.install | 76 |
3 files changed, 136 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..363c35a7afaa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = cl-named-readtables-git + pkgdesc = Named-Readtables is a library that provides a namespace for readtables akin to the already-existing namespace of packages. + pkgver = r69.ee15fc6 + pkgrel = 1 + url = git://github.com/trivial-gray-streams/trivial-gray-streams + install = cl-named-readtables-git.install + arch = i686 + arch = x86_64 + license = BSD + makedepends = git + depends = common-lisp + provides = cl-named-readtables + source = git+https://github.com/melisgl/named-readtables.git + md5sums = SKIP + +pkgname = cl-named-readtables-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7daed1ee3f3f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +#Contributor: Peter Mukhachev <rolling[dot]robot [shift-two] gmail [dot] com> + +pkgname=cl-named-readtables-git +_clname=named-readtables # used in CL scope, not package scope +_reldate=20140815 +pkgver=r69.ee15fc6 +pkgrel=1 +pkgdesc="Named-Readtables is a library that provides a namespace for +readtables akin to the already-existing namespace of packages." +arch=('i686' 'x86_64') +url=("git://github.com/trivial-gray-streams/trivial-gray-streams") +license=('BSD') +depends=('common-lisp') +provides=('cl-named-readtables') +makedepends=('git') +install=${pkgname}.install +_gitname=("named-readtables") +source=('git+https://github.com/melisgl/named-readtables.git') +md5sums=('SKIP') +pkgver() { + cd ${_gitname} + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + } +package() { + + cd "${_gitname}" + install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/src + install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/test + install -d ${pkgdir}/usr/share/common-lisp/systems + install -d ${pkgdir}/usr/share/licenses/${pkgname} + + install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/src \ + ${srcdir}/${_clname}/src/*.lisp + install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname}/test \ + ${srcdir}/${_clname}/test/*.lisp + install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${_clname} \ + ${srcdir}/${_clname}/*.asd + install -m 644 -t ${pkgdir}/usr/share/licenses/${pkgname} \ + ${srcdir}/${_clname}/LICENSE + + cd ${pkgdir}/usr/share/common-lisp/systems + ln -s ../source/${_clname}/${_clname}.asd . +} diff --git a/cl-named-readtables-git.install b/cl-named-readtables-git.install new file mode 100644 index 000000000000..eefbe4ddcc57 --- /dev/null +++ b/cl-named-readtables-git.install @@ -0,0 +1,76 @@ +# arg 1: the new package version + +_pkgname=named-readtables +_compile_log=n +_lisp=() + +if pacman -Qq clisp-new-clx &>/dev/null || + pacman -Qq clisp-gtk2 &>/dev/null || + pacman -Qq clisp-new-clx &>/dev/null; then + _lisp=(${_lisp[@]} 'clisp') +fi +if pacman -Qq sbcl &>/dev/null; then + _lisp=(${_lisp[@]} 'sbcl') +fi +if pacman -Qq cmucl &> /dev/null; then + _lisp=(${_lisp[@]} 'cmucl') +fi + +_compile_sbcl() { + sbcl --noinform --no-sysinit --no-userinit \ + --eval "(require :asdf)" \ + --eval "(pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)" \ + --eval "(asdf:operate 'asdf:compile-op '${_pkgname})" \ + --eval "(quit)" &> ${_compile_log_file} || return 1 +} +_compile_clisp() { + clisp --silent -norc -x \ + "(load #p\"/usr/share/common-lisp/source/asdf/asdf\") + (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal) + (asdf:operate 'asdf:compile-op '${_pkgname}) + (quit)" &> ${_compile_log_file} || return 1 +} +_compile_cmucl() { + cmucl -quiet -nositeinit -noinit -eval \ + "(load #p\"/usr/share/common-lisp/source/asdf/asdf\") + (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal) + (asdf:operate 'asdf:compile-op '${_pkgname}) + (quit)" &> ${_compile_log_file} || return 1 +} + +post_install() { + for _lispiter in ${_lisp[@]}; do + echo "---> Compiling lisp files using ${_lispiter} <---" + if [ $_compile_log = 'y' ]; then + _compile_log_file=/tmp/${_pkgname}_${_lispiter}.log + else + _compile_log_file=/dev/null + fi + _compile_${_lispiter} + echo "---> Done compiling lisp files (using ${_lispiter}) <---" + done + + cat << EOM + + To load this library, load asdf and then run the following lines + (or their equivalent for your lisp of choice): + + (push #p"/usr/share/common-lisp/systems/" asdf:*central-registry*) + (asdf:operate 'asdf:load-op '${_pkgname}) +EOM +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + rm -f /usr/share/common-lisp/source/${_pkgname}/{*.fas,*.fasl,*.lib,*.x86f} +} + +op=$1 +shift + +$op $* + +# End of file |