Annotation of /trunk/extras/sgml-common/sgml-common-0.6.3-r7.smage2
Parent Directory | Revision Log
Revision 8365 -
(hide annotations)
(download)
Fri Jul 15 10:14:34 2011 UTC (13 years, 2 months ago) by niro
Original Path: branches/magellan-next/core/sgml-common/sgml-common-0.6.3-r7.smage2
File size: 2376 byte(s)
Fri Jul 15 10:14:34 2011 UTC (13 years, 2 months ago) by niro
Original Path: branches/magellan-next/core/sgml-common/sgml-common-0.6.3-r7.smage2
File size: 2376 byte(s)
auto added: ver bump to 0.6.3-r7
1 | niro | 8365 | # $Id$ |
2 | |||
3 | PNAME="sgml-common" | ||
4 | PVER="0.6.3" | ||
5 | PBUILD="r7" | ||
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 | } |