specfile: build process updated
* using %autosetup now (added 'BuildRequires: git') * no longer switching to base/ dir for building purposes * using %configure macro instead of manually invoking ./configure
This commit is contained in:
parent
0b67fe8abd
commit
984d6a8253
41
gmp.spec
41
gmp.spec
@ -18,6 +18,7 @@ License: LGPLv3+ or GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: autoconf automake libtool
|
||||
BuildRequires: git
|
||||
#autoreconf on arm needs:
|
||||
BuildRequires: perl-Carp
|
||||
|
||||
@ -67,8 +68,7 @@ The static libraries for using the GNU MP arbitrary precision library
|
||||
in applications.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch2 -p1 -b .debuginfo
|
||||
%autosetup -S git
|
||||
|
||||
# switch the defaults to new cpus on s390x
|
||||
%ifarch s390x
|
||||
@ -82,43 +82,21 @@ if as --help | grep -q execstack; then
|
||||
export CCAS="gcc -c -Wa,--noexecstack"
|
||||
fi
|
||||
|
||||
# Dummy invocation to initialization CFLAGS etc.
|
||||
%global _configure :
|
||||
%configure
|
||||
%configure --enable-cxx
|
||||
|
||||
mkdir base
|
||||
cd base
|
||||
ln -s ../configure .
|
||||
%ifarch %{ix86}
|
||||
export CFLAGS=$(echo $CFLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-g -march=i686"
|
||||
export CXXFLAGS=$(echo $CXXFLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-g -march=i686"
|
||||
export CFLAGS=$(echo $CFLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-march=i686"
|
||||
export CXXFLAGS=$(echo $CXXFLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-march=i686"
|
||||
%endif
|
||||
./configure --enable-fat --build=%{_build} --host=%{_host} \
|
||||
--program-prefix=%{?_program_prefix} \
|
||||
--prefix=%{_prefix} \
|
||||
--exec-prefix=%{_exec_prefix} \
|
||||
--bindir=%{_bindir} \
|
||||
--sbindir=%{_sbindir} \
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--datadir=%{_datadir} \
|
||||
--includedir=%{_includedir} \
|
||||
--libdir=%{_libdir} \
|
||||
--libexecdir=%{_libexecdir} \
|
||||
--localstatedir=%{_localstatedir} \
|
||||
--sharedstatedir=%{_sharedstatedir} \
|
||||
--mandir=%{_mandir} \
|
||||
--infodir=%{_infodir} \
|
||||
--enable-cxx
|
||||
|
||||
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
|
||||
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
|
||||
-e 's|-lstdc++ -lm|-lstdc++|' \
|
||||
-i libtool
|
||||
export LD_LIBRARY_PATH=`pwd`/.libs
|
||||
make %{?_smp_mflags}
|
||||
cd ..
|
||||
|
||||
%install
|
||||
cd base
|
||||
export LD_LIBRARY_PATH=`pwd`/.libs
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
|
||||
@ -126,7 +104,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la
|
||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
|
||||
ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
|
||||
cd ..
|
||||
|
||||
# Rename gmp.h to gmp-<arch>.h and gmp-mparam.h to gmp-mparam-<arch>.h to
|
||||
# avoid file conflicts on multilib systems and install wrapper include files
|
||||
@ -154,10 +131,8 @@ install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h
|
||||
|
||||
%check
|
||||
%ifnarch ppc
|
||||
cd base
|
||||
export LD_LIBRARY_PATH=`pwd`/.libs
|
||||
make %{?_smp_mflags} check
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
@ -206,8 +181,8 @@ exit 0
|
||||
|
||||
%changelog
|
||||
* Fri Feb 17 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 1:6.1.2-3
|
||||
- Explicitly added '-g' option into CFLAGS & CXXFLAGS to correctly build .debug_info for i386
|
||||
- Build flags modified so the build system no longer drops LDFLAGS hardening flags
|
||||
- Build process updated to correctly build .debug_info for i386
|
||||
and to correctly use hardening flags
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user