diff --git a/nessus-libs/nessus-libs.spec b/nessus-libs/nessus-libs.spec index 206b489daf..37423f1dcf 100644 --- a/nessus-libs/nessus-libs.spec +++ b/nessus-libs/nessus-libs.spec @@ -33,7 +33,7 @@ Distribution: OpenPKG [EVAL] Group: Security License: GPL Version: 2.0.7 -Release: 20030704 +Release: 20030710 # list of sources Source0: ftp://ftp.nessus.org/pub/nessus/nessus-%{version}/src/nessus-libraries-%{version}.tar.gz @@ -58,59 +58,60 @@ AutoReqProv: no %setup1 -q -T -D -a 1 %build + tmproot=`pwd`/tmp + # build nessus-libraries part - pushd nessus-libraries - CC="%{l_cc}" \ - CFLAGS="%{l_cflags -O}" - CPPFLAGS="%{l_cppflags}" - LDFLAGS="%{l_ldflags}" - ./configure \ - --prefix=%{l_prefix} \ - --with-ssl=%{l_prefix} \ - --disable-nessuspcap \ - --enable-bpf-sharing \ - --disable-cipher \ - --disable-shared \ - --enable-static - %{l_make} %{l_mflags -O} - popd + ( cd nessus-libraries + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" + CPPFLAGS="%{l_cppflags}" + LDFLAGS="%{l_ldflags}" + ./configure \ + --prefix=%{l_prefix} \ + --with-ssl=%{l_prefix} \ + --disable-nessuspcap \ + --enable-bpf-sharing \ + --disable-cipher \ + --disable-shared \ + --enable-static + %{l_make} %{l_mflags -O} + ) || exit $? # temporarily install nessus-libraries for libnasl building - pushd nessus-libraries - nessus_libs=`pwd` - %{l_make} %{l_mflags -O} \ - install DESTDIR=${nessus_libs}/tmp - %{l_shtool} subst \ - -e "s;^\\(PREFIX=\\)\\(.*\\);\\1${nessus_libs}/tmp\\2;" \ - ${nessus_libs}/tmp%{l_prefix}/bin/nessus-config - popd + ( cd nessus-libraries + %{l_make} %{l_mflags -O} \ + install DESTDIR=$tmproot + %{l_shtool} subst \ + -e "s;^\\(PREFIX=\\)\\(.*\\);\\1$tmproot\\2;" \ + $tmproot%{l_prefix}/bin/nessus-config + ) || exit $? # build libnasl part - pushd libnasl - PATH="${nessus_libs}/tmp%{l_prefix}/bin:$PATH" - CC="%{l_cc}" \ - CFLAGS="%{l_cflags -O}" - CPPFLAGS="%{l_cppflags}" - LDFLAGS="%{l_ldflags}" - ./configure \ - --prefix=%{l_prefix} \ - --disable-shared \ - --enable-static - %{l_make} %{l_mflags -O} - popd + ( cd libnasl + CC="%{l_cc}" \ + CFLAGS="%{l_cflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + NESSUSCONFIG=$tmproot%{l_prefix}/bin/nessus-config \ + ./configure \ + --prefix=%{l_prefix} \ + --disable-shared \ + --enable-static + %{l_make} %{l_mflags} + ) || exit $? %install rm -rf $RPM_BUILD_ROOT # install nessus-libraries - pushd nessus-libraries - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT - popd + ( cd nessus-libraries + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + ) || exit $? # install libnasl - pushd libnasl - %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT - popd + ( cd libnasl + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + ) || exit $? # strip down installation rm -rf $RPM_BUILD_ROOT%{l_prefix}/sbin/uninstall-nessus