summaryrefslogtreecommitdiffstats
path: root/abs/extra/doxygen/PKGBUILD
blob: 8d221696f393868d590c3614cf81fd405694d25f (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
68
69
70
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Dan McGee <dan@archlinux.org>

pkgbase=doxygen
pkgname=('doxygen' 'doxygen-docs')
pkgver=1.8.14
pkgrel=1
pkgdesc='Documentation system for C++, C, Java, IDL and PHP'
url='http://www.doxygen.org/'
arch=('x86_64')
license=('GPL')
makedepends=('cmake' 'gcc-libs' 'flex' 'qt5-base' 'texlive-core' 'ghostscript'
             'texlive-latexextra' 'graphviz' 'python2')
source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/doxygen/doxygen/archive/Release_${pkgver//./_}.tar.gz)
sha256sums=('18bc3790b4d5f4d57cb8ee0a77dd63a52518f3f70d7fdff868a7ce7961a6edc3')
sha512sums=('e19d706be64f8c1d35d3cd12b8c35f09503213bb3f5a4aa311ef0a6a953843ebed5ac4eca52ca908222543fb9794d545bb6d88c9fc8f39e66ef22c1919c120b0')

prepare() {
  cd ${pkgbase}-Release_${pkgver//./_}

  mkdir build

  # Install the man pages in the right place
  sed -i 's:DESTINATION man/man1:DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1":g' \
    doc/CMakeLists.txt
}

build() {
  cd ${pkgbase}-Release_${pkgver//./_}/build

  cmake .. \
    -DCMAKE_INSTALL_PREFIX:PATH=/usr \
    -DDOC_INSTALL_DIR:PATH=share/doc/doxygen \
    -DPYTHON_EXECUTABLE:FILE=/usr/bin/python2 \
    -Dbuild_doc:BOOL=ON \
    -Dbuild_wizard:BOOL=ON

  make
  make docs
}

check(){
  cd ${pkgbase}-Release_${pkgver//./_}/build
  make tests
}

package_doxygen() {
  pkgdesc='Documentation system for C++, C, Java, IDL and PHP'
  depends=('gcc-libs')
  optdepends=('graphviz: for caller/callee graph generation'
              'qt5-base: for doxywizard')

  cd ${pkgbase}-Release_${pkgver//./_}/build
  make DESTDIR="${pkgdir}" install

  # Docs are in 'doxygen-docs'
  rm -rf "${pkgdir}/usr/share/doc"
}

package_doxygen-docs() {
  pkgdesc='Developer documentation for doxygen'

  cd ${pkgbase}-Release_${pkgver//./_}/build
  make DESTDIR="${pkgdir}" install

  rm -rf "${pkgdir}/usr/bin"
  rm -rf "${pkgdir}/usr/share/man"
}

# vim: ts=2 sw=2 et: