Name: arduino-builder Version: 1.0.5 Release: 2%{?dist} Summary: A command line tool for compiling Arduino sketches License: GPLv2+ URL: http://www.arduino.cc Source0: https://github.com/arduino/arduino-builder/archive/1.0.5.tar.gz#/arduino-builder-1.0.5.tar.gz BuildRequires: gcc BuildRequires: golang >= 1.4.3 BuildRequires: git BuildRequires: golang(github.com/go-errors/errors) # Needed for unit tests BuildRequires: golang(github.com/stretchr/testify) # These are not available, check will not be enabled #BuildRequires: golang(github.com/jstemmer/go-junit-report) #BuildRequires: golang(golang.org/x/codereview/patch) #BuildRequires: golang(golang.org/x/tools/cmd/vet) %description 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. %prep %setup -q %build # set up temporary build gopath, and put our directory there mkdir -p ./_build ln -s $(pwd)/src ./_build/ export GOPATH=$(pwd)/_build:%{gopath} # Fix missing build-id function gobuild { go build -a -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -v -x "$@"; } gobuild %install install -d %{buildroot}%{_bindir} install -p -m 0755 ./arduino-builder-%{version} %{buildroot}%{_bindir}/arduino-builder # Check needs golang.org/x/ libraries that are not available #%%check #export GOPATH=$(pwd)/_build:%%{gopath} #go test -v ./src/arduino.cc/builder/test/... %files %defattr(-,root,root,-) %doc CONTRIBUTING.md LICENSE.txt README.md %{_bindir}/arduino-builder %changelog * Fri Nov 4 2016 Gianluca Sforna 1.0.5-2 - use proper dependencies * Fri Nov 4 2016 Gianluca Sforna 1.0.5-1 - initial package