wok-next view docbook-sgml3/receipt @ rev 20942
Updates
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Aug 28 08:45:59 2018 +0300 (2018-08-28) |
parents | d958fec46c9f |
children | c2031fd4a3f3 |
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="https://docbook.org/sgml/"
10 REPOLOGY="docbook-sgml"
12 TARBALL="docbk31.zip"
13 WGET_URL="http://www.docbook.org/sgml/3.1/$TARBALL"
15 compile_rules() {
16 sed -i -e '/ISO 8879/d' \
17 -e 's|DTDDECL "-//OASIS//DTD DocBook V3.1//EN"|SGMLDECL|g' \
18 docbook.cat
20 local dtd="$install/usr/share/sgml/docbook/sgml-dtd-$VERSION"
22 mkdir -p $dtd
23 cp docbook.cat $dtd/catalog
24 cp *.dtd *.mod *.dcl $dtd
26 cat >> $dtd/catalog << "EOF"
27 -- Begin Single Major Version catalog changes --
29 PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd"
31 -- End Single Major Version catalog changes --
32 EOF
34 mkdir -p $install/etc/sgml
35 touch $install/etc/sgml/catalog
36 }
38 genpkg_rules() {
39 copy @std
40 DEPENDS="sgml-common"
41 CONFIG_FILES="/etc/sgml/catalog"
42 }
44 pre_remove() {
45 local p1="/etc/sgml/sgml-docbook-dtd-$VERSION.cat"
46 local p2="/usr/share/sgml/docbook/sgml-dtd-$VERSION/catalog"
47 local p3="/etc/sgml/sgml-docbook.cat"
49 touch "$1/etc/sgml/catalog"
50 chroot "$1/" install-catalog --remove $p1 $p2 >/dev/null
51 chroot "$1/" install-catalog --remove $p1 $p3 >/dev/null
52 }
54 post_install() {
55 local p1="/etc/sgml/sgml-docbook-dtd-$VERSION.cat"
56 local p2="/usr/share/sgml/docbook/sgml-dtd-$VERSION/catalog"
57 local p3="/etc/sgml/sgml-docbook.cat"
59 # Remove the catalog items prior to upgrading
60 [ -e "$1$p1" ] && pre_remove
62 touch "$1/etc/sgml/catalog" "$1/$p1"
63 chroot "$1/" install-catalog --add $p1 $p2 >/dev/null
64 chroot "$1/" install-catalog --add $p1 $p3 >/dev/null
65 }