source: rtems/contrib/crossrpms/autotools/rtems-4.10-autoconf.spec @ 186049a

4.104.115
Last change on this file since 186049a was 186049a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 07/13/09 at 14:21:39

Regenerate.

  • Property mode set to 100644
File size: 5.1 KB
Line 
1#
2# Please send bugfixes or comments to
3#       http://www.rtems.org/bugzilla
4#
5
6%define _prefix                 /opt/rtems-4.10
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 rtems-4.10-%{_host}-
44%else
45%define _host_rpmprefix %{nil}
46%endif
47
48%define srcvers 2.63
49%define rpmvers %{expand:%(echo "2.63" | tr - _ )}
50
51%define name                    rtems-4.10-autoconf
52
53
54Name:           %{name}
55License:        GPL
56URL:            http://www.gnu.org/software/autoconf
57Group:          Development/Tools
58Version:        %{rpmvers}
59Release:        3%{?dist}
60Summary:        Tool for automatically generating GNU style Makefile.in's
61
62Obsoletes:      rtems-4.10-autoconf-rtems < %{version}-%{release}
63Provides:       rtems-4.10-autoconf-rtems = %{version}-%{release}
64
65BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
66BuildArch:      noarch
67BuildRequires:  perl m4 gawk emacs
68%if "%{version}" >= "2.62"
69BuildRequires:  m4 >= 1.4.5
70%endif
71Requires:       m4 gawk
72Requires(post):         /sbin/install-info
73Requires(preun):        /sbin/install-info
74
75Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{srcvers}.tar.bz2
76
77
78%description
79GNU's Autoconf is a tool for configuring source code and Makefiles.
80Using Autoconf, programmers can create portable and configurable
81packages, since the person building the package is allowed to
82specify various configuration options.
83You should install Autoconf if you are developing software and you'd
84like to use it to create shell scripts which will configure your
85source code packages.
86Note that the Autoconf package is not required for the end user who
87may be configuring software with an Autoconf-generated script;
88Autoconf is only required for the generation of the scripts, not
89their use.
90
91%prep
92%setup -q -n autoconf-%{srcvers}
93%{?PATCH0:%patch0 -p1}
94
95# Work around rpm inserting bogus perl-module deps
96cat << \EOF > %{name}-prov
97#!/bin/sh
98%{__perl_provides} $* |\
99    sed -e '/^perl(Autom4te/d'
100EOF
101%define __perl_provides %{_builddir}/autoconf-%{srcvers}/%{name}-prov
102chmod +x %{__perl_provides}
103
104cat << \EOF > %{name}-requ
105#!/bin/sh
106%{__perl_requires} $* |\
107    sed -e '/^perl(Autom4te/d'
108EOF
109%define __perl_requires %{_builddir}/autoconf-%{srcvers}/%{name}-requ
110chmod +x %{__perl_requires}
111
112%build
113./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
114  --bindir=%{_bindir} --datadir=%{_datadir}
115make
116
117%install
118rm -rf "${RPM_BUILD_ROOT}"
119make DESTDIR=${RPM_BUILD_ROOT} install
120
121# Create this directory to prevent the corresponding line
122# in %%files below to fail
123mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/emacs/site-lisp
124
125# RTEMS's standards.info comes from binutils
126rm -f $RPM_BUILD_ROOT%{_infodir}/standards.info*
127
128rm -f $RPM_BUILD_ROOT%{_infodir}/dir
129touch $RPM_BUILD_ROOT%{_infodir}/dir
130
131# Extract %%__os_install_post into os_install_post~
132cat << \EOF > os_install_post~
133%__os_install_post
134EOF
135
136# Generate customized brp-*scripts
137cat os_install_post~ | while read a x y; do
138case $a in
139# Prevent brp-strip* from trying to handle foreign binaries
140*/brp-strip*)
141  b=$(basename $a)
142  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
143  chmod a+x $b
144  ;;
145# Fix up brp-compress to handle %%_prefix != /usr
146*/brp-compress*)
147  b=$(basename $a)
148  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
149  chmod a+x $b
150  ;;
151esac
152done
153
154sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
155  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
156< os_install_post~ > os_install_post
157%define __os_install_post . ./os_install_post
158
159%clean
160  rm -rf $RPM_BUILD_ROOT
161
162%post
163/sbin/install-info  --info-dir=%{_infodir} %{_infodir}/autoconf.info.gz ||:
164
165%preun
166if [ $1 -eq 0 ]; then
167  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/autoconf.info.gz ||:
168fi   
169
170%files
171%defattr(-,root,root)
172# %doc AUTHORS COPYING ChangeLog NEWS README THANKS
173%dir %{_bindir}
174%{_bindir}/*
175%dir %{_infodir}
176%ghost %{_infodir}/dir
177
178%{_infodir}/autoconf.info*
179%dir %{_mandir}
180%dir %{_mandir}/man1
181%{_mandir}/man1/*
182%dir %{_datadir}
183%{_datadir}/autoconf
184%exclude %{_datadir}/emacs/site-lisp
Note: See TracBrowser for help on using the repository browser.