source: rtems/contrib/crossrpms/autotools/rtems-4.11-autoconf.spec @ 5f3ebd2

4.115
Last change on this file since 5f3ebd2 was 5f3ebd2, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/14/10 at 15:12:12

Regenerate.

  • Property mode set to 100644
File size: 5.3 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6%define _prefix                 /opt/rtems-4.11
7%define _exec_prefix            %{_prefix}
8%define _bindir                 %{_exec_prefix}/bin
9%define _sbindir                %{_exec_prefix}/sbin
10%define _libexecdir             %{_exec_prefix}/libexec
11%define _datarootdir            %{_prefix}/share
12%define _datadir                %{_datarootdir}
13%define _sysconfdir             %{_prefix}/etc
14%define _sharedstatedir         %{_prefix}/com
15%define _localstatedir          %{_prefix}/var
16%define _includedir             %{_prefix}/include
17%define _libdir                 %{_exec_prefix}/%{_lib}
18%define _mandir                 %{_datarootdir}/man
19%define _infodir                %{_datarootdir}/info
20%define _localedir              %{_datarootdir}/locale
21
22%ifos cygwin cygwin32 mingw mingw32
23%define _exeext .exe
24%define debug_package           %{nil}
25%define _libdir                 %{_exec_prefix}/lib
26%else
27%define _exeext %{nil}
28%endif
29
30%ifos cygwin cygwin32
31%define optflags -O3 -pipe -march=i486 -funroll-loops
32%endif
33
34%ifos mingw mingw32
35%if %{defined _mingw32_cflags}
36%define optflags %{_mingw32_cflags}
37%else
38%define optflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
39%endif
40%endif
41
42%if "%{_build}" != "%{_host}"
43%define _host_rpmprefix %{_host}-
44%else
45%define _host_rpmprefix %{nil}
46%endif
47
48%define srcvers 2.68
49%define rpmvers %{expand:%(echo "2.68" | tr - _ )}
50
51%define name                    rtems-4.11-autoconf
52
53# --with alltests       enable all tests
54%bcond_with             alltests
55
56Name:           %{name}
57License:        GPL
58URL:            http://www.gnu.org/software/autoconf
59Group:          Development/Tools
60Version:        %{rpmvers}
61Release:        3%{?dist}
62Summary:        Tool for automatically generating GNU style Makefile.in's
63
64BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
65BuildArch:      noarch
66BuildRequires:  perl m4 gawk emacs
67%if "%{version}" >= "2.62"
68BuildRequires:  m4 >= 1.4.5
69%endif
70Requires:       m4 gawk
71Requires(post):         /sbin/install-info
72Requires(preun):        /sbin/install-info
73
74Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{srcvers}.tar.%{?el5:bz2}%{!?el5:xz}
75
76
77
78
79%description
80GNU's Autoconf is a tool for configuring source code and Makefiles.
81Using Autoconf, programmers can create portable and configurable
82packages, since the person building the package is allowed to
83specify various configuration options.
84You should install Autoconf if you are developing software and you'd
85like to use it to create shell scripts which will configure your
86source code packages.
87Note that the Autoconf package is not required for the end user who
88may be configuring software with an Autoconf-generated script;
89Autoconf is only required for the generation of the scripts, not
90their use.
91
92%prep
93%setup -q -n autoconf-%{srcvers}
94%{?PATCH0:%patch0 -p1}
95
96# Work around rpm inserting bogus perl-module deps
97cat << \EOF > %{name}-prov
98#!/bin/sh
99%{__perl_provides} $* |\
100    sed -e '/^perl(Autom4te/d'
101EOF
102%define __perl_provides %{_builddir}/autoconf-%{srcvers}/%{name}-prov
103chmod +x %{__perl_provides}
104
105cat << \EOF > %{name}-requ
106#!/bin/sh
107%{__perl_requires} $* |\
108    sed -e '/^perl(Autom4te/d'
109EOF
110%define __perl_requires %{_builddir}/autoconf-%{srcvers}/%{name}-requ
111chmod +x %{__perl_requires}
112
113%build
114./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
115  --bindir=%{_bindir} --datadir=%{_datadir}
116make
117
118%check
119%if "%{_build}" == "%{_host}"
120%if "%{srcvers}" == "2.68"
121# test 199 fails sporadically
122# test 205 fails deterministically
123TESTSUITEFLAGS='-198 200-204 206-'
124%endif
125
126make check %{!?with_alltests:TESTSUITEFLAGS="${TESTSUITEFLAGS}"}
127%endif
128
129%install
130rm -rf "${RPM_BUILD_ROOT}"
131make DESTDIR=${RPM_BUILD_ROOT} install
132
133# Create this directory to prevent the corresponding line
134# in %%files below to fail
135mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp
136
137# RTEMS's standards.info comes from binutils
138rm -f $RPM_BUILD_ROOT%{_infodir}/standards.info*
139
140rm -f $RPM_BUILD_ROOT%{_infodir}/dir
141touch $RPM_BUILD_ROOT%{_infodir}/dir
142
143# Extract %%__os_install_post into os_install_post~
144cat << \EOF > os_install_post~
145%__os_install_post
146EOF
147
148# Generate customized brp-*scripts
149cat os_install_post~ | while read a x y; do
150case $a in
151# Prevent brp-strip* from trying to handle foreign binaries
152*/brp-strip*)
153  b=$(basename $a)
154  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
155  chmod a+x $b
156  ;;
157# Fix up brp-compress to handle %%_prefix != /usr
158*/brp-compress*)
159  b=$(basename $a)
160  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
161  chmod a+x $b
162  ;;
163esac
164done
165
166sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
167  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
168< os_install_post~ > os_install_post
169%define __os_install_post . ./os_install_post
170
171%clean
172  rm -rf $RPM_BUILD_ROOT
173
174%post
175/sbin/install-info  --info-dir=%{_infodir} %{_infodir}/autoconf.info.gz ||:
176
177%preun
178if [ $1 -eq 0 ]; then
179  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/autoconf.info.gz ||:
180fi   
181
182%files
183%defattr(-,root,root)
184# %doc AUTHORS COPYING ChangeLog NEWS README THANKS
185%dir %{_bindir}
186%{_bindir}/*
187%dir %{_infodir}
188%ghost %{_infodir}/dir
189
190%{_infodir}/autoconf.info*
191%dir %{_mandir}
192%dir %{_mandir}/man1
193%{_mandir}/man1/*
194%dir %{_datadir}
195%{_datadir}/autoconf
196%exclude %{_datadir}/emacs/site-lisp
Note: See TracBrowser for help on using the repository browser.