summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e042a906a2d3f0a1a99ed34063e62310925b039a (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
# Maintainer: Alexander Kobel <a-kobel@a-kobel.de>

pkgname=opendetex
pkgver=2.8.5
pkgrel=1
pkgdesc="Improved version of Detex - tool for extracting plain text from TeX and LaTeX sources (Piotr Kubowicz's fork)"
url="https://github.com/pkubowicz/opendetex"
arch=('i686' 'x86_64')
depends=('glibc')
license=('custom')
source=("${url}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.bz2")
sha256sums=('90be111ec1f47af25317d1dbe2f07a350cc46e1bc4cdc995dde79219d7c2623d')

build () {
  cd ${srcdir}
  # lex library linking is not needed with flex
  sed -e 's/#LEX/LEX/' -i Makefile
  CC="${CC:-gcc} ${LDFLAGS}" make
}

package () {
  cd ${srcdir}
  install -D -m755 detex "${pkgdir}/usr/bin/opendetex"
  gzip -9 -c detex.1 > opendetex.1.gz
  install -D -m644 opendetex.1.gz -t "${pkgdir}/usr/share/man/man1"
  install -D -m644 COPYRIGHT -t "${pkgdir}/usr/share/licenses/${pkgname}"
}