summaryrefslogtreecommitdiffstats
path: root/abs/extra/source-highlight/PKGBUILD
blob: 250ab53eb161d607a47cf2a818742053d23af0c1 (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
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>

pkgname=source-highlight
pkgver=3.1.8
pkgrel=18
pkgdesc="Convert source code to syntax highlighted document"
arch=('x86_64')
url="http://www.gnu.org/software/src-highlite/"
license=('GPL')
depends=('bash' 'boost-libs')
makedepends=('ctags' 'boost')
source=("ftp://ftp.gnu.org/gnu/src-highlite/${pkgname}-${pkgver}.tar.gz"
        "fix-zsh-highlighting-hangups.patch")
md5sums=('3243470706ef5fefdc3e43b5306a4e41'
         '5b6129bca6fcd0ea252fa31bf7a988fa')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -Np1 -i "${srcdir}/fix-zsh-highlighting-hangups.patch"
}

build() {
  cd ${pkgname}-${pkgver}

  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --with-bash-completion=/usr/share/bash-completion/completions
  make
}

package() {
  cd ${pkgname}-${pkgver}

  make prefix="${pkgdir}/usr" bash_completiondir="${pkgdir}/usr/share/bash-completion/completions" install

  # PKGBUILD syntax highlighting
  echo -e "\npkgbuild = sh.lang" >> "${pkgdir}"/usr/share/${pkgname}/lang.map
}