summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 16dd50fe1495976115cc71506b2bc7b6a3fd4757 (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.11
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=('LicenseRef-opendetex')
source=("${url}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.bz2")
sha256sums=('f5771afc607134f65d502d733552cbc79ef06eee44601ae8077b79d852daa05f')

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}"
}