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