/[gentoo-x86]/eclass/sgml-catalog.eclass
Gentoo

Contents of /eclass/sgml-catalog.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Tue Dec 31 04:35:01 2002 UTC (11 years, 8 months ago) by satai
Branch: MAIN
New SGML catalog eclass, hopefully will fix things.

1 satai 1.1 # Copyright 1999-2002 Gentoo Technologies, Inc.
2     # Distributed under the terms of the GNU General Public License v2
3     # Author Matthew Turk <satai@gentoo.org>
4     # $Header: /home/cvsroot/gentoo-x86/eclass/latex-package.eclass,v 1.11 2002/11/05 03:58:33 satai Exp $
5     #
6    
7     inherit base
8     INHERITED="$INHERITED $ECLASS"
9    
10     newdepend ">=sgml-common-0.6.3-r2"
11     ECLASS=sgml-catalog
12    
13     declare -a toinstall
14     declare -i catcounter
15     let "catcounter=0"
16    
17     sgml-catalog_cat_include() {
18     debug-print function $FUNCNAME $*
19     toinstall["catcounter++"]="${1}:${2}"
20     }
21    
22     sgml-catalog_cat_doinstall() {
23     debug-print function $FUNCNAME $*
24     /usr/bin/install-catalog --add $1 $2 &>/dev/null
25     }
26    
27     sgml-catalog_cat_doremove() {
28     debug-print function $FUNCNAME $*
29     /usr/bin/install-catalog --remove $1 $2 &>/dev/null
30     }
31    
32     sgml-catalog_pkg_postinst() {
33     debug-print function $FUNCNAME $*
34     declare -i topindex
35     topindex="catcounter-1"
36     for i in `seq 0 ${topindex}`
37     do
38     arg1=`echo ${toinstall[$i]} | cut -f1 -d\:`
39     arg2=`echo ${toinstall[$i]} | cut -f2 -d\:`
40     einfo "Now adding $arg1 to $arg2 and /etc/sgml/catalog"
41     sgml-catalog_cat_doinstall $arg1 $arg2
42     done
43     }
44    
45     sgml-catalog_pkg_prerm() {
46     debug-print function $FUNCNAME $*
47     declare -i topindex
48     topindex="catcounter-1"
49     for i in `seq 0 ${topindex}`
50     do
51     arg1=`echo ${toinstall[$i]} | cut -f1 -d\:`
52     arg2=`echo ${toinstall[$i]} | cut -f2 -d\:`
53     einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog"
54     sgml-catalog_cat_doremove $arg1 $arg2
55     done
56     }
57    
58     sgml-catalog_src_compile() {
59     dummy="DUMMY"
60     }
61    
62     EXPORT_FUNCTIONS pkg_prerm pkg_postinst src_compile

  ViewVC Help
Powered by ViewVC 1.1.20