diff options
author | Matthew Turk <satai@gentoo.org> | 2002-12-31 04:35:01 +0000 |
---|---|---|
committer | Matthew Turk <satai@gentoo.org> | 2002-12-31 04:35:01 +0000 |
commit | 42933b7b2452dba691b1b2cab6f8920b94c4705f (patch) | |
tree | d51907bd62f9bfd370cb8488174d7f6832f762b2 /eclass/sgml-catalog.eclass | |
parent | add missing file (diff) | |
download | gentoo-2-42933b7b2452dba691b1b2cab6f8920b94c4705f.tar.gz gentoo-2-42933b7b2452dba691b1b2cab6f8920b94c4705f.tar.bz2 gentoo-2-42933b7b2452dba691b1b2cab6f8920b94c4705f.zip |
New SGML catalog eclass, hopefully will fix things.
Diffstat (limited to 'eclass/sgml-catalog.eclass')
-rw-r--r-- | eclass/sgml-catalog.eclass | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/eclass/sgml-catalog.eclass b/eclass/sgml-catalog.eclass new file mode 100644 index 000000000000..310cfe035d4a --- /dev/null +++ b/eclass/sgml-catalog.eclass @@ -0,0 +1,62 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# Author Matthew Turk <satai@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.1 2002/12/31 04:35:01 satai Exp $ +# + +inherit base +INHERITED="$INHERITED $ECLASS" + +newdepend ">=sgml-common-0.6.3-r2" +ECLASS=sgml-catalog + +declare -a toinstall +declare -i catcounter +let "catcounter=0" + +sgml-catalog_cat_include() { + debug-print function $FUNCNAME $* + toinstall["catcounter++"]="${1}:${2}" +} + +sgml-catalog_cat_doinstall() { + debug-print function $FUNCNAME $* + /usr/bin/install-catalog --add $1 $2 &>/dev/null +} + +sgml-catalog_cat_doremove() { + debug-print function $FUNCNAME $* + /usr/bin/install-catalog --remove $1 $2 &>/dev/null +} + +sgml-catalog_pkg_postinst() { + debug-print function $FUNCNAME $* + declare -i topindex + topindex="catcounter-1" + for i in `seq 0 ${topindex}` + do + arg1=`echo ${toinstall[$i]} | cut -f1 -d\:` + arg2=`echo ${toinstall[$i]} | cut -f2 -d\:` + einfo "Now adding $arg1 to $arg2 and /etc/sgml/catalog" + sgml-catalog_cat_doinstall $arg1 $arg2 + done +} + +sgml-catalog_pkg_prerm() { + debug-print function $FUNCNAME $* + declare -i topindex + topindex="catcounter-1" + for i in `seq 0 ${topindex}` + do + arg1=`echo ${toinstall[$i]} | cut -f1 -d\:` + arg2=`echo ${toinstall[$i]} | cut -f2 -d\:` + einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog" + sgml-catalog_cat_doremove $arg1 $arg2 + done +} + +sgml-catalog_src_compile() { + dummy="DUMMY" +} + +EXPORT_FUNCTIONS pkg_prerm pkg_postinst src_compile |