source: rtems/contrib/crossrpms/autotools/rtems-4.8-autoconf.spec @ e2684d4

4.8
Last change on this file since e2684d4 was e2684d4, checked in by Ralf Corsepius <ralf.corsepius@…>, on Nov 13, 2008 at 4:20:05 AM

New.

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