summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 43444903e41122b4707cc100b575e306e6e48740 (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
# Maintainer: Alex Forencich <alex@alexforencich.com>
pkgname=python2-hpgl-git
pkgver=0.1.0.r0.gc06e73b
pkgrel=1
pkgdesc="Python HPGL Parsing Library"
arch=('any')
url="https://github.com/alexforencich/python-hpgl"
license=('MIT')
depends=('python')
makedepends=('git')
provides=('python2-hpgl')

_gitroot='https://github.com/alexforencich/python-hpgl.git'
_gitname='python-hpgl'

source=("$_gitname::git+$_gitroot")
md5sums=('SKIP')

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

build() {
  cd "$srcdir/$_gitname"
  sed -i "s/'hpgl2svg/'python2-hpgl2svg/" setup.py
  sed -i "s/'hprtl2bmp/'python2-hprtl2bmp/" setup.py
}

package() {
  cd "$srcdir/$_gitname"
  python2 setup.py install --prefix=/usr --root="$pkgdir/" --optimize=1
}