Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 ##
2 ## autoconf.spec -- OpenPKG RPM Package Specification
3 ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
24 # version numbers
25 %define V_latest 2.63
26 %define V_latest_comp 263
27 %define V_older 2.59
28 %define V_older_comp 259
29 %define V_ancient 2.13
30 %define V_ancient_comp 213
31 %define V_acx_macros 2008-11-07
33 # package information
34 Name: autoconf
35 Summary: GNU Source Autoconfiguration
36 URL: http://www.gnu.org/software/autoconf/
37 Vendor: Free Software Foundation
38 Packager: OpenPKG Foundation e.V.
39 Distribution: OpenPKG Community
40 Class: CORE
41 Group: Building
42 License: GPL
43 Version: %{V_latest}
44 Release: 20090106
46 # build options
47 %option with_acx_macros yes
49 # list of sources
50 Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_latest}.tar.gz
51 Source1: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_older}.tar.gz
52 Source2: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_ancient}.tar.gz
53 Source3: http://autoconf-archive.cryp.to/autoconf-archive-%{V_acx_macros}.tar.bz2
54 Patch0: autoconf.patch
56 # build information
57 Prefix: %{l_prefix}
58 BuildRoot: %{l_buildroot}
59 BuildPreReq: OpenPKG, openpkg >= 20040130, m4 >= 1.4, perl, make
60 PreReq: OpenPKG, openpkg >= 20040130, m4 >= 1.4, perl
61 AutoReq: no
62 AutoReqProv: no
64 %description
65 Autoconf is an extensible package of m4 macros that produce shell
66 scripts to automatically configure software source code packages.
67 These scripts can adapt the packages to many kinds of UNIX-like
68 systems without manual user intervention. Autoconf creates a
69 configuration script for a package from a template file that lists
70 the operating system features that the package can use, in the form
71 of m4 macro calls.
73 This OpenPKG packages provides the following Autoconf versions:
74 - GNU Autoconf %{V_latest} (latest version, the default)
75 - GNU Autoconf %{V_older} (older version, as an alternative)
76 - GNU Autoconf %{V_ancient} (ancient version, for backward-compatibility)
78 %track
79 prog autoconf = {
80 version = %{version}
81 url = ftp://ftp.gnu.org/gnu/autoconf/
82 regex = autoconf-(__VER__)\.tar\.gz
83 }
85 %prep
86 %setup -q -c -n autoconf-%{V_latest}
87 %setup -q -T -D -a 1
88 %setup -q -T -D -a 2
89 %patch -p0
90 %if "%{with_acx_macros}" == "yes"
91 %setup -q -T -D -a 3
92 cp \
93 autoconf-archive-%{V_acx_macros}/m4/acx_pthread.m4 \
94 autoconf-%{V_latest}/lib/autoconf/
95 ( cd autoconf-%{V_latest}/lib/autoconf
96 cp autoconf.m4 autoconf.m4.tmp
97 cat autoconf.m4.tmp | %{l_sed} -e '72a\
98 m4_include([autoconf/acx_pthread.m4])' >autoconf.m4
99 rm autoconf.m4.tmp
100 ) || exit $?
101 %endif
103 %build
104 # configure and build Autoconf (deprecated version)
105 ( cd autoconf-%{V_ancient}
106 CC="%{l_cc}" \
107 CFLAGS="%{l_cflags -O}" \
108 ./configure \
109 --prefix=%{l_prefix} \
110 --program-suffix="-%{V_ancient_comp}"
111 %{l_shtool} subst \
112 -e 's;\(acdatadir = $(datadir)/autoconf\);\1/%{V_ancient_comp};' \
113 Makefile
114 %{l_make} %{l_mflags}
115 ) || exit $?
117 # configure and build Autoconf (older version)
118 ( cd autoconf-%{V_older}
119 %{l_shtool} subst \
120 -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \
121 configure
122 %{l_shtool} subst \
123 -e 's;^\(pkgdatadir.=..(datadir)\)/@PACKAGE@;\1;' \
124 Makefile.in */Makefile.in */*/Makefile.in
125 CC="%{l_cc}" \
126 CFLAGS="%{l_cflags -O}" \
127 ACLOCAL=true \
128 AUTOMAKE=true \
129 AUTOCONF=true \
130 AUTOHEADER=true \
131 MAKEINFO=true \
132 GREP=grep \
133 ./configure \
134 --prefix=%{l_prefix} \
135 --datadir=%{l_prefix}/share/autoconf/%{V_older_comp} \
136 --program-suffix="-%{V_older_comp}"
137 %{l_make} %{l_mflags}
138 ) || exit $?
140 # configure and build Autoconf (current version)
141 ( cd autoconf-%{V_latest}
142 %{l_shtool} subst \
143 -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \
144 configure
145 %{l_shtool} subst \
146 -e 's;^\(pkgdatadir.=..(datadir)\)/@PACKAGE@;\1;' \
147 Makefile.in */Makefile.in */*/Makefile.in
148 CC="%{l_cc}" \
149 CFLAGS="%{l_cflags -O}" \
150 ACLOCAL=true \
151 AUTOMAKE=true \
152 AUTOCONF=true \
153 AUTOHEADER=true \
154 MAKEINFO=true \
155 GREP=grep \
156 ./configure \
157 --prefix=%{l_prefix} \
158 --mandir=%{l_prefix}/man \
159 --datadir=%{l_prefix}/share/autoconf/%{V_latest_comp} \
160 --infodir=%{l_prefix}/info
161 %{l_make} %{l_mflags}
162 ) || exit $?
164 %install
165 rm -rf $RPM_BUILD_ROOT
167 # configure and build Autoconf (deprecated version)
168 ( cd autoconf-%{V_ancient}
169 %{l_make} %{l_mflags} install \
170 prefix=$RPM_BUILD_ROOT%{l_prefix}
171 mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \
172 $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-%{V_ancient_comp}.info
173 ) || exit $?
175 # configure and build Autoconf (older version)
176 ( cd autoconf-%{V_older}
177 %{l_make} %{l_mflags} install \
178 prefix=$RPM_BUILD_ROOT%{l_prefix} \
179 datadir=$RPM_BUILD_ROOT%{l_prefix}/share/autoconf/%{V_older_comp} \
180 mandir=$RPM_BUILD_ROOT%{l_prefix}/man \
181 infodir=$RPM_BUILD_ROOT%{l_prefix}/info
182 mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \
183 $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-%{V_older_comp}.info
184 ) || exit $?
186 # configure and build Autoconf (current version)
187 ( cd autoconf-%{V_latest}
188 %{l_make} %{l_mflags} install \
189 prefix=$RPM_BUILD_ROOT%{l_prefix} \
190 datadir=$RPM_BUILD_ROOT%{l_prefix}/share/autoconf/%{V_latest_comp} \
191 mandir=$RPM_BUILD_ROOT%{l_prefix}/man \
192 infodir=$RPM_BUILD_ROOT%{l_prefix}/info
193 ) || exit $?
195 %if "%{with_acx_macros}" == "yes"
196 cp \
197 autoconf-archive-%{V_acx_macros}/m4/acx_pthread.m4 \
198 $RPM_BUILD_ROOT%{l_prefix}/share/autoconf/
199 %endif
201 # strip down installation
202 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
203 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
205 # determine installation files
206 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
208 %files -f files
210 %clean
211 rm -rf $RPM_BUILD_ROOT