1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

LP-62 - Implement RPM specfile.

- Gives the option to build firmware.
   	  $ make package RPMBUILD_OPTS="-bb --with firmware"
This commit is contained in:
Roy Bekken 2015-08-05 15:52:00 +02:00
parent 6019e2c2b7
commit b9d3698875

View File

@ -53,7 +53,30 @@ and ease of use.
%build
make %{?_smp_mflags} gcs QMAKE=qmake-qt5 CC=%{__cc} CXX=%{__cxx} libbasename=%{_lib}
%if 0%{?_with_firmware:1}
# If you want to build firmware you will need to install the arm-none-eabi-gcc tool chain.
# You can not install the default system version available via dnf, since it don't have
# the features needed to compile the firmware.
#
# The easiest way to install a working arm tool chain is to fetch a package from
# launchpad.net: https://launchpad.net/gcc-arm-embedded.
#
# LibrePilot currently use gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2
#
# Unpack the file and move to /opt/:
# tar xjvf gcc-arm-none-eabi-4_9-2014q4-20141203-linux.tar.bz2
# sudo mv gcc-arm-none-eabi-4_9-2014q4 /opt/arm
# echo "PATH=/opt/arm/bin:$PATH" >> ~/.bashrc
# echo "export PATH" >> ~/.bashrc
# source ~/.bashrc
#
# NOTE: You need to have glibc 32bit
make %{?_smp_mflags} opfw_resource
%endif
make %{?_smp_mflags} gcs QMAKE=qmake-qt5 libbasename=%{_lib}
%install