spec: cleanup

Re-enable parallel build, implement hack for easier rebuilds of
libtool against new gcc.

Related: #429880
Version: 2.4.2-26
This commit is contained in:
Pavel Raiskup 2014-06-09 16:18:12 +02:00
parent 8488c15313
commit 4b64b2d23c
1 changed files with 31 additions and 5 deletions

View File

@ -1,4 +1,5 @@
%global gcc_version 4.9.0 # See the bug #429880
%global gcc_version %(gcc -dumpversion || echo "666")
Summary: The GNU Portable Library Tool Summary: The GNU Portable Library Tool
Name: libtool Name: libtool
@ -9,8 +10,14 @@ URL: http://www.gnu.org/software/libtool/
Group: Development/Tools Group: Development/Tools
Source: http://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.xz Source: http://ftp.gnu.org/gnu/libtool/libtool-%{version}.tar.xz
# ~> downstream
Patch0: libtool-2.2.10-rpath.patch Patch0: libtool-2.2.10-rpath.patch
# Disable buggy tests for features we don't support.
# ~> downstream
Patch1: libtool-2.4.2-TEMPORARY-disable-gcj-tests.patch Patch1: libtool-2.4.2-TEMPORARY-disable-gcj-tests.patch
# Run the 'tar --no-same-owner -xf' instead of 'tar -xf' # Run the 'tar --no-same-owner -xf' instead of 'tar -xf'
# ~> #740079 # ~> #740079
# ~> Downstream - tar is not used in upstream 'master' branch anymore, will be # ~> Downstream - tar is not used in upstream 'master' branch anymore, will be
@ -22,11 +29,14 @@ Patch2: libtool-2.4.2-tar-no-owner.patch
# ~> `git diff c37bc1a3..8a8dfaec m4/libtool.m4` # ~> `git diff c37bc1a3..8a8dfaec m4/libtool.m4`
Patch3: libtool-2.4.2-powerpcle-linux.patch Patch3: libtool-2.4.2-powerpcle-linux.patch
# /usr/bin/libtool includes paths within gcc's versioned directories
# Libtool must be rebuilt whenever a new upstream gcc is built
Requires: gcc = %{gcc_version}
Requires: autoconf, automake, sed, tar, findutils
Requires(post): /sbin/install-info Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info Requires(preun): /sbin/install-info
BuildRequires: autoconf, automake, texinfo BuildRequires: autoconf, automake, texinfo
Requires: autoconf, automake, sed, tar, findutils
# make sure we can configure all supported langs # make sure we can configure all supported langs
BuildRequires: libstdc++-devel, gcc-gfortran BuildRequires: libstdc++-devel, gcc-gfortran
@ -35,6 +45,7 @@ BuildRequires: libstdc++-devel, gcc-gfortran
# Libtool must be rebuilt whenever a new upstream gcc is built # Libtool must be rebuilt whenever a new upstream gcc is built
Requires: gcc = %{gcc_version} Requires: gcc = %{gcc_version}
%description %description
GNU Libtool is a set of shell scripts which automatically configure UNIX and GNU Libtool is a set of shell scripts which automatically configure UNIX and
UNIX-like systems to generically build shared libraries. Libtool provides a UNIX-like systems to generically build shared libraries. Libtool provides a
@ -50,6 +61,7 @@ Portable Library Tool (libtool) and the GNU Libtool Dynamic Module Loader
(ltdl) into a package built using the GNU Autotools (including GNU Autoconf (ltdl) into a package built using the GNU Autotools (including GNU Autoconf
and GNU Automake). and GNU Automake).
%package ltdl %package ltdl
Summary: Runtime libraries for GNU Libtool Dynamic Module Loader Summary: Runtime libraries for GNU Libtool Dynamic Module Loader
Group: System Environment/Libraries Group: System Environment/Libraries
@ -58,6 +70,7 @@ License: LGPLv2+
Requires(post): /sbin/ldconfig Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig Requires(postun): /sbin/ldconfig
%description ltdl %description ltdl
The libtool-ltdl package contains the GNU Libtool Dynamic Module Loader, a The libtool-ltdl package contains the GNU Libtool Dynamic Module Loader, a
library that provides a consistent, portable interface which simplifies the library that provides a consistent, portable interface which simplifies the
@ -67,15 +80,18 @@ These runtime libraries are needed by programs that link directly to the
system-installed ltdl libraries; they are not needed by software built using system-installed ltdl libraries; they are not needed by software built using
the rest of the GNU Autotools (including GNU Autoconf and GNU Automake). the rest of the GNU Autotools (including GNU Autoconf and GNU Automake).
%package ltdl-devel %package ltdl-devel
Summary: Tools needed for development using the GNU Libtool Dynamic Module Loader Summary: Tools needed for development using the GNU Libtool Dynamic Module Loader
Group: Development/Libraries Group: Development/Libraries
Requires: %{name}-ltdl = %{version}-%{release} Requires: %{name}-ltdl = %{version}-%{release}
License: LGPLv2+ License: LGPLv2+
%description ltdl-devel %description ltdl-devel
Static libraries and header files for development with ltdl. Static libraries and header files for development with ltdl.
%prep %prep
%setup -n libtool-%{version} -q %setup -n libtool-%{version} -q
%patch0 -p1 -b .rpath %patch0 -p1 -b .rpath
@ -83,8 +99,8 @@ Static libraries and header files for development with ltdl.
%patch2 -p1 -b .tar-no-same-owner %patch2 -p1 -b .tar-no-same-owner
%patch3 -p1 -b .ppc-le-support %patch3 -p1 -b .ppc-le-support
%build
%build
export CC=gcc export CC=gcc
export CXX=g++ export CXX=g++
export F77=gfortran export F77=gfortran
@ -103,17 +119,18 @@ export CFLAGS="$RPM_OPT_FLAGS -fPIC"
--mandir=%{_mandir} \ --mandir=%{_mandir} \
--infodir=%{_infodir} --infodir=%{_infodir}
## build not smp safe: make %{?_smp_mflags}
make # %%{?_smp_mflags}
for i in ChangeLog.1997 ChangeLog.1998 ChangeLog.1999 ChangeLog.2002; do for i in ChangeLog.1997 ChangeLog.1998 ChangeLog.1999 ChangeLog.2002; do
iconv -f ISO_8859-15 -t UTF8 $i > $i.tmp iconv -f ISO_8859-15 -t UTF8 $i > $i.tmp
mv -f $i.tmp $i mv -f $i.tmp $i
done done
%check %check
make check VERBOSE=yes make check VERBOSE=yes
%install %install
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
# info's TOP dir (by default owned by info) # info's TOP dir (by default owned by info)
@ -122,18 +139,23 @@ rm -f %{buildroot}%{_infodir}/dir
# `./configure --disable-static' breaks testsuite) # `./configure --disable-static' breaks testsuite)
rm -f %{buildroot}%{_libdir}/libltdl.{a,la} rm -f %{buildroot}%{_libdir}/libltdl.{a,la}
%post %post
/sbin/install-info %{_infodir}/libtool.info.gz %{_infodir}/dir || : /sbin/install-info %{_infodir}/libtool.info.gz %{_infodir}/dir || :
%post ltdl -p /sbin/ldconfig %post ltdl -p /sbin/ldconfig
%preun %preun
if [ "$1" = 0 ]; then if [ "$1" = 0 ]; then
/sbin/install-info --delete %{_infodir}/libtool.info.gz %{_infodir}/dir || : /sbin/install-info --delete %{_infodir}/libtool.info.gz %{_infodir}/dir || :
fi fi
%postun ltdl -p /sbin/ldconfig %postun ltdl -p /sbin/ldconfig
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS COPYING NEWS README THANKS TODO ChangeLog* %doc AUTHORS COPYING NEWS README THANKS TODO ChangeLog*
@ -146,11 +168,13 @@ fi
%exclude %{_datadir}/libtool/libltdl %exclude %{_datadir}/libtool/libltdl
%{_datadir}/libtool %{_datadir}/libtool
%files ltdl %files ltdl
%defattr(-,root,root) %defattr(-,root,root)
%doc libltdl/COPYING.LIB %doc libltdl/COPYING.LIB
%{_libdir}/libltdl.so.* %{_libdir}/libltdl.so.*
%files ltdl-devel %files ltdl-devel
%defattr(-,root,root) %defattr(-,root,root)
%doc libltdl/README %doc libltdl/README
@ -160,9 +184,11 @@ fi
# .so files without version must be in -devel subpackage # .so files without version must be in -devel subpackage
%{_libdir}/libltdl.so %{_libdir}/libltdl.so
%changelog %changelog
* Mon Jun 09 2014 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-26 * Mon Jun 09 2014 Pavel Raiskup <praiskup@redhat.com> - 2.4.2-26
- gcc-java removed from Fedora completely (#1106080) - gcc-java removed from Fedora completely (#1106080)
- spec cleanup and implement RPM/SRPM hack (#429880)
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-25 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild