summaryrefslogtreecommitdiffstats
path: root/contrib/crossrpms/autotools/autoconf.add
blob: 3ca5d978645b06adabbbec06caa67b20ffa43958 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
%define srcvers	@AUTOCONF_VERS@
%define rpmvers %{expand:%(echo "@AUTOCONF_VERS@" | tr - _ )}

%if "%{_prefix}" != "/usr"
%define name			@rpmprefix@autoconf
%else
%define name			autoconf
%endif

# --with alltests	enable all tests
%bcond_with		alltests

Name:		%{name}
License:	GPL
URL:		http://www.gnu.org/software/autoconf
Group:		Development/Tools
Version:	%{rpmvers}
Release:	@AUTOCONF_RPMREL@
Summary:	Tool for automatically generating GNU style Makefile.in's

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch
BuildRequires: 	perl m4 gawk emacs
%if "%{version}" >= "2.62"
BuildRequires:  m4 >= 1.4.5
%endif
Requires:     	m4 gawk
Requires(post):		/sbin/install-info
Requires(preun):	/sbin/install-info

@SOURCES@

%description
GNU's Autoconf is a tool for configuring source code and Makefiles.
Using Autoconf, programmers can create portable and configurable
packages, since the person building the package is allowed to
specify various configuration options.
You should install Autoconf if you are developing software and you'd
like to use it to create shell scripts which will configure your
source code packages.
Note that the Autoconf package is not required for the end user who
may be configuring software with an Autoconf-generated script;
Autoconf is only required for the generation of the scripts, not
their use.

%prep
%setup -q -n autoconf-%{srcvers}
%{?PATCH0:%patch0 -p1}

# Work around rpm inserting bogus perl-module deps
cat << \EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} $* |\
    sed -e '/^perl(Autom4te/d'
EOF
%define __perl_provides %{_builddir}/autoconf-%{srcvers}/%{name}-prov
chmod +x %{__perl_provides}

cat << \EOF > %{name}-requ
#!/bin/sh
%{__perl_requires} $* |\
    sed -e '/^perl(Autom4te/d'
EOF
%define __perl_requires %{_builddir}/autoconf-%{srcvers}/%{name}-requ
chmod +x %{__perl_requires}

%build
./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
  --bindir=%{_bindir} --datadir=%{_datadir}
make

%check
%if "%{_build}" == "%{_host}"
%if "%{srcvers}" == "2.68"
# test 199 fails sporadically
# test 205 fails deterministically
TESTSUITEFLAGS='-198 200-204 206-'
%endif

make check %{!?with_alltests:TESTSUITEFLAGS="${TESTSUITEFLAGS}"}
%endif

%install
rm -rf "${RPM_BUILD_ROOT}"
make DESTDIR=${RPM_BUILD_ROOT} install

# Create this directory to prevent the corresponding line
# in %%files below to fail
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp

# RTEMS's standards.info comes from binutils
rm -f $RPM_BUILD_ROOT%{_infodir}/standards.info*

rm -f $RPM_BUILD_ROOT%{_infodir}/dir
touch $RPM_BUILD_ROOT%{_infodir}/dir