wok-next view docbook-sgml/receipt @ rev 20236
linux-cloop: tiny patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 06 10:18:18 2017 +0100 (2017-11-06) |
parents | |
children | 0e7893ac206d |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="docbook-sgml"
4 VERSION="4.5"
5 CATEGORY="development"
6 SHORT_DESC="Document type definitions for verification of SGML data files against the DocBook rule set"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="MIT"
9 WEB_SITE="http://docbook.org/sgml/"
10 HOST_ARCH="any"
12 TARBALL="docbook-$VERSION.zip"
13 WGET_URL="http://www.docbook.org/sgml/$VERSION/$TARBALL"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 sed -i -e '/ISO 8879/d' \
19 -e '/gml/d' docbook.cat
21 local dtd="$install/usr/share/sgml/docbook/sgml-dtd-$VERSION"
23 mkdir -p $dtd
24 cp docbook.cat $dtd/catalog
25 cp *.dtd *.mod *.dcl $dtd
27 cat >> $dtd/catalog << "EOF"
28 -- Begin Single Major Version catalog changes --
30 PUBLIC "-//OASIS//DTD DocBook V4.4//EN" "docbook.dtd"
31 PUBLIC "-//OASIS//DTD DocBook V4.3//EN" "docbook.dtd"
32 PUBLIC "-//OASIS//DTD DocBook V4.2//EN" "docbook.dtd"
33 PUBLIC "-//OASIS//DTD DocBook V4.1//EN" "docbook.dtd"
34 PUBLIC "-//OASIS//DTD DocBook V4.0//EN" "docbook.dtd"
36 -- End Single Major Version catalog changes --
37 EOF
39 mkdir -p $install/etc/sgml
40 touch $install/etc/sgml/catalog
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 copy @std
47 DEPENDS="sgml-common"
48 CONFIG_FILES="/etc/sgml/catalog"
49 }
51 pre_remove() {
52 local p1="/etc/sgml/sgml-docbook-dtd-$VERSION.cat"
53 local p2="/usr/share/sgml/docbook/sgml-dtd-$VERSION/catalog"
54 local p3="/etc/sgml/sgml-docbook.cat"
56 touch "$1/etc/sgml/catalog"
57 chroot "$1/" install-catalog --remove $p1 $p2 > /dev/null
58 chroot "$1/" install-catalog --remove $p1 $p3 > /dev/null
59 }
61 post_install() {
62 local p1="/etc/sgml/sgml-docbook-dtd-$VERSION.cat"
63 local p2="/usr/share/sgml/docbook/sgml-dtd-$VERSION/catalog"
64 local p3="/etc/sgml/sgml-docbook.cat"
66 # Remove the catalog items prior to upgrading
67 [ -e "$1$p1" ] && pre_remove
69 touch "$1/etc/sgml/catalog" "$1$p1"
70 chroot "$1/" install-catalog --add $p1 $p2 > /dev/null
71 chroot "$1/" install-catalog --add $p1 $p3 > /dev/null
72 }