| Revision 1820,
1.7 KB
checked in by Freddie Akeroyd, 3 months ago
(diff) |
|
Pass configure arguments properly to mock. Also update dependencies
to build NXvalidate. Refs #328
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | # |
|---|
| 3 | # $Id$ |
|---|
| 4 | # |
|---|
| 5 | # Script to build RPMs from current nexus*.tar.gz file |
|---|
| 6 | # Copyright (C) 2004 Freddie Akeroyd |
|---|
| 7 | # |
|---|
| 8 | # $1 is set to any options you want to pass to ./configure |
|---|
| 9 | # |
|---|
| 10 | # get topdir - must find a better way ... |
|---|
| 11 | topdir=`rpm --showrc|grep topdir| awk '{print $3}' | tail -1` |
|---|
| 12 | if test ! -e "$topdir"; then |
|---|
| 13 | echo "Unable to determine RPM topdir from rpmrc; assuming $HOME/rpmbuild" |
|---|
| 14 | topdir="$HOME/rpmbuild" |
|---|
| 15 | fi |
|---|
| 16 | if test ! -w "$topdir"; then |
|---|
| 17 | echo "ERROR: RPM build directory not writable - check README.rpm" |
|---|
| 18 | exit |
|---|
| 19 | fi |
|---|
| 20 | # |
|---|
| 21 | nxtop=`pwd` |
|---|
| 22 | rm -fr $nxtop/installroot |
|---|
| 23 | mkdir $nxtop/installroot |
|---|
| 24 | # |
|---|
| 25 | make dist |
|---|
| 26 | ln -sf $nxtop/@PACKAGE_TARNAME@-@PACKAGE_VERSION@.tar.gz $topdir/SOURCES |
|---|
| 27 | cp $nxtop/nexus.spec $topdir/SPECS |
|---|
| 28 | # |
|---|
| 29 | if test -z "$1"; then |
|---|
| 30 | build_args='@CONFIGURE_ARGS@' |
|---|
| 31 | else |
|---|
| 32 | build_args="$1" |
|---|
| 33 | fi |
|---|
| 34 | if ! test -z "$2"; then |
|---|
| 35 | RESULTS=/tmp/nexus-mock-results |
|---|
| 36 | mkdir -p $RESULTS |
|---|
| 37 | mock_args="-r $2 --resultdir=$RESULTS" |
|---|
| 38 | rm -f $RESULTS/*.src.rpm # clean up so do not pick up wrong .src.rpm later |
|---|
| 39 | mock ${mock_args} --init |
|---|
| 40 | mock ${mock_args} --buildsrpm --spec nexus.spec --sources . --define "nexus_config_options $build_args" --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" |
|---|
| 41 | srpm=`ls $RESULTS/*.src.rpm` |
|---|
| 42 | mock ${mock_args} --rebuild $srpm --define "nexus_config_options $build_args" --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" |
|---|
| 43 | else |
|---|
| 44 | # buildroot is actually where we install to |
|---|
| 45 | cd $topdir/SPECS |
|---|
| 46 | rpmbuild -ba --buildroot $nxtop/installroot --define "nexus_config_options $build_args" --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" nexus.spec |
|---|
| 47 | fi |
|---|
Note: See
TracBrowser
for help on using the repository browser.