wok-next view docbook-sgml3/receipt @ rev 20033
Up geos (3.6.2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Oct 22 17:51:35 2017 +0200 (2017-10-22) |
parents | |
children | 0e7893ac206d |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="docbook-sgml3"
4 VERSION="3.1"
5 CATEGORY="development"
6 SHORT_DESC="Legacy docbook-sgml"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="MIT"
9 WEB_SITE="http://docbook.org/sgml/"
10 HOST_ARCH="any"
12 TARBALL="docbk31.zip"
13 WGET_URL="http://www.docbook.org/sgml/3.1/$TARBALL"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 sed -i -e '/ISO 8879/d' \
19 -e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' \
20 docbook.cat
22 local dtd="$install/usr/share/sgml/docbook/sgml-dtd-$VERSION"
24 mkdir -p $dtd
25 cp docbook.cat $dtd/catalog
26 cp *.dtd *.mod *.dcl $dtd
28 cat >> $dtd/catalog << "EOF"
29 -- Begin Single Major Version catalog changes --
31 PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd"
33 -- End Single Major Version catalog changes --
34 EOF
36 mkdir -p $install/etc/sgml
37 touch $install/etc/sgml/catalog
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 copy @std
44 DEPENDS="sgml-common"
45 CONFIG_FILES="/etc/sgml/catalog"
46 }
48 pre_remove() {
49 local p1="/etc/sgml/sgml-docbook-dtd-$VERSION.cat"
50 local p2="/usr/share/sgml/docbook/sgml-dtd-$VERSION/catalog"
51 local p3="/etc/sgml/sgml-docbook.cat"
53 touch "$1/etc/sgml/catalog"
54 chroot "$1/" install-catalog --remove $p1 $p2 >/dev/null
55 chroot "$1/" install-catalog --remove $p1 $p3 >/dev/null
56 }
58 post_install() {
59 local p1="/etc/sgml/sgml-docbook-dtd-$VERSION.cat"
60 local p2="/usr/share/sgml/docbook/sgml-dtd-$VERSION/catalog"
61 local p3="/etc/sgml/sgml-docbook.cat"
63 # Remove the catalog items prior to upgrading
64 [ -e "$1$p1" ] && pre_remove
66 touch "$1/etc/sgml/catalog" "$1/$p1"
67 chroot "$1/" install-catalog --add $p1 $p2 >/dev/null
68 chroot "$1/" install-catalog --add $p1 $p3 >/dev/null
69 }