mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00

On NetBSD with ksh changing into a symlink made PWD the link's target path so a 'cd ..' returned you to that parent and not the parent you started from. Record the build top and then change back to that path. Change the package names to the actual packages and remove the extra directory in the build tree. This makes the paths simpler.
61 lines
1.1 KiB
INI
61 lines
1.1 KiB
INI
#
|
|
# DTC 1.x.x Version 1.
|
|
#
|
|
# This configuration file configure's, make's and install's DTC.
|
|
#
|
|
|
|
%if %{release} == %{nil}
|
|
%define release 1
|
|
%endif
|
|
|
|
Name: dtc-%{dtc_version}-%{_host}-%{release}
|
|
Summary: Device Tree Compiler v%{dtc_version} for target %{_target} on host %{_host}
|
|
Version: %{dtc_version}
|
|
Release: %{release}
|
|
URL: http://www.jdl.com/software/
|
|
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
|
|
|
|
#
|
|
# Source
|
|
#
|
|
Source0: http://www.jdl.com/software/dtc-v%{dtc_version}.tgz
|
|
|
|
#
|
|
# Prepare the source code.
|
|
#
|
|
%prep
|
|
build_top=$(pwd)
|
|
|
|
%setup -q -n dtc-v%{dtc_version}
|
|
%{?patch0:%patch0 -p1}
|
|
%{?patch1:%patch1 -p1}
|
|
%{?patch2:%patch2 -p1}
|
|
%{?patch3:%patch3 -p1}
|
|
%{?patch4:%patch4 -p1}
|
|
%{?patch5:%patch5 -p1}
|
|
%{?patch6:%patch6 -p1}
|
|
%{?patch7:%patch7 -p1}
|
|
|
|
cd ${build_top}
|
|
|
|
%build
|
|
build_top=$(pwd)
|
|
|
|
cd dtc-v%{dtc_version}
|
|
|
|
%{build_build_flags}
|
|
|
|
%{__make} PREFIX=%{_prefix}
|
|
|
|
cd ${build_top}
|
|
|
|
%install
|
|
build_top=$(pwd)
|
|
|
|
rm -rf $SB_BUILD_ROOT
|
|
|
|
cd dtc-v%{dtc_version}
|
|
%{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install
|
|
|
|
cd ${build_top}
|