summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a70f13496b37a2ef015e963df1f70dea0482c361 (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
# Maintainer: Trizen <echo dHJpemVuQHByb3Rvbm1haWwuY29tCg== | base64 -d>

_pkgname=perl-scripts
pkgname=markdown2pdf-git
pkgver=23.09.r132.g345abfd
pkgrel=1
pkgdesc="Markdown to PDF converter with syntax highlighting, using md2html (md4c), highlight and wkhtmltopdf."
arch=('any')
url="https://github.com/trizen/${_pkgname}"
license=('GPL-3.0-or-later')
makedepends=('git')

provides=("markdown2pdf=${pkgver}")
conflicts=('markdown2pdf')

depends=('perl>=5.10.0' 'perl-html-tree' 'perl-ipc-run3' 'wkhtmltopdf' 'highlight' 'md4c')

optdepends=(
    'wkhtmltopdf-static: to generate PDF outlines'
)

source=("git+https://github.com/trizen/${_pkgname}.git")
sha512sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
    cd "$_pkgname"
    install -D -m 755 "Converters/markdown2pdf.pl" "$pkgdir/usr/bin/markdown2pdf.pl"
}