1 | %define srcvers @AUTOCONF_VERS@ |
---|
2 | %define rpmvers %{expand:%(echo "@AUTOCONF_VERS@" | tr - _ )} |
---|
3 | |
---|
4 | %if "%{_prefix}" != "/usr" |
---|
5 | %define name @rpmprefix@autoconf |
---|
6 | %else |
---|
7 | %define name autoconf |
---|
8 | %endif |
---|
9 | |
---|
10 | # --with alltests enable all tests |
---|
11 | %bcond_with alltests |
---|
12 | |
---|
13 | Name: %{name} |
---|
14 | License: GPL |
---|
15 | URL: http://www.gnu.org/software/autoconf |
---|
16 | Group: Development/Tools |
---|
17 | Version: %{rpmvers} |
---|
18 | Release: @AUTOCONF_RPMREL@ |
---|
19 | Summary: Tool for automatically generating GNU style Makefile.in's |
---|
20 | |
---|
21 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
22 | BuildArch: noarch |
---|
23 | BuildRequires: perl m4 gawk emacs |
---|
24 | %if "%{version}" >= "2.62" |
---|
25 | BuildRequires: m4 >= 1.4.5 |
---|
26 | %endif |
---|
27 | Requires: m4 gawk |
---|
28 | Requires(post): /sbin/install-info |
---|
29 | Requires(preun): /sbin/install-info |
---|
30 | |
---|
31 | @SOURCES@ |
---|
32 | |
---|
33 | # remove bogus Autoconf perl dependencies and provides |
---|
34 | %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(Autom4te:: |
---|
35 | %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(Autom4te:: |
---|
36 | |
---|
37 | %description |
---|
38 | GNU's Autoconf is a tool for configuring source code and Makefiles. |
---|
39 | Using Autoconf, programmers can create portable and configurable |
---|
40 | packages, since the person building the package is allowed to |
---|
41 | specify various configuration options. |
---|
42 | You should install Autoconf if you are developing software and you'd |
---|
43 | like to use it to create shell scripts which will configure your |
---|
44 | source code packages. |
---|
45 | Note that the Autoconf package is not required for the end user who |
---|
46 | may be configuring software with an Autoconf-generated script; |
---|
47 | Autoconf is only required for the generation of the scripts, not |
---|
48 | their use. |
---|
49 | |
---|
50 | %prep |
---|
51 | %setup -q -n autoconf-%{srcvers} |
---|
52 | %{?PATCH0:%patch0 -p1} |
---|
53 | |
---|
54 | %if !%{defined fedora} |
---|
55 | # Work around rpm inserting bogus perl-module deps |
---|
56 | cat << \EOF > %{name}-prov |
---|
57 | #!/bin/sh |
---|
58 | %{__perl_provides} $* |\ |
---|
59 | sed -e '/^perl(Autom4te/d' |
---|
60 | EOF |
---|
61 | %global __perl_provides %{_builddir}/autoconf-%{srcvers}/%{name}-prov |
---|
62 | chmod +x %{__perl_provides} |
---|
63 | |
---|
64 | cat << \EOF > %{name}-requ |
---|
65 | #!/bin/sh |
---|
66 | %{__perl_requires} $* |\ |
---|
67 | sed -e '/^perl(Autom4te/d' |
---|
68 | EOF |
---|
69 | %global __perl_requires %{_builddir}/autoconf-%{srcvers}/%{name}-requ |
---|
70 | chmod +x %{__perl_requires} |
---|
71 | %endif |
---|
72 | |
---|
73 | %build |
---|
74 | ./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \ |
---|
75 | --bindir=%{_bindir} --datadir=%{_datadir} |
---|
76 | make |
---|
77 | |
---|
78 | %check |
---|
79 | %if "%{_build}" == "%{_host}" |
---|
80 | %if "%{srcvers}" == "2.68" |
---|
81 | # test 199 fails sporadically |
---|
82 | # test 205 fails deterministically |
---|
83 | TESTSUITEFLAGS='-198 200-204 206-' |
---|
84 | %endif |
---|
85 | |
---|
86 | make check %{!?with_alltests:TESTSUITEFLAGS="${TESTSUITEFLAGS}"} |
---|
87 | %endif |
---|
88 | |
---|
89 | %install |
---|
90 | rm -rf "${RPM_BUILD_ROOT}" |
---|
91 | make DESTDIR=${RPM_BUILD_ROOT} install |
---|
92 | |
---|
93 | # Create this directory to prevent the corresponding line |
---|
94 | # in %%files below to fail |
---|
95 | mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp |
---|
96 | |
---|
97 | # RTEMS's standards.info comes from binutils |
---|
98 | rm -f $RPM_BUILD_ROOT%{_infodir}/standards.info* |
---|
99 | |
---|
100 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
---|
101 | touch $RPM_BUILD_ROOT%{_infodir}/dir |
---|
102 | |
---|