summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordx-mon2020-10-09 22:31:26 +0100
committerdx-mon2020-10-09 22:31:26 +0100
commitb080f2b92030073d327977c8f9e9e37e6080cfb6 (patch)
tree06397c3f80155c0fd225a2f4a284e3d5dd5af245
downloadaur-b080f2b92030073d327977c8f9e9e37e6080cfb6.tar.gz
Created a properly namespaced side-by-side installable nightly package for KiCAD
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD104
-rw-r--r--kicad-nightly.env3
3 files changed, 139 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..a9048cf79e6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = kicad-nightly
+ pkgdesc = Electronic schematic and printed circuit board (PCB) design tools
+ pkgver = 5.99.0_3919_g411914dff
+ pkgrel = 1
+ url = http://kicad-pcb.org/
+ arch = x86_64
+ license = GPL
+ makedepends = cmake
+ makedepends = zlib
+ makedepends = mesa
+ makedepends = boost
+ makedepends = swig
+ depends = wxgtk3
+ depends = python
+ depends = boost-libs
+ depends = glew
+ depends = curl
+ depends = glm
+ depends = ngspice
+ depends = opencascade
+ depends = python-wxpython
+ optdepends = kicad-library: for footprints and symbols
+ optdepends = kicad-library-3d: for 3d models of components
+ source = git+https://gitlab.com/kicad/code/kicad.git#commit=411914dff
+ source = git+https://gitlab.com/kicad/code/kicad-i18n.git#commit=d24af2d
+ source = kicad-nightly.env
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = fce26af6b9c181a99197bfc9bc6c778561ad55a375480f4d0d73bb34078b5d18
+
+pkgname = kicad-nightly
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f4dd3fd54a5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,104 @@
+# Maintainer: Rachel Mant <dx-mon@users.sourceforge.net>
+
+pkgname=kicad-nightly
+pkgver=5.99.0_3919_g411914dff
+pkgrel=1
+pkgdesc='Electronic schematic and printed circuit board (PCB) design tools'
+arch=('x86_64')
+url='http://kicad-pcb.org/'
+license=('GPL')
+depends=('wxgtk3' 'python' 'boost-libs' 'glew' 'curl' 'glm' 'ngspice' 'opencascade' 'python-wxpython')
+makedepends=('cmake' 'zlib' 'mesa' 'boost' 'swig')
+optdepends=(
+ 'kicad-library: for footprints and symbols'
+ 'kicad-library-3d: for 3d models of components'
+)
+_kicad_commit=411914dff # master
+_i18n_commit=d24af2d # master
+source=(
+ 'git+https://gitlab.com/kicad/code/kicad.git'#commit=$_kicad_commit
+ 'git+https://gitlab.com/kicad/code/kicad-i18n.git'#commit=$_i18n_commit
+ 'kicad-nightly.env'
+)
+sha256sums=(
+ 'SKIP' 'SKIP'
+ 'fce26af6b9c181a99197bfc9bc6c778561ad55a375480f4d0d73bb34078b5d18'
+)
+
+pkgver()
+{
+ cd "$srcdir/kicad"
+ git describe --tags | sed -e 's/-/_/g'
+}
+
+build()
+{
+ cd "$srcdir/kicad"
+
+ mkdir build
+ cd build
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr/lib/kicad-nightly \
+ -DCMAKE_INSTALL_DATADIR=/usr/share/kicad-nightly \
+ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/kicad-nightly \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib/kicad-nightly/lib \
+ -DCMAKE_EXECUTABLE_SUFFIX=-nightly \
+ -DKICAD_USE_OCE=OFF \
+ -DKICAD_USE_OCC=ON \
+ -DKICAD_SCRIPTING=ON \
+ -DKICAD_SCRIPTING_PYTHON3=ON \
+ -DKICAD_SCRIPTING_MODULES=ON \
+ -DKICAD_SCRIPTING_WXPYTHON=ON \
+ -DKICAD_SCRIPTING_ACTION_MENU=ON \
+ -DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON \
+ -DKICAD_DATA=/usr/share/kicad-nightly \
+ -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3 \
+ -DBUILD_GITHUB_PLUGIN=ON
+ make -j $(nproc)
+
+ cd "$srcdir/kicad-i18n"
+
+ mkdir build
+ cd build
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr/lib/kicad-nightly \
+ -DCMAKE_INSTALL_DATADIR=/usr/share/kicad-nightly \
+ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/kicad-nightly
+ make -j $(nproc)
+}
+
+package()
+{
+ cd "$srcdir/kicad/build"
+ make DESTDIR="$pkgdir" install
+
+ mkdir -p "$pkgdir/usr/share"
+ for prog in bitmap2component eeschema gerbview kicad pcbcalculator pcbnew; do
+ sed -i \
+ -e 's/^Exec=\([^ ]*\)\(.*\)$/Exec=\1-nightly\2/g' \
+ -e 's/^Icon=\(.*\)$/Icon=\1-nightly/g' \
+ -e 's/^Name=\(.*\)$/Name=\1 nightly/g' \
+ "$pkgdir/usr/lib/kicad-nightly/share/applications/$prog.desktop"
+ mv "$pkgdir/usr/lib/kicad-nightly/share/applications/$prog.desktop" \
+ "$pkgdir/usr/lib/kicad-nightly/share/applications/${prog}-nightly.desktop"
+ done
+ mv "$pkgdir/usr/lib/kicad-nightly/share/applications" "$pkgdir/usr/share"
+
+ cd "$srcdir"
+ mkdir -p "$pkgdir/usr/share/kicad-nightly"
+ cp kicad-nightly.env "$pkgdir/usr/share/kicad-nightly/kicad-nightly.env"
+
+ mkdir -p "$pkgdir/usr/bin"
+ (cd "$pkgdir/usr/lib/kicad-nightly/bin" && ls | grep -v '\.kiface') | while read prog; do
+ cat > "$pkgdir/usr/bin/$prog-nightly" <<EOF
+#!/bin/sh
+. /usr/share/kicad-nightly/kicad-nightly.env
+exec /usr/lib/kicad-nightly/bin/$prog
+EOF
+ chmod +x "$pkgdir/usr/bin/$prog-nightly"
+ done
+
+ cd "$srcdir/kicad-i18n/build"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/kicad-nightly.env b/kicad-nightly.env
new file mode 100644
index 00000000000..da9ad41eeba
--- /dev/null
+++ b/kicad-nightly.env
@@ -0,0 +1,3 @@
+export LD_LIBRARY_PATH=/usr/lib/kicad-nightly/lib
+export KICAD_PATH=/usr/share/kicad-nightly
+export KICAD_CONFIG_HOME="$HOME/.config/kicadnightly"