source: rtems/contrib/crossrpms/autotools/rtems-4.10-automake.spec @ 2276acc0

4.104.11
Last change on this file since 2276acc0 was 2276acc0, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 22, 2009 at 4:22:17 AM

Regenerate.

  • Property mode set to 100644
File size: 5.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.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 rpmvers 1.10.2
49%define srcvers 1.10.2
50%define amvers  1.10
51
52%define name                    rtems-4.10-automake
53%define requirements            rtems-4.10-autoconf >= 2.60
54
55Name:           %{name}
56URL:            http://sources.redhat.com/automake
57License:        GPL
58Group:          Development/Tools
59Version:        %{rpmvers}
60Release:        2%{?dist}
61Summary:        Tool for automatically generating GNU style Makefile.in's
62
63Obsoletes:      rtems-4.10-automake-rtems < %{version}-%{release}
64Provides:       rtems-4.10-automake-rtems = %{version}-%{release}
65
66BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
67BuildArch:      noarch
68BuildRequires:  %{requirements} perl help2man
69Requires:       %{requirements}
70Requires(post): /sbin/install-info
71Requires(preun):/sbin/install-info
72
73Source0: ftp://ftp.gnu.org/gnu/automake/automake-%{srcvers}.tar.bz2
74Patch0:  ftp://ftp.rtems.org/pub/rtems/4.10/SOURCES/automake-1.10.2-rtems4.10-20090222.diff
75
76
77%description
78Automake is a tool for automatically generating "Makefile.in"s from
79files called "Makefile.am". "Makefile.am" is basically a series of
80"make" macro definitions (with rules being thrown in occasionally).
81The generated "Makefile.in"s are compatible to the GNU Makefile
82standards.
83
84%prep
85%setup -q -n automake-%{srcvers}
86%{?PATCH0:%patch0 -p1}
87
88# Work around rpm inserting bogus perl-module deps
89cat << \EOF > %{name}-prov
90#!/bin/sh
91%{__perl_provides} $* |\
92    sed -e '/^perl(Automake/d'
93EOF
94%define __perl_provides %{_builddir}/automake-%{srcvers}/%{name}-prov
95chmod +x %{__perl_provides}
96
97cat << \EOF > %{name}-requ
98#!/bin/sh
99%{__perl_requires} $* |\
100    sed -e '/^perl(Automake/d'
101EOF
102%define __perl_requires %{_builddir}/automake-%{srcvers}/%{name}-requ
103chmod +x %{__perl_requires}
104
105
106%build
107PATH=%{_bindir}:$PATH
108# Don't use %%configure, it replaces config.sub/config.guess with the
109# outdated versions bundled with rpm.
110./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir} \
111  --bindir=%{_bindir} --datadir=%{_datadir} \
112  --docdir=%{_datadir}/automake-%{amvers}/doc
113make
114
115%install
116rm -rf "$RPM_BUILD_ROOT"
117make DESTDIR=${RPM_BUILD_ROOT} install
118
119install -m 755 -d $RPM_BUILD_ROOT/%{_mandir}/man1
120for i in $RPM_BUILD_ROOT%{_bindir}/aclocal \
121  $RPM_BUILD_ROOT%{_bindir}/automake ;
122do
123  perllibdir=$RPM_BUILD_ROOT/%{_datadir}/automake-%{amvers} \
124  help2man $i > `basename $i`.1
125  install -m 644 `basename $i`.1 $RPM_BUILD_ROOT/%{_mandir}/man1
126done
127
128mkdir -p $RPM_BUILD_ROOT%{_datadir}/aclocal
129echo "/usr/share/aclocal" > $RPM_BUILD_ROOT%{_datadir}/aclocal/dirlist
130
131rm -f $RPM_BUILD_ROOT%{_infodir}/dir
132touch $RPM_BUILD_ROOT%{_infodir}/dir
133
134# Extract %%__os_install_post into os_install_post~
135cat << \EOF > os_install_post~
136%__os_install_post
137EOF
138
139# Generate customized brp-*scripts
140cat os_install_post~ | while read a x y; do
141case $a in
142# Prevent brp-strip* from trying to handle foreign binaries
143*/brp-strip*)
144  b=$(basename $a)
145  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
146  chmod a+x $b
147  ;;
148# Fix up brp-compress to handle %%_prefix != /usr
149*/brp-compress*)
150  b=$(basename $a)
151  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
152  chmod a+x $b
153  ;;
154esac
155done
156
157sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
158  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
159< os_install_post~ > os_install_post
160%define __os_install_post . ./os_install_post
161
162%clean
163  rm -rf $RPM_BUILD_ROOT
164
165%post 
166/sbin/install-info  --info-dir=%{_infodir} %{_infodir}/automake.info.gz ||:
167
168%preun
169if [ $1 -eq 0 ]; then
170  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/automake.info.gz ||:
171fi
172
173%files
174%defattr(-,root,root)
175%doc AUTHORS COPYING ChangeLog NEWS README THANKS
176%dir %{_bindir}
177%{_bindir}/aclocal*
178%{_bindir}/automake*
179%dir %{_infodir}
180%ghost %{_infodir}/dir
181%{_infodir}/automake.info*.gz
182%dir %{_mandir}
183%dir %{_mandir}/man1
184%{_mandir}/man1/*
185%dir %{_datadir}
186%{_datadir}/aclocal
187%{_datadir}/aclocal-%{amvers}
188%{_datadir}/automake-%{amvers}
189
Note: See TracBrowser for help on using the repository browser.