Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > bf1b2285031c809f298dce5d63d6766e > files > 2

automake1.8-1.8.2-1mdk.src.rpm

%define amversion 1.8
%define name automake%{amversion}
%define version 1.8.2
%define prefix %{_prefix}
%define release 1mdk

Summary: A GNU tool for automatically creating Makefiles.
Name: %{name}
Version: %{version}
Release: %{release}
Epoch: 0
License: GPL
Group: Development/Other
Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{version}.tar.bz2
URL: http://sources.redhat.com/automake/
Requires: /usr/bin/perl autoconf2.5
BuildRequires: autoconf2.5 byacc flex gawk /usr/bin/perl tetex texinfo
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Provides: automake = %{epoch}:%{version}-%{release}
Obsoletes: automake1.5
Conflicts: automake < 1.4-22.p6.mdk
PreReq:	/sbin/install-info /usr/sbin/update-alternatives

%define alternatives_install_cmd update-alternatives --install %{_bindir}/automake automake %{_bindir}/automake-%{amversion} 10 --slave %{_bindir}/aclocal aclocal %{_bindir}/aclocal-%{amversion}

%description
Automake is a tool for automatically generating Makefiles compliant with
the GNU Coding Standards.

You should install Automake if you are developing software and would like
to use its capabilities of automatically generating GNU standard
Makefiles. If you install Automake, you will also need to install GNU's
Autoconf package.

%prep
%setup -q -n automake-%{version}

%build
# For some reason, the %%configure macro doesn't work

export WANT_AUTOCONF_2_5=1
./configure --prefix=%{_prefix} --bindir=%{_bindir} --datadir=%{_datadir} \
--libdir=%{_libdir}
make
#make check
pushd doc
perl -p -i -e 's|automake|%{name}|g' automake.texi
makeinfo automake.texi
popd

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
rm -f $RPM_BUILD_ROOT/%{_bindir}/{automake,aclocal}
rm -f $RPM_BUILD_ROOT/%{_infodir}/*
install -m 644 doc/%{name}*info* $RPM_BUILD_ROOT/%{_infodir}

perl -p -i -e 's|\(automake\)Extending aclocal|(%{name})Extending aclocal|' \
  $RPM_BUILD_ROOT/%{_bindir}/aclocal-%{version}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%_install_info %name.info
%{alternatives_install_cmd}

# (gc) necessary when we upgrade from a non alternativized package, because it's executed after the old files are removed
%triggerpostun -- automake1.5
[ -e %{_bindir}/automake-%{amversion} ] && %{alternatives_install_cmd} || :

%preun
%_remove_install_info %name.info
if [ $1 = 0 ]; then
	update-alternatives --remove automake %{_bindir}/automake-%{amversion}
fi

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO
%{_bindir}/*
%{_datadir}/automake*
%{_infodir}/automake*
%{_datadir}/aclocal*

%changelog
* Wed Feb 11 2004 David Walluck <walluck@linux-mandrake.com> 0:1.8.2-1mdk
- release