Magellan Linux

Annotation of /trunk/core/sgml-common/sgml-common-0.6.3-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 992 - (hide annotations) (download)
Mon Dec 29 00:18:42 2008 UTC (15 years, 4 months ago) by niro
File size: 2477 byte(s)
-rev bump to 0.6.3-r4
1 niro 992 # $Header: /magellan-cvs/smage/sgml-common/sgml-common-0.6.3-r3.smage2,v 1.1 2008/03/20 15:00:03 niro Exp $
2    
3     PNAME="sgml-common"
4     PVER="0.6.3"
5     PBUILD="r4"
6    
7     PCATEGORIE="app-text"
8     STATE="unstable"
9    
10     DESCRIPTION="Base ISO character entities and utilities for SGML."
11     HOMEPAGE="ftp://ftp.kde.org/pub/kde/devel/docbook/SOURCES/"
12    
13     DEPEND=""
14    
15     SRCFILE="${PNAME}-${PVER}.tgz"
16     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
17    
18     sminclude mbuild
19    
20     SRC_URI=(
21     ftp://ftp.kde.org/pub/kde/devel/docbook/SOURCES/${SRCFILE}
22     mirror://${PNAME}/${SRCFILE}
23     mirror://${PNAME}/${PNAME}-${PVER}-install-catalog.in
24     mirror://${PNAME}/${PNAME}-${PVER}-configure.in.patch
25     mirror://${PNAME}/${PNAME}-${PVER}-manpage-1.patch
26     )
27    
28     UP2DATE="updatecmd ${HOMEPAGE} | grep ${PNAME}- | lasttarball tgz"
29    
30     src_prepare()
31     {
32     munpack ${SRCFILE} || die
33     cd ${SRCDIR}
34    
35     # we use a hacked version of install-catalog that supports the ROOT
36     # variable, and puts quotes around the CATALOG files.
37     # - taken from gentoo
38     cp ${SOURCEDIR}/${PNAME}/${PNAME}-${PVER}-install-catalog.in \
39     ${SRCDIR}/bin/install-catalog.in
40    
41     # fix docdir location
42     mpatch ${PNAME}-${PVER}-configure.in.patch || die
43    
44     # fix glitch in manpage installation with newer automake
45     mpatch ${PNAME}-${PVER}-manpage-1.patch || die
46    
47     # fix some missing files and rebuild makefiles
48     export WANT_AUTOCONF=2.5
49     export WANT_AUTOMAKE=1.9
50     autoreconf --force --install || die
51     }
52    
53     postinstall()
54     {
55     echo "Installing Catalogs..."
56     ${MROOT}/usr/bin/install-catalog --add \
57     /etc/sgml/sgml-ent.cat \
58     /usr/share/sgml/sgml-iso-entities-8879.1986/catalog
59     ${MROOT}/usr/bin/install-catalog --add \
60     /etc/sgml/sgml-docbook.cat \
61     /etc/sgml/sgml-ent.cat
62    
63     local file
64     for file in $(find ${MROOT}/etc/sgml/ -name "*.cat") ${MROOT}/etc/sgml/catalog
65     do
66     echo "Fixing ${file}"
67     awk '/"$/ { print $1 " " $2 }
68     ! /"$/ { print $1 " \"" $2 "\"" }' ${file} > ${file}.new
69     mv ${file}.new ${file}
70     done
71     }
72    
73     preremove()
74     {
75     cp ${MROOT}/usr/bin/install-catalog ${BUILDDIR}
76     }
77    
78     postremove()
79     {
80     [ ! -x ${BUILDDIR}/install-catalog ] && return
81    
82     echo "Removing Catalogs..."
83     if [[ -e ${MROOT}/etc/sgml/sgml-ent.cat ]]
84     then
85     ${BUILDDIR}/install-catalog --remove \
86     /etc/sgml/sgml-ent.cat \
87     /usr/share/sgml/sgml-iso-entities-8879.1986/catalog
88     fi
89    
90     if [[ -e ${MROOT}/etc/sgml/sgml-docbook.cat ]]
91     then
92     ${BUILDDIR}/install-catalog --remove \
93     /etc/sgml/sgml-docbook.cat \
94     /etc/sgml/sgml-ent.cat
95     fi
96    
97     if [ -x ${BUILDDIR}/install-catalog ]
98     then
99     rm ${BUILDDIR}/install-catalog
100     fi
101     }

Properties

Name Value
svn:keywords Id