source: rtems/contrib/crossrpms/autotools/automake.add @ 4cf3275

4.8
Last change on this file since 4cf3275 was 2388d57, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 14, 2007 at 3:50:37 PM

Make install-infos safe against --exclude-docs.
Filter bogus req/prov.
Add dirlist.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1%define rpmvers 1.10
2%define srcvers 1.10
3%define amvers  1.10
4
5%if "%{_prefix}" != "/usr"
6%define name                    @rpmprefix@automake
7%define requirements            @rpmprefix@autoconf >= 2.60
8%else
9%define name                    automake
10%define requirements            autoconf >= 2.60
11%endif
12
13Name:           %{name}
14URL:            http://sources.redhat.com/automake
15License:        GPL
16Group:          Development/Tools
17Version:        %{rpmvers}
18Release:        @AUTOMAKE_RPMREL@%{?dist}
19Summary:        Tool for automatically generating GNU style Makefile.in's
20
21%if "%{_prefix}" != "/usr"
22Obsoletes:      @rpmprefix@automake-rtems < %{version}-%{release}
23Provides:       @rpmprefix@automake-rtems = %{version}-%{release}
24%endif
25
26BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
27BuildArch:      noarch
28BuildRequires:  %{requirements} perl help2man
29Requires:       %{requirements}
30Requires(post): /sbin/install-info
31Requires(preun):/sbin/install-info
32
33Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{srcvers}.tar.bz2
34
35%description
36Automake is a tool for automatically generating "Makefile.in"s from
37files called "Makefile.am". "Makefile.am" is basically a series of
38"make" macro definitions (with rules being thrown in occasionally).
39The generated "Makefile.in"s are compatible to the GNU Makefile
40standards.
41
42%prep
43%setup -q -n automake-%{srcvers}
44
45# Work around rpm inserting bogus perl-module deps
46cat << \EOF > %{name}-prov
47#!/bin/sh
48%{__perl_provides} $* |\
49    sed -e '/^perl(Automake/d'
50EOF
51%define __perl_provides %{_builddir}/automake-%{srcvers}/%{name}-prov
52chmod +x %{__perl_provides}
53
54cat << \EOF > %{name}-requ
55#!/bin/sh
56%{__perl_requires} $* |\
57    sed -e '/^perl(Automake/d'
58EOF
59%define __perl_requires %{_builddir}/automake-%{srcvers}/%{name}-requ
60chmod +x %{__perl_requires}
61
62
63%build
64PATH=%{_bindir}:$PATH
65# Don't use %%configure, it replaces config.sub/config.guess with the
66# outdated versions bundled with rpm.
67./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
68  --bindir=%{_bindir} --datadir=%{_datadir} \
69  --docdir=%{_datadir}/automake-%{amvers}/doc
70make
71
72%install
73rm -rf "$RPM_BUILD_ROOT"
74make DESTDIR=${RPM_BUILD_ROOT} install
75
76install -m 755 -d $RPM_BUILD_ROOT/%{_mandir}/man1
77for i in $RPM_BUILD_ROOT%{_bindir}/aclocal \
78  $RPM_BUILD_ROOT%{_bindir}/automake ;
79do
80  perllibdir=$RPM_BUILD_ROOT/%{_datadir}/automake-%{amvers} \
81  help2man $i > `basename $i`.1
82  install -m 644 `basename $i`.1 $RPM_BUILD_ROOT/%{_mandir}/man1
83done
84
85%if "%{_prefix}" != "/usr"
86mkdir -p $RPM_BUILD_ROOT%{_datadir}/aclocal
87echo "/usr/share/aclocal" > $RPM_BUILD_ROOT%{_datadir}/aclocal/dirlist
88%endif
89
90rm -f $RPM_BUILD_ROOT%{_infodir}/dir
91touch $RPM_BUILD_ROOT%{_infodir}/dir
92
Note: See TracBrowser for help on using the repository browser.