summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b9b2716abdfb7b72e838eaa09471f723a4a9f08f (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
# Maintainer: loredan13
# Contributor: lf <packages at lfcode dot ca>
pkgname=klipper-git
pkgver=r2786.c36fe76d
pkgrel=1
pkgdesc="3D printer firmware with motion planning on the host"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/KevinOConnor/klipper"
license=('GPLv3')
groups=()
depends=(
	python2-cffi
	python2-pyserial
	python2-greenlet
	python2-jinja
	ncurses
	libusb
	avrdude
	avr-gcc
	avr-binutils
	avr-libc
)
optdepends_x86_64=(
	'arm-none-eabi-gcc: for ARM MCU firmware compilation'
	'arm-none-eabi-newlib: for ARM MCU firmware compilation'
	'stm32flash: for flashing firmware on STM MCU'
)
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=('git+https://github.com/KevinOConnor/klipper#branch=master' 'klipper.service' 'sysusers.conf' 'tmpfiles.conf')
noextract=()
md5sums=('SKIP'
         'f2f72237af98e80fe8fdb6332f089261'
         '61912d101dc7c68c7314882b80621454'
         'dd799b9d55045d950d407740d4a9a5c5')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
	cd "$srcdir/${pkgname%-git}"
	install -Dm644 "$srcdir/klipper.service" "$pkgdir/usr/lib/systemd/system/klipper.service"
	install -Dm644 "$srcdir/sysusers.conf" "$pkgdir/usr/lib/sysusers.d/klipper.conf"
	install -Dm644 "$srcdir/tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/klipper.conf"
	install -dm755 "$pkgdir/opt/klipper"
	install -dm775 "$pkgdir/etc/klipper"
	python2 scripts/make_version.py ARCHLINUX > klippy/.version
    python2 -m compileall klippy
    python2 klippy/chelper/__init__.py
	GLOBIGNORE=.git cp -r * "$pkgdir/opt/klipper"
}