Documentation:AVR32 General/Manual installation of tools
From AVRFreaks Wiki
[edit] Why build manually?
Some AVR32 tools can be installed manually. This is usefull in the following situations:
- The user wants to modify the tool
- The user has a different platform than what is supported
- The user has problems with the automatic installation procedure
[edit] The .spec file
The Board Support Package is delivered with the source code for most AVR32 tools. The source code includes a .spec file which follows the RPM Package Mangager (RPM) system and used to build rpms. By viewing the .spec file the user will see how to build the tool.
[edit] Example: alsa lib for AVR32 Linux
- Get the source for alsa-lib from the BSP.
- Open alsa-lib-avr32.spec
This is a summary of the alsa-lib-avr32.spec:
...
Name: alsa-lib-avr32
Version: 1.0.11
Source: alsa-lib-%{version}.tar.bz2
...
Patch0: alsa-lib-1.0.11-add-avr32-to-configure.patch
Patch1: alsa-lib-1.0.11-convert-enums-to-int.patch
Patch2: alsa-lib-1.0.11-fix-static-linking.patch
Patch3: alsa-lib-1.0.11-remove-compile-warnings.patch
...
%prep
%setup -n alsa-lib-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
./configure --prefix=/usr --host=avr32-linux --enable-static=yes \
--enable-shared=no
make
%install
...
make install DESTDIR=%{buildroot} prefix=/usr/avr32-linux exec_prefix='${prefix}'
- Perform the %setup step manually:
$ tar -xf alsa-lib-1.0.11.tar.bz2 $ cd alsa-lib-1.0.11
- Perform the %prep step manually
$ patch -p1 < ../alsa-lib-1.0.11-add-avr32-to-configure.patch $ patch -p1 < ../alsa-lib-1.0.11-convert-enums-to-int.patch $ patch -p1 < ../alsa-lib-1.0.11-fix-static-linking.patch $ patch -p1 < ../alsa-lib-1.0.11-remove-compile-warnings.patch
- Perform the %build step manually:
$ ./configure --prefix=/usr --host=avr32-linux --enable-static=yes --enable-shared=no $ make
- Perform the %install step manually:
$ make install prefix=/usr/avr32-linux exec_prefix=/usr/avr32-linux
