summaryrefslogtreecommitdiffstats
path: root/abs/extra/docbook-sgml/PKGBUILD
blob: e7439d9ac0a46d40784de2d06a12b510ee2317e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Andrew Fyfe <andrew@neptune-one.net>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=docbook-sgml
pkgver=4.5
pkgrel=7
pkgdesc='Document type definitions for verification of SGML data files against the DocBook rule set.'
arch=('any')
url='https://www.docbook.org/sgml/'
license=('MIT')
depends=('sgml-common')
install='docbook-sgml.install'
source=("https://www.docbook.org/sgml/${pkgver}/docbook-${pkgver}.zip")
sha256sums=('8043e514e80c6c19cb146b5d37937d1305bf3abf9b0097c36df7f70f611cdf43')

build() {
  cd "$srcdir"

  local DTDDIR="usr/share/sgml/docbook-sgml-$pkgver"

  sed -i \
      -e '/ISO 8879/d' \
      -e '/gml/d' \
      docbook.cat

  # Add support for previous versions.
  cat >> docbook.cat << "EOF"

  -- Begin Single Major Version catalog changes --

PUBLIC "-//OASIS//DTD DocBook V4.4//EN" "docbook.dtd"
PUBLIC "-//OASIS//DTD DocBook V4.3//EN" "docbook.dtd"
PUBLIC "-//OASIS//DTD DocBook V4.2//EN" "docbook.dtd"
PUBLIC "-//OASIS//DTD DocBook V4.1//EN" "docbook.dtd"
PUBLIC "-//OASIS//DTD DocBook V4.0//EN" "docbook.dtd"

  -- End Single Major Version catalog changes --

EOF
}

package() {
  cd "$srcdir"

  local DTDDIR="usr/share/sgml/docbook-sgml-$pkgver"

  install -dm755 "$pkgdir/$DTDDIR"
  install -m644 docbook.cat "$pkgdir/$DTDDIR/catalog"
  install -m644 *.dtd *.mod *.dcl "$pkgdir/$DTDDIR"
}