source: rtems/contrib/crossrpms/autotools/rtems-4.10-autoconf.spec @ 6440a9c9

4.104.115
Last change on this file since 6440a9c9 was 6440a9c9, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/16/08 at 02:31:01

New.

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