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
|
Group: System Environment/Libraries
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: autoconf automake libtool
|
BuildRequires: autoconf automake libtool
|
||||||
|
BuildRequires: git
|
||||||
#autoreconf on arm needs:
|
#autoreconf on arm needs:
|
||||||
BuildRequires: perl-Carp
|
BuildRequires: perl-Carp
|
||||||
|
|
||||||
@ -67,8 +68,7 @@ The static libraries for using the GNU MP arbitrary precision library
|
|||||||
in applications.
|
in applications.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -S git
|
||||||
%patch2 -p1 -b .debuginfo
|
|
||||||
|
|
||||||
# switch the defaults to new cpus on s390x
|
# switch the defaults to new cpus on s390x
|
||||||
%ifarch s390x
|
%ifarch s390x
|
||||||
@ -82,43 +82,21 @@ if as --help | grep -q execstack; then
|
|||||||
export CCAS="gcc -c -Wa,--noexecstack"
|
export CCAS="gcc -c -Wa,--noexecstack"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Dummy invocation to initialization CFLAGS etc.
|
%configure --enable-cxx
|
||||||
%global _configure :
|
|
||||||
%configure
|
|
||||||
|
|
||||||
mkdir base
|
|
||||||
cd base
|
|
||||||
ln -s ../configure .
|
|
||||||
%ifarch %{ix86}
|
%ifarch %{ix86}
|
||||||
export CFLAGS=$(echo $CFLAGS | 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")"-g -march=i686"
|
export CXXFLAGS=$(echo $CXXFLAGS | sed -e "s/-mtune=[^ ]*//g" | sed -e "s/-march=[^ ]*//g")"-march=i686"
|
||||||
%endif
|
%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' \
|
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|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
|
||||||
-e 's|-lstdc++ -lm|-lstdc++|' \
|
-e 's|-lstdc++ -lm|-lstdc++|' \
|
||||||
-i libtool
|
-i libtool
|
||||||
export LD_LIBRARY_PATH=`pwd`/.libs
|
export LD_LIBRARY_PATH=`pwd`/.libs
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
cd ..
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd base
|
|
||||||
export LD_LIBRARY_PATH=`pwd`/.libs
|
export LD_LIBRARY_PATH=`pwd`/.libs
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
|
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
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||||
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
|
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
|
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
|
# 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
|
# avoid file conflicts on multilib systems and install wrapper include files
|
||||||
@ -154,10 +131,8 @@ install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
%ifnarch ppc
|
%ifnarch ppc
|
||||||
cd base
|
|
||||||
export LD_LIBRARY_PATH=`pwd`/.libs
|
export LD_LIBRARY_PATH=`pwd`/.libs
|
||||||
make %{?_smp_mflags} check
|
make %{?_smp_mflags} check
|
||||||
cd ..
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
@ -206,8 +181,8 @@ exit 0
|
|||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Feb 17 2017 David Kaspar [Dee'Kej] <dkaspar@redhat.com> - 1:6.1.2-3
|
* 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 process updated to correctly build .debug_info for i386
|
||||||
- Build flags modified so the build system no longer drops LDFLAGS hardening flags
|
and to correctly use hardening flags
|
||||||
|
|
||||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:6.1.2-2
|
* 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
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user