diff --git a/arduino.spec b/arduino.spec index a6dca11..10836f3 100644 --- a/arduino.spec +++ b/arduino.spec @@ -1,7 +1,8 @@ +### AUTOUPDATE-OFF: 8 %define longversion %(echo 0%version | tr -d .) Name: arduino -Version: 1.0.1 +Version: 1.8.9 Release: 1mamba Summary: The open-source Arduino environment Group: Graphical Desktop/Applications/Development @@ -9,7 +10,7 @@ Vendor: openmamba Distribution: openmamba Packager: Stefano Cotta Ramusino URL: http://www.arduino.cc/en/Main/software -Source: http://arduino.googlecode.com/files/arduino-%{version}-src.tar.gz +Source: https://github.com/arduino/Arduino.git/%{version}/Arduino-%{version}.tar.bz2 Source1: arduino-1.0.1-icons.tar.xz Patch0: arduino-1.0.1-script.patch # http://github.com/arduino/Arduino/pull/5 @@ -18,6 +19,7 @@ Patch1: arduino-1.0-use_system_rxtx.patch Patch2: arduino-1.0-etc.patch License: GPL ## AUTOBUILDREQ-BEGIN +BuildRequires: java-rxtx BuildRequires: ldconfig ## AUTOBUILDREQ-END BuildRequires: apache-ant @@ -26,7 +28,6 @@ Requires: cross-avr-gcc Requires: avr-libc Requires: avrdude Requires: java-rxtx -BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-root %description @@ -34,9 +35,9 @@ The open-source Arduino environment makes it easy to write code and upload it to The environment is written in Java and based on Processing, avr-gcc, and other open source software. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 +%setup -q -n Arduino-%{version} +#%patch0 -p1 +#%patch1 -p1 %patch2 -p1 ( @@ -45,26 +46,52 @@ cd build/linux/icons tar xf %{SOURCE1} ) -find -name '*.class' -exec rm -f '{}' \; -find -name '*.jar' -exec rm -f '{}' \; -build-jar-repository -p -s app/lib/ ecj jna RXTXcomm +#find -name '*.class' -exec rm -f '{}' \; +#find -name '*.jar' -exec rm -f '{}' \; +#build-jar-repository -p -s app/lib/ ecj jna RXTXcomm %build -(cd core/methods; ant) -(cd core; ant) -(cd build; ant dist < /dev/null; tar -xf linux/arduino-%{longversion}-linux.tgz) +%ifarch x86_64 +export platform=linux64 +%endif +%ifarch %{ix86} +export platform=linux32 +%endif +%ifarch arm +export platform=linuxarm +export LD_PRELOAD=/usr/lib/libatomic.so +%endif + +cd build + +count=0 +set +e +while [[ count -lt 5 ]]; do +# Workaround for java random crashes on build servers +count=$((count+1)) +#(cd core/methods; ant) +#(cd core; ant) +ant -Djava.net.preferIPv4Stack=true -Dplatform=${platform} dist << __END + +__END +[ $? -eq 0 ] && break +done +[ $? -ne 0 ] && exit 1 +set -e +tar -xf linux/arduino-%{version}-${platform}.tar.xz %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -cd build/arduino-%{longversion} +cd build/arduino-%{version} install -d %{buildroot}%{_bindir} cp -a arduino %{buildroot}%{_bindir}/ install -d %{buildroot}%{_datadir}/arduino + cp -a hardware lib libraries examples %{buildroot}%{_datadir}/arduino/ -rm %{buildroot}%{_datadir}/arduino/lib/*.jar -rm -r %{buildroot}%{_datadir}/arduino/hardware/tools +#rm %{buildroot}%{_datadir}/arduino/lib/*.jar +#rm -r %{buildroot}%{_datadir}/arduino/hardware/tools mkdir -p %{buildroot}%{_defaultdocdir}/arduino-%{version} cp -a reference %{buildroot}%{_defaultdocdir}/arduino-%{version}/ @@ -73,7 +100,7 @@ ln -s %{_defaultdocdir}/arduino-%{version}/reference %{buildroot}%{_datadir}/ard # Requested upstream in http://github.com/arduino/Arduino/pull/4: find %{buildroot} -type f -iname '*.jpg' -or -iname '*.java' -or -iname '*.pde' -or -iname '*.h' -or -iname '*.cpp' -or -iname '*.c' -or -iname '*.txt' -or -iname 'makefile' -or -iname 'key*.txt' -or -iname 'pref*.txt' | xargs chmod -x; -cp -a lib/core.jar lib/pde.jar %{buildroot}%{_datadir}/%{name}/ +#cp -a lib/core.jar lib/pde.jar %{buildroot}%{_datadir}/%{name}/ install -D -m 0644 ../linux/arduino.1 \ %{buildroot}%{_mandir}/man1/arduino.1 @@ -100,6 +127,12 @@ done %doc %{_defaultdocdir}/arduino-%{version}/reference %changelog +* Sun Nov 24 2019 Automatic Build System 1.8.9-1mamba +- automatic version update by autodist + +* Sat Dec 16 2017 Silvan Calarco 1.8.5-1mamba +- update to 1.8.5 + * Wed May 23 2012 Stefano Cotta Ramusino 1.0.1-1mamba - update to 1.0.1