use %_hardened_build macro from F-16 on instead of tweaking flags manually

This commit is contained in:
Nils Philippsen 2012-08-31 16:23:19 +02:00
parent c3a3750c07
commit 41afc0efe5

View File

@ -5,6 +5,10 @@
%global needs_multilib_quirk 1
#endif
%if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 16 || 0%{?rhel} >= 7
%global _hardened_build 1
%endif
Summary: Scanner access software
Name: sane-backends
Version: 1.0.23
@ -108,10 +112,12 @@ This package contains backend drivers to access digital cameras through SANE.
%patch2 -p1 -b .SCX4500W
%build
%if ! 0%{?_hardened_build}
# use PIC/PIE because SANE-enabled software is likely to deal with data coming
# from untrusted sources (client <-> saned via network)
CFLAGS="-fPIC %optflags -fno-strict-aliasing"
LDFLAGS="-pie"
%endif
%configure \
--with-gphoto2=%{_prefix} \
--with-docdir=%{_docdir}/%{name}-%{version} \
@ -184,6 +190,7 @@ install -m 0644 tools/sane-backends.pc %{buildroot}%{_libdir}/pkgconfig/
* Fri Aug 31 2012 Nils Philippsen <nils@redhat.com> - 1.0.23-1
- version 1.0.23
- update udev patch, remove obsolete patches
- use %%_hardened_build macro from F-16 on instead of tweaking flags manually
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.22-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild