1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # Author Matthew Kennedy <mkennedy@gentoo.org>
7 # This eclass supports the common-lisp-controller installation of many
8 # Common Lisp libraries
10 inherit common-lisp-common
13 DEPEND="dev-lisp/common-lisp-controller"
15 EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm
17 common-lisp_pkg_postinst() {
18 if [ -z "${CLPACKAGE}" ]; then
19 die "CLPACKAGE was empty or undefined upon call to pkg_prerm"
21 for package in ${CLPACKAGE}; do
22 einfo "Registering Common Lisp source for ${package}"
23 register-common-lisp-source ${package}
28 common-lisp_pkg_postrm() {
29 if [ -z "${CLPACKAGE}" ]; then
30 die "CLPACKAGE was empty or undefined upon call to pkg_prerm"
32 for package in ${CLPACKAGE}; do
33 if [ ! -d ${CLSOURCEROOT}/${package} ]; then
34 einfo "Unregistering Common Lisp source for ${package}"
35 # rm -rf ${CLFASLROOT}/*/${package}
36 unregister-common-lisp-source ${package}
43 # In pkg_preinst, we remove the FASL files for the previous version of
46 common-lisp_pkg_preinst() {
47 if [ -z "${CLPACKAGE}" ]; then
48 die "CLPACKAGE was empty or undefined upon call to pkg_preinst"
50 for package in ${CLPACKAGE}; do
51 einfo "Removing FASL files for previous version of Common Lisp package ${package}"
52 rm -rf ${CLFASLROOT}/*/${package} || true
57 common-lisp-install() {
58 insinto ${CLSOURCEROOT}/${CLPACKAGE}
62 common-lisp-system-symlink() {
63 dodir ${CLSYSTEMROOT}/`dirname ${CLPACKAGE}`
65 dosym ${CLSOURCEROOT}/${CLPACKAGE}/${CLPACKAGE}.asd \
66 ${CLSYSTEMROOT}/${CLPACKAGE}.asd
68 for package in "$@" ; do
69 dosym ${CLSOURCEROOT}/$CLPACKAGE/${package}.asd \
70 ${CLSYSTEMROOT}/${package}.asd
75 # Local Variables: ***
76 # mode: shell-script ***