diff options
author | Chris Johns <chrisj@rtems.org> | 2013-09-10 16:19:20 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2013-09-10 16:19:20 +1000 |
commit | b8b0f4452f8775bfbcb19cb82da22673f1b74ab1 (patch) | |
tree | 9a37f35c7290e22d43c0e4f291a145190e4f2f2a /source-builder/config/dtc-1-1.cfg | |
parent | doc: Add NetBSD. (diff) | |
download | rtems-source-builder-b8b0f4452f8775bfbcb19cb82da22673f1b74ab1.tar.bz2 |
config: Use ${build_top} to change dir to parent.
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.
Diffstat (limited to 'source-builder/config/dtc-1-1.cfg')
-rw-r--r-- | source-builder/config/dtc-1-1.cfg | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source-builder/config/dtc-1-1.cfg b/source-builder/config/dtc-1-1.cfg index 2ca99cf..14d9639 100644 --- a/source-builder/config/dtc-1-1.cfg +++ b/source-builder/config/dtc-1-1.cfg @@ -24,8 +24,9 @@ Source0: http://www.jdl.com/software/dtc-v%{dtc_version}.tgz # Prepare the source code. # %prep - %setup -q -c -n %{name}-%{version} - cd dtc-v%{dtc_version} + build_top=$(pwd) + + %setup -q -n dtc-v%{dtc_version} %{?patch0:%patch0 -p1} %{?patch1:%patch1 -p1} %{?patch2:%patch2 -p1} @@ -34,21 +35,26 @@ Source0: http://www.jdl.com/software/dtc-v%{dtc_version}.tgz %{?patch5:%patch5 -p1} %{?patch6:%patch6 -p1} %{?patch7:%patch7 -p1} - cd .. + + cd ${build_top} %build + build_top=$(pwd) + cd dtc-v%{dtc_version} %{build_build_flags} %{__make} PREFIX=%{_prefix} - cd .. + 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 .. + cd ${build_top} |