mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Add support for building RTEMS 3rd party packages.
Remove the 'opt' from various macros and shell variables. Add pkgconfig to the checks to make it clear the check is a pkgconfig check. Add NTP support as the first package to be built using the RSB. Split the RTEMS URL's out from the base bset file into a separate file that be included by other files. Add an RTEMS BSP configuration file to help abstract the process of building 3rd party packages. Clean the cross and canadian cross support up so we can cleanly support cross and canadian cross building. Refactor the pkgconfig support and clean up the PC file handling of loading modules. Add support for %{?..} to return false if a macro is %{nil}. Add %{pkgconfig ..} support to allow better control of access RTEMS pkgconfig files.
This commit is contained in:
@@ -54,7 +54,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
fi
|
||||
export CFLAGS CFLAGS_FOR_BUILD CC
|
||||
|
||||
CFLAGS="$SB_OPT_FLAGS" \
|
||||
CFLAGS="$SB_CFLAGS" \
|
||||
./configure \
|
||||
--build=%{_build} --host=%{_host} \
|
||||
--verbose --disable-nls \
|
||||
|
@@ -54,7 +54,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
fi
|
||||
export CFLAGS CFLAGS_FOR_BUILD CC
|
||||
|
||||
CFLAGS="$SB_OPT_FLAGS" \
|
||||
CFLAGS="$SB_CFLAGS" \
|
||||
./configure \
|
||||
--build=%{_build} --host=%{_host} \
|
||||
--verbose \
|
||||
|
@@ -34,7 +34,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
%if "%{_build}" != "%{_host}"
|
||||
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
|
||||
%endif
|
||||
CFLAGS="$SB_OPT_FLAGS" \
|
||||
CFLAGS="$SB_CFLAGS" \
|
||||
../gdb-%{gdb_version}/configure \
|
||||
--build=%{_build} --host=%{_host} \
|
||||
--target=%{_target} \
|
||||
|
@@ -24,8 +24,8 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
#
|
||||
# Fix the mess iconv is on FreeBSD 10.0.
|
||||
#
|
||||
%if %{defined iconv_optincludes}
|
||||
%define optincludes %{iconv_optincludes}
|
||||
%if %{defined iconv_includes}
|
||||
%define includes %{iconv_includes}
|
||||
%endif
|
||||
|
||||
#
|
||||
|
@@ -54,7 +54,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
fi
|
||||
export CFLAGS CFLAGS_FOR_BUILD CC
|
||||
|
||||
CFLAGS="$SB_OPT_FLAGS" \
|
||||
CFLAGS="$SB_CFLAGS" \
|
||||
./configure \
|
||||
--build=%{_build} --host=%{_host} \
|
||||
--verbose --disable-nls \
|
||||
|
@@ -36,7 +36,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
%if "%{_build}" != "%{_host}"
|
||||
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
|
||||
%endif
|
||||
CFLAGS="$SB_OPT_FLAGS" \
|
||||
CFLAGS="$SB_CFLAGS" \
|
||||
./configure \
|
||||
--build=%{_build} --host=%{_host} \
|
||||
--verbose --disable-nls \
|
||||
|
@@ -35,7 +35,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
%if "%{_build}" != "%{_host}"
|
||||
CFLAGS_FOR_BUILD="-g -O2 -Wall" \
|
||||
%endif
|
||||
CFLAGS="$SB_OPT_FLAGS" \
|
||||
CFLAGS="$SB_CxsFLAGS" \
|
||||
./configure \
|
||||
--build=%{_build} --host=%{_host} \
|
||||
--verbose --disable-nls \
|
||||
|
62
source-builder/config/ntp-4-1.cfg
Normal file
62
source-builder/config/ntp-4-1.cfg
Normal file
@@ -0,0 +1,62 @@
|
||||
#
|
||||
# NTP 4.x.x Version 1.
|
||||
#
|
||||
# This configuration file configure's, make's and install's NTP.
|
||||
#
|
||||
|
||||
%if %{release} == %{nil}
|
||||
%define release 1
|
||||
%endif
|
||||
|
||||
Name: ntp-%{ntp_version}-%{_host}-%{release}
|
||||
Summary: NTP is the Network Time Protocol.
|
||||
Version: %{ntp_version}
|
||||
Release: %{release}
|
||||
URL: http://www.ntp.org/
|
||||
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
||||
|
||||
#
|
||||
# NTP Source
|
||||
#
|
||||
%source set ntp http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-%{ntp_version}.tar.gz
|
||||
|
||||
#
|
||||
# Prepare the source code.
|
||||
#
|
||||
%prep
|
||||
build_top=$(pwd)
|
||||
|
||||
source_dir_ntp="ntp-%{ntp_version}"
|
||||
%source setup ntp -q -n ntp-%{ntp_version}
|
||||
%patch setup ntp -p1
|
||||
|
||||
cd ${build_top}
|
||||
|
||||
%build
|
||||
build_top=$(pwd)
|
||||
|
||||
%{build_directory}
|
||||
|
||||
mkdir -p ${build_dir}
|
||||
cd ${build_dir}
|
||||
|
||||
%{host_build_flags}
|
||||
|
||||
../${source_dir_ntp}/configure \
|
||||
--host=%{_host} \
|
||||
--prefix=%{_prefix} \
|
||||
--disable-ipv6 \
|
||||
--disable-HOPFPCI
|
||||
|
||||
%{__make} %{?_smp_mflags} all
|
||||
|
||||
cd ${build_top}
|
||||
|
||||
%install
|
||||
build_top=$(pwd)
|
||||
|
||||
%{__rmdir} $SB_BUILD_ROOT
|
||||
|
||||
cd ${build_dir}
|
||||
%{__make} DESTDIR=$SB_BUILD_ROOT install
|
||||
cd ${build_top}
|
Reference in New Issue
Block a user