summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fb9b1ea6f14cfdc55a767f93924693470e65247f (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: Jaƫl Champagne Gareau <gareau_jael@hotmail.com>
# Contributor:
_pkgname=tikz2pdf
pkgname=$_pkgname-git
pkgver=12+c58f831
pkgrel=1
pkgdesc="Script to help convert TikZ code to PDF"
arch=('x86_64')
url="https://github.com/ablondin/$_pkgname"
license=('BSD-3')
depends=('python')
makedepends=('git')
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd $_pkgname
  (
    set -o pipefail
    git describe --long --tags 2> /dev/null | sed -r 's/^[r|v]//;s/-/+/g' ||
    printf '%s+%s' $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
  )
}

package() {
  cd $_pkgname

  # Install the script
  install -Dm755 "tikz2pdf" "${pkgdir}/usr/bin/tikz2pdf"

  # Install the license
  install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}