# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

# Contributor: Chris Severance aur.severach aATt spamgourmet dott com
# Contributor: Andreas B. Wagner <AndreasBWagner@pointfree.net>
# Contributor: Suat SARIALP <muhendis.suat@gmail.com>

pkgname='docbook-dsssl'
pkgver=1.79
pkgrel=7
pkgdesc="DSSSL Stylesheets for DocBook"
arch=('any')
url="http://docbook.sourceforge.net/"
license=('custom')
depends=('sgml-common' 'perl')
install=${pkgname}.install
source=(https://sourceforge.net/projects/docbook/files/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2
        docbook-style-dsssl.Makefile)
sha1sums=('0ee935247c9f850e930f3b5c162dbc03915469cd'
          '104a665b2c3e1520337533862cbd1c1c55d6e01c')

prepare() {
  cd "${pkgname}-${pkgver}"
  cp ${srcdir}/docbook-style-dsssl.Makefile Makefile
}

package(){
  cd "${pkgname}-${pkgver}"
  make -j1 install \
     BINDIR="${pkgdir}/usr/bin" \
     DESTDIR="${pkgdir}/usr/share/sgml/docbook/dsssl-stylesheets-${pkgver}" \
     MANDIR="${pkgdir}/usr/share/man"
  
  ln -s dsssl-stylesheets-${pkgver} ${pkgdir}/usr/share/sgml/docbook/dsssl-stylesheets
  # license
  install -Dm644 README "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
