summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 61817290e5de1093e224b0a30d239bcfc49b3b6c (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Maintainer: Jake <ja.ke@posteo.de>
pkgname=flatcam-git
_pkgname=FlatCAM
pkgver=r2643.db8dd77c
pkgrel=1
pkgdesc="Generates CNC gcode from 2D PCB files (Gerber/Excellon/SVG)"
arch=('any')
url="http://flatcam.org"
license=('MIT')
depends=('tk'
        'cython'
        'python-dateutil'
        'python-simplejson'
        'python-pyqt5'
        'python-opengl'
        'python-kiwisolver'
        'python-scipy'
#         'python-numpy'
        'python-matplotlib'
        'python-shapely'
        'python-rtree'
        'python-svg.path'
        'python-reportlab'
        'python-svglib'
        'python-vispy-git'
        'python-rasterio'
        'python-ezdxf'
        'python-dill'
        'python-freetype-py'
        'python-fonttools'
        'python-or-tools'
        'python-lxml'
        'python-cycler'
        'python-qrcode'
)
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+https://bitbucket.org/jpcgt/flatcam.git"
        "$pkgname.desktop"
        "${pkgname%-git}.sh")
md5sums=('SKIP'
         '75964eb8fb5d9fbb3da848edbf52af7a'
         'ff3e92a98fa93954cfaf6c5d62a05643')

prepare() {
	cd "$srcdir/${pkgname%-git}"
	git checkout Beta
}
pkgver() {
	cd "$srcdir/${pkgname%-git}"
	# Git, no tags available
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	python -O -m py_compile *.py
}


package() {
        mkdir -p "$pkgdir/usr/bin/"
	ln -s "/opt/${pkgname%-git}/${pkgname%-git}" "$pkgdir/usr/bin/${pkgname%-git}"
	install -D -m644 "$pkgname.desktop" "$pkgdir/usr/share/applications/${pkgname%-git}.desktop"
	install -D -m755 "${pkgname%-git}.sh" "$pkgdir/usr/bin/${pkgname%-git}"
	cd "$srcdir/${pkgname%-git}"
	install -D -m644 "assets/linux/icon.png" "$pkgdir/usr/share/pixmaps/${pkgname%-git}.png"
	install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	
	rm -r *.sh doc tests
	mkdir -p "${pkgdir}/opt/${pkgname%-git}"
	cp -r * "${pkgdir}/opt/${pkgname%-git}"
}