summaryrefslogtreecommitdiff
path: root/community/htmldoc/PKGBUILD
blob: 9df1f9197f902e4cb1113fdf187686aa8046228b (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# $Id: PKGBUILD 64143 2012-02-09 02:03:02Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: tobias <tobias@archlinux.org>
# Contributor: Simon Rutishauser <simon.rutishauser@gmx.ch>

pkgname=htmldoc
pkgver=1.9.0svn1700
pkgrel=1
pkgdesc="Produce PDF or Postscript from HTML documents including TOCs and Indices"
arch=(i686 x86_64)
url="http://www.htmldoc.org"
license=('GPL')
depends=('libjpeg' 'libpng' 'openssl' 'fltk' 'gcc' 'libxft' 'libxpm')
makedepends=('subversion')
__svntrunk=http://svn.easysw.com/public/htmldoc/trunk/
__svnmod=htmldoc
source=()
md5sums=()
md5sums=()
md5sums=()

build() {
  cd "$srcdir"

  if [ -d $__svnmod/.svn ]; then
    (cd $__svnmod && svn up)
  else
    svn co $__svntrunk --config-dir ./ $__svnmod
  fi

  msg "SVN checkout done or server timeout"
  msg "Starting make..."

  rm -rf "$srcdir/$__svnmod-build"
  cp -r "$srcdir/$__svnmod" "$srcdir/$__svnmod-build"
  cd "$srcdir/$__svnmod-build"

  #
  # BUILD
  #
  [ -x configure ] || autoconf
  ./configure --prefix=/usr
  make
}

package() {
  cd "$srcdir/$__svnmod-build"

  make install \
	prefix=${pkgdir}/usr \
	bindir=$pkgdir/usr/bin \
	datadir=$pkgdir/usr/share \
	datarootdir=$pkgdir/usr/share \
	docdir=$pkgdir/usr/share/doc/htmldoc \
	exec_prefix=$pkgdir/usr \
	mandir=$pkgdir/usr/share/man \
	prefix=$pkgdir/usr \
	sysconfdir=$pkgdir/etc

 # fix freedesktop stuff
  install -Dm 644 desktop/htmldoc-128.png \
    ${pkgdir}/usr/share/pixmaps/htmldoc.png
  echo "MimeType=application/vnd.htmldoc-book;" >> desktop/htmldoc.desktop
  sed -i 's|X-Red-Hat.*$||' desktop/htmldoc.desktop
  install -Dm 644 desktop/htmldoc.desktop \
    ${pkgdir}/usr/share/applications/htmldoc.desktop
}