Contents of /trunk/core/sgml-common/sgml-common-0.6.3-r3.smage2
Parent Directory | Revision Log
Revision 987 -
(show annotations)
(download)
Mon Dec 29 00:12:41 2008 UTC (15 years, 4 months ago) by niro
File size: 2409 byte(s)
Mon Dec 29 00:12:41 2008 UTC (15 years, 4 months ago) by niro
File size: 2409 byte(s)
-moved to 'core'
1 | # $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="r3" |
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 | src_prepare() |
29 | { |
30 | munpack ${SRCFILE} || die |
31 | cd ${SRCDIR} |
32 | |
33 | # we use a hacked version of install-catalog that supports the ROOT |
34 | # variable, and puts quotes around the CATALOG files. |
35 | # - taken from gentoo |
36 | cp ${SOURCEDIR}/${PNAME}/${PNAME}-${PVER}-install-catalog.in \ |
37 | ${SRCDIR}/bin/install-catalog.in |
38 | |
39 | # fix docdir location |
40 | mpatch ${PNAME}-${PVER}-configure.in.patch || die |
41 | |
42 | # fix glitch in manpage installation with newer automake |
43 | mpatch ${PNAME}-${PVER}-manpage-1.patch || die |
44 | |
45 | # fix some missing files and rebuild makefiles |
46 | export WANT_AUTOCONF=2.5 |
47 | export WANT_AUTOMAKE=1.9 |
48 | autoreconf --force --install || die |
49 | } |
50 | |
51 | postinstall() |
52 | { |
53 | echo "Installing Catalogs..." |
54 | ${MROOT}/usr/bin/install-catalog --add \ |
55 | /etc/sgml/sgml-ent.cat \ |
56 | /usr/share/sgml/sgml-iso-entities-8879.1986/catalog |
57 | ${MROOT}/usr/bin/install-catalog --add \ |
58 | /etc/sgml/sgml-docbook.cat \ |
59 | /etc/sgml/sgml-ent.cat |
60 | |
61 | local file |
62 | for file in $(find ${MROOT}/etc/sgml/ -name "*.cat") ${MROOT}/etc/sgml/catalog |
63 | do |
64 | echo "Fixing ${file}" |
65 | awk '/"$/ { print $1 " " $2 } |
66 | ! /"$/ { print $1 " \"" $2 "\"" }' ${file} > ${file}.new |
67 | mv ${file}.new ${file} |
68 | done |
69 | } |
70 | |
71 | preremove() |
72 | { |
73 | cp ${MROOT}/usr/bin/install-catalog ${BUILDDIR} |
74 | } |
75 | |
76 | postremove() |
77 | { |
78 | [ ! -x ${BUILDDIR}/install-catalog ] && return |
79 | |
80 | echo "Removing Catalogs..." |
81 | if [[ -e ${MROOT}/etc/sgml/sgml-ent.cat ]] |
82 | then |
83 | ${BUILDDIR}/install-catalog --remove \ |
84 | /etc/sgml/sgml-ent.cat \ |
85 | /usr/share/sgml/sgml-iso-entities-8879.1986/catalog |
86 | fi |
87 | |
88 | if [[ -e ${MROOT}/etc/sgml/sgml-docbook.cat ]] |
89 | then |
90 | ${BUILDDIR}/install-catalog --remove \ |
91 | /etc/sgml/sgml-docbook.cat \ |
92 | /etc/sgml/sgml-ent.cat |
93 | fi |
94 | |
95 | if [ -x ${BUILDDIR}/install-catalog ] |
96 | then |
97 | rm ${BUILDDIR}/install-catalog |
98 | fi |
99 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |