summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a664dd52a8f31bc23e6952e12443ab37464ae1d0 (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
# Maintainer: Marcel Robitaille <mail@marcelrobitaille.me>

pkgname=kiri-git
pkgver=1.2.0.r133.gf5ee662
pkgrel=1
pkgdesc="A tool for reviewing Schematics and Layouts of Git-versioned Kicad-projects, visually"
url="https://github.com/leoheck/kiri"
license=("MIT")
arch=("x86_64")
provides=("kiri")
conflicts=("kiri")
makedepends=("git")
depends=("python" "patch" "dos2unix" "kicad" "imagemagick" "xdotool" "perl-rename" "kicad-diff-git" "python-wxpython" "python-pytz" "python-dateutil" "python-six" "python-pillow")

source=("kiri::git+https://github.com/leoheck/kiri.git" "git+https://github.com/leoheck/kicad_parser.git" "git+https://github.com/leoheck/KiCad-Diff.git" "git+https://github.com/jnavila/plotkicadsch.git" "git+https://github.com/realthunder/sexp_parser.git")
sha256sums=("SKIP" "SKIP" "SKIP" "SKIP" "SKIP")

prepare() {
	cd kiri
	git submodule init
	git config submodule.kicad_parser.url "$srcdir/kicad_parser"
	git config submodule.KiCad-Diff.url "$srcdir/KiCad-Diff"
	git config submodule.plotkicadsch.url "$srcdir/plotkicadsch"
	git -c protocol.file.allow=always submodule update
	cd submodules/kicad_parser
	git submodule init
	git config submodule.sexp_parser.url "$srcdir/sexp_parser"
	git -c protocol.file.allow=always submodule update
}

package() {
	mkdir -p "$pkgdir/opt/kiri/"
	mkdir -p "$pkgdir/usr/bin"
	cp -r kiri/* "$pkgdir/opt/kiri"
	for bin in "find_kicad5_sch_hier" "find_kicad6_sch_hier" "fix_svg_vias" "git-imgdiff" "kicad6_sheet_instances" "kicad_rev" "kicad_version" "kicad_version.py" "kicad_version_cliclick" "kicad_version_xdotool" "kiri" "kiri-file-picker" "kiri-server" "plot_kicad_sch" "plot_kicad_sch_macos" "plotgitsch_svg_tweaks"; do
		ln -s "../../opt/kiri/bin/$bin" "$pkgdir/usr/bin/$bin"
	done
}

pkgver() {
	cd "kiri"
	git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}