diff options
author | Grey Christoforo | 2019-09-24 18:41:38 +0100 |
---|---|---|
committer | Grey Christoforo | 2019-09-24 18:41:38 +0100 |
commit | 10f71a8315e74c3645a009cdf279b7b6f4493a0c (patch) | |
tree | 2b24d002b1f986aac61c5746ac5ee0349fb291ba | |
download | aur-10f71a8315e74c3645a009cdf279b7b6f4493a0c.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 67 |
3 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..04de7dee6a31 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = arduino-builder-rc + pkgdesc = A command line tool for compiling Arduino sketches -- stable and release candidates + pkgver = 1.4.7 + pkgrel = 1 + url = https://github.com/arduino/arduino-builder + arch = x86_64 + license = GPL + makedepends = go + makedepends = git + makedepends = unzip + depends = arduino-ctags + optdepends = arduino-avr-core: AVR core with upstream avr-gcc and avrdude + optdepends = arduino-cli: Arduino command line interface + provides = arduino-builder + conflicts = arduino-builder + source = https://github.com/arduino/arduino-builder/archive/1.4.7.tar.gz + sha512sums = 7550a8ec97e20ce88f519a33158df575c76b2de133d57db0323453f04a0bbe8484030f80e71fdcd095127289e53bcd635a056eb32845b7a7203003be2f5a9ab7 + +pkgname = arduino-builder-rc + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ac1ac99a9881 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +src/ +pkg/ +*.zip +*.asc +*.tar.gz +*.tar.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b2c97bac8018 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,67 @@ + +pkgname=arduino-builder-rc +pkgver=1.4.7 +pkgrel=1 +pkgdesc="A command line tool for compiling Arduino sketches -- stable and release candidates" +arch=('x86_64') +url="https://github.com/arduino/arduino-builder" +license=('GPL') +conflicts=('arduino-builder') +provides=('arduino-builder') +depends=('arduino-ctags') +makedepends=('go' 'git' 'unzip') +optdepends=('arduino-avr-core: AVR core with upstream avr-gcc and avrdude' + 'arduino-cli: Arduino command line interface') +source=("https://github.com/arduino/arduino-builder/archive/${pkgver}.tar.gz") + +sha512sums=('7550a8ec97e20ce88f519a33158df575c76b2de133d57db0323453f04a0bbe8484030f80e71fdcd095127289e53bcd635a056eb32845b7a7203003be2f5a9ab7') + + +prepare(){ + export GOPATH="$srcdir"/gopath + + mkdir -p "$GOPATH"/src/github.com/arduino + ln -rTsf "${pkgname//-rc}-$pkgver" "$GOPATH"/src/github.com/arduino/arduino-builder + cd "$GOPATH"/src/github.com/arduino/arduino-builder + + export GO111MODULE=on + + go mod vendor + go mod download +} + +build() { + export GOPATH="$srcdir"/gopath + cd "$GOPATH"/src/github.com/arduino/arduino-builder + + go build \ + -buildmode=pie \ + -gcflags "all=-trimpath=$GOPATH" \ + -asmflags "all=-trimpath=$GOPATH" \ + -ldflags "-extldflags $LDFLAGS" \ + -v . +} + +check() { + # Test will download ~1GB of testfiles + cd "$GOPATH"/src/github.com/arduino/arduino-builder + go test -v -timeout 60m . +} + +package() { + # Fix platform.txt for arch arduino-ctags + #cd "${srcdir}/build/src/github.com/arduino/arduino-builder/hardware" + #sed -i 's#^tools.ctags.path=.*#tools.ctags.path=/usr/bin#' platform.txt + #sed -i 's#^tools.ctags.cmd.path=.*#tools.ctags.cmd.path={path}/arduino-ctags#' platform.txt + + cd "$GOPATH"/src/github.com/arduino/arduino-builder + + # Install main tool + install -Dm755 "arduino-builder" "${pkgdir}/usr/bin/arduino-builder" + + # Install platform.txt files + #install -Dm644 -t "${pkgdir}/usr/share/arduino/hardware/" "${srcdir}"/build/src/github.com/arduino/arduino-builder/hardware/* + + # Add documentation + install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname//-rc}" "${srcdir}/${pkgname//-rc}-${pkgver}/README.md" +} |