diff options
author | Sven Schneider | 2012-10-08 22:48:57 +0200 |
---|---|---|
committer | Sven Schneider | 2012-10-08 22:48:57 +0200 |
commit | 24f758390808c2ed50d1a904fedcb998c783c71e (patch) | |
tree | 76d89be06c833a7da0287e99a7c3812ee8bca74e | |
download | aur-24f758390808c2ed50d1a904fedcb998c783c71e.tar.gz |
cl-shop2: added
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | shop2.install | 86 |
3 files changed, 155 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0678daf54031 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = cl-shop2 + pkgdesc = SHOP (Simple Hierarchical Ordered Planner) is a domain-independent automated-planning system that is based on ordered task decomposition, which is a type of Hierarchical Task Network (HTN) planning + pkgver = 2.9.0 + pkgrel = 1 + url = http://www.cs.umd.edu/projects/shop/description.html + install = shop2.install + arch = i686 + arch = x86_64 + license = GPL + depends = common-lisp + depends = cl-asdf + source = http://downloads.sourceforge.net/project/shop/shop2-2.9.0.tar.gz + source = shop2.install + md5sums = 2d5a41d420cca0ccb11d15072a770dac + md5sums = 7fd236d53a01011699d57541c421c6fd + sha256sums = 69f552d5a6f7e25fb3213910dada43dc1529f2071115a3abc8745a405ece59f0 + sha256sums = 98adaa027310b300876497f77e78968e7399df81d90a25198ba86218e8125ddc + sha384sums = 8217ab28a650a983bd62a3c52f1a958987c0f054e79fa34373ed024bd048d0bc5392262d6ede7f16e4d26cbe4cc4ca6f + sha384sums = dfef77995103f38281a14a4827b2dc0d3108a3b358a1b17510c0a885e452e5affc2cdd4cd96e369adef89c75ac4d2063 + sha512sums = 058d2150154af6f0127dd4f3c4a6d44b9a5dc09c2e593c462efd0f9e53c4785da363a72bd8a9ca9265351bd7800d20041107c9caf228565db4c5984ef34ef8f6 + sha512sums = 4af38c2a9bfd399df4942f315dee52e3277648e879802650e33f55d92d49e68e7deb345bffabe4f9f9221e7dab6ebe17d9056091382fc20af1e6b932cf70880b + +pkgname = cl-shop2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8e8379fccc25 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Sven Schneider <archlinux.sandmann@googlemail.com> + +pkgname=cl-shop2 +_clname=shop2 +pkgver=2.9.0 +pkgrel=1 +pkgdesc="SHOP (Simple Hierarchical Ordered Planner) is a domain-independent automated-planning system that is based on ordered task decomposition, which is a type of Hierarchical Task Network (HTN) planning" +arch=('i686' 'x86_64') +url="http://www.cs.umd.edu/projects/shop/description.html" +license=('GPL') +depends=('common-lisp' 'cl-asdf') +source=(http://downloads.sourceforge.net/project/shop/${_clname}-${pkgver}.tar.gz + shop2.install) +install=shop2.install +md5sums=('2d5a41d420cca0ccb11d15072a770dac' + '7fd236d53a01011699d57541c421c6fd') +sha256sums=('69f552d5a6f7e25fb3213910dada43dc1529f2071115a3abc8745a405ece59f0' + '98adaa027310b300876497f77e78968e7399df81d90a25198ba86218e8125ddc') +sha384sums=('8217ab28a650a983bd62a3c52f1a958987c0f054e79fa34373ed024bd048d0bc5392262d6ede7f16e4d26cbe4cc4ca6f' + 'dfef77995103f38281a14a4827b2dc0d3108a3b358a1b17510c0a885e452e5affc2cdd4cd96e369adef89c75ac4d2063') +sha512sums=('058d2150154af6f0127dd4f3c4a6d44b9a5dc09c2e593c462efd0f9e53c4785da363a72bd8a9ca9265351bd7800d20041107c9caf228565db4c5984ef34ef8f6' + '4af38c2a9bfd399df4942f315dee52e3277648e879802650e33f55d92d49e68e7deb345bffabe4f9f9221e7dab6ebe17d9056091382fc20af1e6b932cf70880b') + + +build() { + cd "${srcdir}/${_clname}-${pkgver}" + + # patches for ecl + sed 's/or allegro sbcl ccl clisp/or allegro sbcl ccl clisp ecl/g' -i shop-asd.asd + sed 's/#+clisp (ext:gc)/#+clisp (ext:gc) #+ecl (ext:gc)/g' -i shop2.lisp + sed 's/or :ccl :allegro :sbcl clisp/or :ccl :allegro :sbcl clisp ecl/g' -i shop2.lisp + sed 's/or :cCL :allegro :sbcl clisp/or :cCL :allegro :sbcl clisp ecl/g' -i shop2.lisp +} + +package() { + cd "${srcdir}/${_clname}-${pkgver}" + + install -dm 755 "${pkgdir}/usr/share/common-lisp/source/${_clname}" + cp -r * "${pkgdir}/usr/share/common-lisp/source/${_clname}" + + install -dm 755 "${pkgdir}/usr/share/common-lisp/systems" + cd "${pkgdir}/usr/share/common-lisp/systems" + ln -s ../source/${_clname}/${_clname}.asd . +} + diff --git a/shop2.install b/shop2.install new file mode 100644 index 000000000000..f92694197375 --- /dev/null +++ b/shop2.install @@ -0,0 +1,86 @@ +_pkgname=shop2 +_compile_log=n +_lisp=() + +if pacman -Qq clisp &>/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 +if pacman -Qq ecl &> /dev/null; then + _lisp=(${_lisp[@]} 'ecl') +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.lisp\") + (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.lisp\") + (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_ecl() { + ecl -q --norc \ + --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 +} + +# arg 1: the new package version +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, run the following lines + (require :asdf) + (require :${_pkgname}) +EOM +} + +post_upgrade() { + post_install +} + +pre_remove() { + rm -f /usr/share/common-lisp/source/${_pkgname}/{*.fas,*.fasl,*.lib,*.x86f} +} + +pre_upgrade() { + pre_remove +} + +op=$1 +shift + +$op $* |