summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c68eb066781571979b277d4e9a35cdb84d1d266a (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
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>

pkgname=tex2page-git
pkgver=20221218
pkgrel=1
pkgdesc="Lisp program for making Web pages from TeX documents"
arch=('any')
url="https://github.com/ds26gte/tex2page"
license=('custom')
depends=('bash' 'ecl')
makedepends=('git' 'ghostscript' 'texlive-formatsextra' 'texlive-bibtexextra' 'texlive-core' 'ttf-ubuntu-font-family')
source=("git+$url")
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  echo $(git log -1 --format="%cd" --date=short | sed 's|-||g')
}

build() {
  cd "${pkgname%-git}"
  ./configure --dialect=ecl --prefix=/usr
  # creating the documentation
  yes "s"|luatex index || true
  mpost lambda.mp
  epstopdf lambda-1.eps
  makeindex index
  bibtex index 
  luatex index || true
  luatex index
}

check() {
  cd "${pkgname%-git}"
  # run the generated program to build html-docs, also a good test

  ./${pkgname%-git} index
  ./${pkgname%-git} index
}

package() {
  cd "${pkgname%-git}"
  install -Dm755 "${pkgname%-git}" "$pkgdir"/usr/bin/"${pkgname%-git}"
  install -Dm644 "${pkgname%-git}".sty "$pkgdir"/usr/share/texmf/tex/plain/"${pkgname%-git}".sty
  install -Dm644 "${pkgname%-git}".tex "$pkgdir"/usr/share/texmf/tex/plain/"${pkgname%-git}".tex
  # for texinfo sources
  install -Dm644 texi2p.tex "$pkgdir"/usr/share/texmf/tex/plain/texi2p.tex
  # manpage
  install -Dm644 "man/man1/${pkgname%-git}".1 "$pkgdir"/usr/share/man/man1/"${pkgname%-git}".1
  # bibtex file 
  install -Dm644 "${pkgname%-git}".bib \
	  "$pkgdir"/usr/share/texmf/bibtex/bib/"${pkgname%-git}"/"${pkgname%-git}".bib
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
  # installing documentation other than manpage 
  for _i in index* lambda* mpexample*
  do
    install -Dm644 $_i "$pkgdir"/usr/share/doc/$pkgname/$_i
  done
}