2013-12-30 17:07:36 +01:00
# How to compile an RPM
2013-12-30 21:07:22 +01:00
First install the dependencies as root:
2014-04-04 22:54:26 +02:00
yum install arduino-core rpm-build
2013-12-30 21:07:22 +01:00
From the top-level Arduino-Makefile directory you've checked out of github, run the following (as unprivileged user) to create a compressed tarball using the naming conventions required by rpmbuild:
2013-12-30 17:07:36 +01:00
2014-04-12 17:12:42 +02:00
git archive HEAD --prefix=arduino-mk-1.3.3/ -o ../arduino-mk-1.3.3.tar.gz
2013-12-30 17:07:36 +01:00
If you don't already have a rpmbuild setup (e.g. you've not installed the SRPM) you will need to create the directories:
mkdir -p ~/rpmbuild/{SOURCES,SPECS}
2013-12-30 21:07:22 +01:00
Then copy the tarball and specfile into those directories:
2013-12-30 17:07:36 +01:00
2014-04-12 17:12:42 +02:00
cp ../arduino-mk-1.3.3.tar.gz ~/rpmbuild/SOURCES/
2013-12-30 21:07:22 +01:00
cp packaging/fedora/arduino-mk.spec ~/rpmbuild/SPECS/
2013-12-30 17:07:36 +01:00
Then compile. This will create a binary and source RPM:
cd ~/rpmbuild/SPECS/
rpmbuild -ba arduino-mk.spec
2014-02-04 18:41:51 +01:00
Fedora's AVR compilers use ccache, so you may have to override some of the paths to the AVR tools in your sketch's Makefile, for example:
OVERRIDE_EXECUTABLES = 1
CC = /usr/lib64/ccache/$(CC_NAME)
CXX = /usr/lib64/ccache/$(CXX_NAME)
AS = /usr/bin/$(AS_NAME)
OBJCOPY = /usr/bin/$(OBJCOPY_NAME)
OBJDUMP = /usr/bin/$(OBJDUMP_NAME)
AR = /usr/bin/$(AR_NAME)
SIZE = /usr/bin/$(SIZE_NAME)
NM = /usr/bin/$(NM_NAME)