Skip to content

Commit

Permalink
Pass configure arguments properly to mock. Also update dependencies
Browse files Browse the repository at this point in the history
to build NXvalidate. Refs #328


git-svn-id: https://svn.nexusformat.org/code/trunk@1820 ff5d1e40-2be0-497f-93bd-dc18237bd3c7
  • Loading branch information
FreddieAkeroyd authored and Freddie Akeroyd committed Feb 10, 2012
1 parent 9c6269d commit ce77ca1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
7 changes: 4 additions & 3 deletions build_rpm.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ if ! test -z "$2"; then
RESULTS=/tmp/nexus-mock-results
mkdir -p $RESULTS
mock_args="-r $2 --resultdir=$RESULTS"
rm -f $RESULTS/*.src.rpm # clean up so do not pick up wrong .src.rpm later
mock ${mock_args} --init
env NEXUS_CONFIG_OPTIONS="$build_args" mock ${mock_args} --buildsrpm --spec nexus.spec --sources . --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5"
mock ${mock_args} --buildsrpm --spec nexus.spec --sources . --define "nexus_config_options $build_args" --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5"
srpm=`ls $RESULTS/*.src.rpm`
env NEXUS_CONFIG_OPTIONS="$build_args" mock ${mock_args} --rebuild $srpm --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5"
mock ${mock_args} --rebuild $srpm --define "nexus_config_options $build_args" --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5"
else
# buildroot is actually where we install to
cd $topdir/SPECS
env NEXUS_CONFIG_OPTIONS="$build_args" rpmbuild -ba --buildroot $nxtop/installroot --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" nexus.spec
rpmbuild -ba --buildroot $nxtop/installroot --define "nexus_config_options $build_args" --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" nexus.spec
fi
22 changes: 20 additions & 2 deletions nexus_spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,34 @@ Packager: NeXus Developers <nexus-developers@nexusformat.org>
%define is_rhel5 1
%endif

%if 0%{?rhel} == 6
%define is_rhel6 1
%endif
%if 0%{?el6}
%define is_rhel6 1
%endif
%if "0%{?dist}" == "0.el6"
%define is_rhel6 1
%endif

BuildRoot: %{_tmppath}/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
BuildRequires: python numpy
BuildRequires: hdf5-devel hdf-devel
BuildRequires: libxml2-devel
BuildRequires: java-1.6.0-openjdk-devel
BuildRequires: readline-devel
# mxml is not in rhel or epel as yet
# ant on rhel5 is too old to build NXvalidate
%if 0%{?fedora}
BuildRequires: mxml-devel
BuildRequires: ant
%endif
%if 0%{?is_rhel5}
BuildRequires: python-ctypes
%endif
%if 0%{?is_rhel6}
BuildRequires: ant ant-nodeps
%endif

%description
NeXus is an international standard for exchanging data files
Expand Down Expand Up @@ -107,9 +125,9 @@ data is stored using the HDF format from NCSA. This package provides
# RPM_INSTALL_PREFIX - where to install software
# do --prefix last in case also present in passed config options
if ! test -z "$RPM_INSTALL_PREFIX"; then
./configure $NEXUS_CONFIG_OPTIONS --prefix="$RPM_INSTALL_PREFIX"
./configure %{?nexus_config_options} --prefix="$RPM_INSTALL_PREFIX"
else
./configure $NEXUS_CONFIG_OPTIONS --prefix=%{_prefix} --libdir=%{_libdir}
./configure %{?nexus_config_options} --prefix=%{_prefix} --libdir=%{_libdir}
fi
make

Expand Down

0 comments on commit ce77ca1

Please sign in to comment.