autoconf/autoconf.spec

Fri, 16 Jan 2009 10:58:21 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2009 10:58:21 +0100
changeset 92
645923d1e875
parent 11
f6a3aec3e5db
permissions
-rw-r--r--

Correct and improve code logic, buildconf, and packaging. In particular:
1. Use descriptive variable names <var>libs instead of just <var>.
2. Although Nokia states in all Qt builds that 'NOTE: When linking
against OpenSSL, you can override the default library names
through OPENSSL_LIBS.' and even gives an example, their own
configuration logic rejects such an attempt. Correct this by
hard coding the OpenSSL library string in the configure script.
3. Consistently use the whitespace substitution [\t ] throughout.
4. Patch the buggy INCPATH of SQL plugin Qmake project files.
5. Add the 'x11' configuration variable to the qtconfig Qmake
project using the src/gui/gui.pro file as a model. This is
needed for qtconfig although not in other tools, because
the qtconfig buildconf indirectly includes qt_x11_p.h which
is dependent on X11 headers.
6. Avoid 'ld.so: fatal: hardware capability unsupported: SSE2 AMD_3DNow'
on platforms for which the config.tests/unix/[3dnow|sse2] succeed
although unsopported at run time by testing for the x86-64
instruction set at build time and regulating hardware capabilities.
7. Correctly install the desinger plugin by explicitly building it.
8. Remove custom plugin installation logic which is unnecessary.
9. Correct removal of temporary paths from shared object files.

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

mercurial