summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f5eb1e1600ba6d5194900a7cd40a0449bb40a385 (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
pkgbase=python-svg2mod-git
pkgname=('python-svg2mod-git' 'python2-svg2mod-git')
_module='svg2mod'
pkgver=r55.0b7103b
pkgrel=1
pkgdesc="Convert Inkscape SVG drawings to KiCad footprint modules"
url="https://github.com/mtl/svg2mod"
depends=()
makedepends=('python-setuptools' 'python2-setuptools')
license=('Creative Commons Zero v1.0 Universal')
arch=('any')
source=("git://github.com/mtl/svg2mod.git")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_module"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  cp -a "${srcdir}/${_module}"{,-python2}
}

build() {
    cd "${srcdir}/${_module}"
    python setup.py build

    cd "${srcdir}/${_module}-python2"
    python2 setup.py build
}

package_python-svg2mod-git() {
    depends+=('python')
    cd "${srcdir}/${_module}"
    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}

package_python2-svg2mod-git() {
    depends+=('python2')
    cd "${srcdir}/${_module}-python2"
    python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}