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