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

Contents of /eclass/sgml-catalog.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Wed Nov 30 09:59:19 2005 UTC (8 years, 9 months ago) by chriswhite
Changes since 1.1: +57 -37 lines
*** empty log message ***

1 chriswhite 1.1.1.1 # Copyright 1999-2004 Gentoo Foundation
2 satai 1.1 # Distributed under the terms of the GNU General Public License v2
3 chriswhite 1.1.1.1 # $Header: /var/cvsroot/gentoo-x86/eclass/sgml-catalog.eclass,v 1.14 2005/09/08 17:37:32 leonardop Exp $
4 satai 1.1 #
5 chriswhite 1.1.1.1 # Author Matthew Turk <satai@gentoo.org>
6 satai 1.1
7     inherit base
8    
9 chriswhite 1.1.1.1 DEPEND=">=app-text/sgml-common-0.6.3-r2"
10    
11    
12     # List of catalogs to install
13     SGML_TOINSTALL=""
14 satai 1.1
15    
16     sgml-catalog_cat_include() {
17 chriswhite 1.1.1.1 debug-print function $FUNCNAME $*
18     SGML_TOINSTALL="${SGML_TOINSTALL} ${1}:${2}"
19 satai 1.1 }
20    
21     sgml-catalog_cat_doinstall() {
22 chriswhite 1.1.1.1 debug-print function $FUNCNAME $*
23     /usr/bin/install-catalog --add $1 $2 &>/dev/null
24 satai 1.1 }
25    
26     sgml-catalog_cat_doremove() {
27 chriswhite 1.1.1.1 debug-print function $FUNCNAME $*
28     /usr/bin/install-catalog --remove $1 $2 &>/dev/null
29 satai 1.1 }
30    
31     sgml-catalog_pkg_postinst() {
32 chriswhite 1.1.1.1 debug-print function $FUNCNAME $*
33    
34     for entry in ${SGML_TOINSTALL}; do
35     arg1=`echo ${entry} | cut -f1 -d\:`
36     arg2=`echo ${entry} | cut -f2 -d\:`
37     if [ ! -e ${arg2} ]
38     then
39     ewarn "${arg2} doesn't appear to exist, although it ought to!"
40     continue
41     fi
42     einfo "Now adding ${arg2} to ${arg1} and /etc/sgml/catalog"
43     sgml-catalog_cat_doinstall ${arg1} ${arg2}
44     done
45     sgml-catalog_cleanup
46 satai 1.1 }
47    
48     sgml-catalog_pkg_prerm() {
49 chriswhite 1.1.1.1 sgml-catalog_cleanup
50     }
51    
52     sgml-catalog_pkg_postrm() {
53     debug-print function $FUNCNAME $*
54    
55     for entry in ${SGML_TOINSTALL}; do
56     arg1=`echo ${entry} | cut -f1 -d\:`
57     arg2=`echo ${entry} | cut -f2 -d\:`
58     if [ -e ${arg2} ]
59     then
60     ewarn "${arg2} still exists! Not removing from ${arg1}"
61     ewarn "This is normal behavior for an upgrade ..."
62     continue
63     fi
64     einfo "Now removing $arg1 from $arg2 and /etc/sgml/catalog"
65     sgml-catalog_cat_doremove ${arg1} ${arg2}
66     done
67     }
68    
69     sgml-catalog_cleanup() {
70     if [ -e /usr/bin/gensgmlenv ]
71     then
72     einfo Regenerating SGML environment variables ...
73     gensgmlenv
74     grep -v export /etc/sgml/sgml.env > /etc/env.d/93sgmltools-lite
75     fi
76 satai 1.1 }
77    
78     sgml-catalog_src_compile() {
79 chriswhite 1.1.1.1 return
80 satai 1.1 }
81    
82 chriswhite 1.1.1.1 EXPORT_FUNCTIONS pkg_postrm pkg_postinst src_compile pkg_prerm

  ViewVC Help
Powered by ViewVC 1.1.20