summaryrefslogtreecommitdiff
path: root/fpc-docs-svn/PKGBUILD
blob: 785f642f29ae218a9d3c479249f501cad5f130b7 (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
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: L <alaviss 0 at gmail dot com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Valeriy Lyasotskiy <onestep@ukr.net>
# Contributor: Jan Willemson <janwil@hot.ee>
# Contributor: Hugo Ideler <hugoideler@dse.nl>
# Contributor: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Original PKGBUILD: Andre Naumann <anaumann@SPARCed.org>
# See http://bbs.archlinux.org/viewtopic.php?t=9318&highlight=fpc

pkgname='fpc-docs-svn'
pkgver=3.3.1.r1871
_pkgver="${pkgver%.r*}"
_revision="${pkgver##*.r}"
pkgrel=1
arch=('any')
url='http://www.freepascal.org/'
license=('GPL' 'LGPL' 'custom')
pkgdesc='Documentation for the Free Pascal Compiler'
options=('!strip')
makedepends=('subversion'
  'texlive-core' 'texlive-htmlxml'
  'texlive-latexextra' 'ghostscript' 'fpc-src-svn' 'fpc-svn')
source=('fpcdocs::svn+http://svn.freepascal.org/svn/fpcdocs/trunk#revision='"${_revision}")
sha512sums=('SKIP')

pkgver() {
  cd "${srcdir}"/fpcdocs
  _src_ver=$(pacman -Q fpc-src-svn 2>/dev/null) \
  || _src_ver=$(
    pacman -Ss fpc-src-svn \
    | sed '
      s@^\S\+/\(fpc-src-svn\s\+\)@\1@
      t
      d
    '
  )
  _src_ver="${_src_ver##* }"
  _src_ver="${_src_ver%.r*}"
  printf '%s.r%s' \
    "${_src_ver}" \
    $(svnversion | tr -d [A-z])
}

build() {
  cd "${srcdir}"/fpcdocs
  cp -r /usr/lib/fpc/src ../fpcsrc
  make -j1 FPCSRCDIR="${srcdir}"/fpcsrc html
}

package() {
  cd "${srcdir}"/fpcdocs
  make PREFIX="${pkgdir}"/usr htmlinstall
}