We can build in the source directory now, so use vanilla %configure. Edit

-Wall out of $RPM_OPT_FLAGS so it doesn't override our makefiles' exact
    settings.
This commit is contained in:
roland 2005-08-06 22:23:12 +00:00
parent 1ac6b2e42e
commit a66aa3ef67
1 changed files with 6 additions and 13 deletions

View File

@ -118,22 +118,18 @@ find . \( -name configure -o -name config.h.in \) -print | xargs touch
%patch2 -p1
%build
mkdir build-%{_target_platform}
cd build-%{_target_platform}
cat > configure <<\EOF
#!/bin/sh
exec ../configure "$@"
EOF
chmod +x configure
%configure --enable-shared
# Remove -Wall from default flags. The makefiles enable enough warnings
# themselves, and they use -Werror. Appending -Wall defeats the cases where
# the makefiles disable some specific warnings for specific code.
RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-Wall/}
%configure
make
cd ..
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}
cd build-%{_target_platform}
%makeinstall
chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib*.so*
@ -141,8 +137,6 @@ chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib*.so*
chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/elfutils/lib*.so*
%endif
cd ..
%if !%{gpl}
# XXX Nuke unpackaged files
{ cd ${RPM_BUILD_ROOT}
@ -156,7 +150,6 @@ cd ..
%endif
%check
cd build-%{_target_platform}
make check
%clean