Sync fix-old-automake-files with Cooker, spec cleanup

This commit is contained in:
Andrey Bondrov 2014-05-23 19:42:40 +11:00
parent d12c6b3684
commit d0792d79ef
3 changed files with 63 additions and 65 deletions

View file

@ -1,7 +1,2 @@
removed_sources:
automake-1.12.3.tar.xz: d08297e9eb36c82e1baa4e7ad9d27fc1f7e91537
automake-1.13.1.tar.xz: cf0c93328ccc40412b2a6a2d96075b41e2182659
automake-1.13.2.tar.xz: c4112e241478a1959a430430ccbd73eb1422fa44
sources: sources:
automake-1.13.4.tar.xz: 20dac46d2699cb32c8102584db67e964c472b03e
automake-1.14.1.tar.xz: 2ced676f6b792a95c5919243f81790b1172c7f5b automake-1.14.1.tar.xz: 2ced676f6b792a95c5919243f81790b1172c7f5b

View file

@ -6,36 +6,35 @@
Summary: A GNU tool for automatically creating Makefiles Summary: A GNU tool for automatically creating Makefiles
Name: automake Name: automake
Version: 1.14.1 Version: 1.14.1
Release: 1 Release: 2
License: GPLv2+ License: GPLv2+
Group: Development/Other Group: Development/Other
Url: http://sources.redhat.com/automake/
Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{version}.tar.xz Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{version}.tar.xz
Source100: fix-old-automake-files Source100: fix-old-automake-files
URL: http://sources.redhat.com/automake/ # Automatically invoke fix-old-automake-files from aclocal
BuildArch: noarch Patch0: automake-1.13.1-automatically-fix-old-files.patch
Requires: autoconf
Requires: sed
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: texinfo BuildRequires: texinfo
Conflicts: automake1.5
Provides: automake1.9 = %{version}-%{release}
Obsoletes: automake1.9
Provides: automake1.8 = %{version}-%{release}
Obsoletes: automake1.8
Requires(post): update-alternatives
Requires(preun): update-alternatives
# tests need these # tests need these
%if %{docheck} %if %{docheck}
BuildRequires: bison BuildRequires: bison
BuildRequires: flex
BuildRequires: tetex-latex
BuildRequires: emacs
BuildRequires: dejagnu BuildRequires: dejagnu
BuildRequires: emacs
BuildRequires: flex
BuildRequires: gcc-java BuildRequires: gcc-java
BuildRequires: python BuildRequires: python
BuildRequires: tetex-latex
%endif %endif
Requires: autoconf
Requires: sed
Conflicts: automake1.5
Provides: automake1.9 = %{EVRD}
Obsoletes: automake1.9 < %{EVRD}
Provides: automake1.8 = %{EVRD}
Obsoletes: automake1.8 < %{EVRD}
Requires(post,preun): update-alternatives
BuildArch: noarch
%description %description
Automake is a tool for automatically generating Makefiles compliant with Automake is a tool for automatically generating Makefiles compliant with
@ -46,49 +45,6 @@ to use its capabilities of automatically generating GNU standard
Makefiles. If you install Automake, you will also need to install GNU's Makefiles. If you install Automake, you will also need to install GNU's
Autoconf package. Autoconf package.
%prep
%setup -q
%apply_patches
%build
# (Abel) config* don't understand noarch-mandriva-linux-gnu arch
%configure2_5x --build=i586-%{_target_vendor}-%{_target_os}%{?_gnu}
%make
%check
%if %{docheck}
# (Abel) reqd2.test tries to make sure automake won't work if ltmain.sh
# is not present. But automake behavior changed, now it can handle missing
# libtool file as well, so this test is bogus.
%__sed -e 's/reqd2.test//g' -i tests/Makefile
%__make check # VERBOSE=1
%endif
%install
%__rm -rf %{buildroot}
%makeinstall_std
# provide -1.x symlinks
for i in 8 9 11 12 13; do
%__ln_s automake-%{amversion} %{buildroot}%{_bindir}/automake-1.$i
%__ln_s aclocal-%{amversion} %{buildroot}%{_bindir}/aclocal-1.$i
done
%__rm -f %{buildroot}/%{_infodir}/*
%__install -m 644 doc/%{name}.info* %{buildroot}/%{_infodir}/
%__install -c -m 755 %SOURCE100 %buildroot%_bindir/
%__mkdir_p %{buildroot}%{_datadir}/aclocal
%pre
if [ "$1" = 1 ]; then
update-alternatives --remove automake %{_bindir}/automake-1.8
update-alternatives --remove automake %{_bindir}/automake-1.9
update-alternatives --remove automake %{_bindir}/automake-1.11
update-alternatives --remove automake %{_bindir}/automake-1.12
update-alternatives --remove automake %{_bindir}/automake-1.13
fi
%files %files
%doc AUTHORS ChangeLog NEWS README THANKS %doc AUTHORS ChangeLog NEWS README THANKS
%{_bindir}/automake %{_bindir}/automake
@ -114,3 +70,48 @@ fi
%{_mandir}/man1/automake-%{amversion}* %{_mandir}/man1/automake-%{amversion}*
%{_mandir}/man1/automake.1* %{_mandir}/man1/automake.1*
%pre
if [ "$1" = 1 ]; then
update-alternatives --remove automake %{_bindir}/automake-1.8
update-alternatives --remove automake %{_bindir}/automake-1.9
update-alternatives --remove automake %{_bindir}/automake-1.11
update-alternatives --remove automake %{_bindir}/automake-1.12
update-alternatives --remove automake %{_bindir}/automake-1.13
fi
#----------------------------------------------------------------------------
%prep
%setup -q
%apply_patches
%build
%configure2_5x
%make
%check
%if %{docheck}
# (Abel) reqd2.test tries to make sure automake won't work if ltmain.sh
# is not present. But automake behavior changed, now it can handle missing
# libtool file as well, so this test is bogus.
sed -e 's/reqd2.test//g' -i tests/Makefile
make check # VERBOSE=1
%endif
%install
%makeinstall_std
# provide -1.x symlinks
for i in 8 9 11 12 13; do
ln -s automake-%{amversion} %{buildroot}%{_bindir}/automake-1.$i
ln -s aclocal-%{amversion} %{buildroot}%{_bindir}/aclocal-1.$i
done
rm -f %{buildroot}/%{_infodir}/*
install -m 644 doc/%{name}.info* %{buildroot}/%{_infodir}/
install -c -m 755 %{SOURCE100} %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_datadir}/aclocal

View file

@ -11,3 +11,5 @@ find . -name configure.ac -o -name configure.in |xargs sed -i -e "s,AM_CONFIG_HE
find . -name configure.in |while read r; do find . -name configure.in |while read r; do
mv $r ${r/configure.in/configure.ac} mv $r ${r/configure.in/configure.ac}
done done
# And adjust any bogus Makefiles etc. that have a dependency on configure.in
find . -name "configure.*" -o -name "Makefile*" -o -name "*.m4" |xargs sed -i -e 's,configure.in,configure.ac,g'