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