diff options
author | dx-mon | 2020-10-14 00:01:19 +0100 |
---|---|---|
committer | dx-mon | 2020-10-14 00:01:19 +0100 |
commit | d7c3688a6521ba15142b9a66bd5bf91a3f4fdbd8 (patch) | |
tree | 856e6643c978ddb183f30bc1ca5fdc5cf00f5550 | |
parent | a51f0ac21fa56dc6845476f90723463529b02642 (diff) | |
download | aur-d7c3688a6521ba15142b9a66bd5bf91a3f4fdbd8.tar.gz |
Bump to KiCAD 5.99.0-4027-g505d764f2 and add update automation
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | PKGBUILD.in | 102 | ||||
-rwxr-xr-x | updatePackage | 48 |
4 files changed, 155 insertions, 7 deletions
@@ -1,6 +1,6 @@ pkgbase = kicad-nightly pkgdesc = Electronic schematic and printed circuit board (PCB) design tools - pkgver = 5.99.0_3990_g5afae757f + pkgver = 5.99.0_4027_g505d764f2 pkgrel = 1 url = http://kicad-pcb.org/ arch = x86_64 @@ -22,7 +22,7 @@ pkgbase = kicad-nightly 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=5afae757f + source = git+https://gitlab.com/kicad/code/kicad.git#commit=505d764f2 source = git+https://gitlab.com/kicad/code/kicad-i18n.git#commit=636831f source = kicad-nightly.env sha256sums = SKIP @@ -1,7 +1,7 @@ # Maintainer: Rachel Mant <dx-mon@users.sourceforge.net> pkgname=kicad-nightly -pkgver=5.99.0_3990_g5afae757f +pkgver=5.99.0_4027_g505d764f2 pkgrel=1 pkgdesc='Electronic schematic and printed circuit board (PCB) design tools' arch=('x86_64') @@ -13,11 +13,9 @@ optdepends=( 'kicad-library: for footprints and symbols' 'kicad-library-3d: for 3d models of components' ) -_kicad_commit=5afae757f # master -_i18n_commit=636831f # 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 + 'git+https://gitlab.com/kicad/code/kicad.git'#commit=505d764f2 + 'git+https://gitlab.com/kicad/code/kicad-i18n.git'#commit=636831f 'kicad-nightly.env' ) sha256sums=( diff --git a/PKGBUILD.in b/PKGBUILD.in new file mode 100644 index 000000000000..5b4f39d6bff5 --- /dev/null +++ b/PKGBUILD.in @@ -0,0 +1,102 @@ +# Maintainer: Rachel Mant <dx-mon@users.sourceforge.net> + +pkgname=kicad-nightly +pkgver=@KICAD_VERSION@ +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=('git' 'cmake' 'zlib' 'mesa' 'boost' 'swig') +optdepends=( + 'kicad-library: for footprints and symbols' + 'kicad-library-3d: for 3d models of components' +) +source=( + 'git+https://gitlab.com/kicad/code/kicad.git'#commit=@KICAD_HASH@ + 'git+https://gitlab.com/kicad/code/kicad-i18n.git'#commit=@I18N_HASH@ + '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/updatePackage b/updatePackage new file mode 100755 index 000000000000..62a64afbeb26 --- /dev/null +++ b/updatePackage @@ -0,0 +1,48 @@ +#!/bin/bash + +_update() +{ + cd kicad + git fetch + cd ../kicad-i18n + git fetch + cd .. +} + +_kicadVersion() +{ + cd kicad + git describe --tag | sed 's/-/_/g' + cd .. +} + +_kicadHash() +{ + cd kicad + git rev-parse --short master + cd .. +} + +_i18nHash() +{ + cd kicad-i18n + git rev-parse --short master + cd .. +} + +_buildPKGBUILD() +{ + sed -e "s/@KICAD_VERSION@/$(_kicadVersion)/" \ + -e "s/@KICAD_HASH@/$(_kicadHash)/" \ + -e "s/@I18N_HASH@/$(_i18nHash)/" \ + PKGBUILD.in > PKGBUILD +} + +_updateSRCINFO() +{ + makepkg --printsrcinfo > .SRCINFO +} + +_update +_buildPKGBUILD +_updateSRCINFO |