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