Sisyphus repository
Last update: 23 september 2019 | SRPMs: 17473 | Visits: 15148109
en ru br
ALT Linux repos

Group :: Other
RPM: arduino-builder

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Group: Other
# BEGIN SourceDeps(oneline):
BuildRequires(pre): rpm-macros-golang
BuildRequires: gcc-c++ rpm-build-golang
# END SourceDeps(oneline)
# see
%define _localstatedir %{_var}
Name:           arduino-builder
Version:        1.3.25
Release:        alt2_4
Summary:        A command line tool for compiling Arduino sketches
License:        GPLv2+
Patch1:         fix-paths-to-ctags-avrdude.patch
#Patch2:         make-tools-flag-optional.patch

Requires:       arduino-ctags

BuildRequires:  gcc-common
BuildRequires:  golang >= 1.4.3
BuildRequires:  git

#ExcludeArch: aarch64

# BuildRequires:  golang(

# Needed for unit tests

# BuildRequires:  golang(
# These are not available, check will not be enabled
#BuildRequires:  golang(
#BuildRequires:  golang(
#BuildRequires:  golang(

This tool is able to parse Arduino Hardware specifications, properly run
gcc and produce compiled sketches.
An Arduino sketch differs from a standard C program in that it misses a
main (provided by the Arduino core), function prototypes are not mandatory,
and libraries inclusion is automagic (you just have to #include them).
This tool generates function prototypes and gathers library paths,
providing gcc with all the needed -I params.

%setup -q
%patch1 -p1
# %%patch2 -p1

# set up temporary build gopath, and put our directory there
mkdir -p ./_build
ln -s $(pwd)/src ./_build/

export GOPATH="$(pwd)/_build:%{go_path}:$(pwd)/vendor"

# Fix missing build-id

function gobuild { go build -a -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -v -x "$ at "; }
pushd src/

install -d %{buildroot}%{_bindir}
install -p -m 0755 ./src/ %{buildroot}%{_bindir}/arduino-builder

install -d %{buildroot}%{_datadir}/arduino/hardware
install -p src/*.txt %{buildroot}%{_datadir}/arduino/hardware

# Check needs libraries that are not available

#export GOPATH=$(pwd)/_build:%%{go_path}
#go test -v ./src/

%doc LICENSE.txt


Full changelog you can see here

design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin