autoconf/autoconf.spec

changeset 11
f6a3aec3e5db
child 43
f3c8838372a2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/autoconf/autoconf.spec	Sun Jan 04 08:39:40 2009 +0100
     1.3 @@ -0,0 +1,212 @@
     1.4 +##
     1.5 +##  autoconf.spec -- OpenPKG RPM Package Specification
     1.6 +##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 +##
     1.8 +##  Permission to use, copy, modify, and distribute this software for
     1.9 +##  any purpose with or without fee is hereby granted, provided that
    1.10 +##  the above copyright notice and this permission notice appear in all
    1.11 +##  copies.
    1.12 +##
    1.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    1.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    1.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    1.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.24 +##  SUCH DAMAGE.
    1.25 +##
    1.26 +
    1.27 +#   version numbers
    1.28 +%define       V_latest       2.63
    1.29 +%define       V_latest_comp  263
    1.30 +%define       V_older        2.59
    1.31 +%define       V_older_comp   259
    1.32 +%define       V_ancient      2.13
    1.33 +%define       V_ancient_comp 213
    1.34 +%define       V_acx_macros   2008-11-07
    1.35 +
    1.36 +#   package information
    1.37 +Name:         autoconf
    1.38 +Summary:      GNU Source Autoconfiguration
    1.39 +URL:          http://www.gnu.org/software/autoconf/
    1.40 +Vendor:       Free Software Foundation
    1.41 +Packager:     OpenPKG Foundation e.V.
    1.42 +Distribution: OpenPKG Community
    1.43 +Class:        CORE
    1.44 +Group:        Building
    1.45 +License:      GPL
    1.46 +Version:      %{V_latest}
    1.47 +Release:      20081205
    1.48 +
    1.49 +#   build options
    1.50 +%option       with_acx_macros  yes
    1.51 +
    1.52 +#   list of sources
    1.53 +Source0:      ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_latest}.tar.gz
    1.54 +Source1:      ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_older}.tar.gz
    1.55 +Source2:      ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_ancient}.tar.gz
    1.56 +Source3:      http://autoconf-archive.cryp.to/autoconf-archive-%{V_acx_macros}.tar.bz2
    1.57 +Patch0:       autoconf.patch
    1.58 +
    1.59 +#   build information
    1.60 +Prefix:       %{l_prefix}
    1.61 +BuildRoot:    %{l_buildroot}
    1.62 +BuildPreReq:  OpenPKG, openpkg >= 20040130, m4 >= 1.4, perl, make
    1.63 +PreReq:       OpenPKG, openpkg >= 20040130, m4 >= 1.4, perl
    1.64 +AutoReq:      no
    1.65 +AutoReqProv:  no
    1.66 +
    1.67 +%description
    1.68 +    Autoconf is an extensible package of m4 macros that produce shell
    1.69 +    scripts to automatically configure software source code packages.
    1.70 +    These scripts can adapt the packages to many kinds of UNIX-like
    1.71 +    systems without manual user intervention. Autoconf creates a
    1.72 +    configuration script for a package from a template file that lists
    1.73 +    the operating system features that the package can use, in the form
    1.74 +    of m4 macro calls.
    1.75 +
    1.76 +    This OpenPKG packages provides the following Autoconf versions:
    1.77 +    - GNU Autoconf %{V_latest} (latest version, the default)
    1.78 +    - GNU Autoconf %{V_older} (older version, as an alternative)
    1.79 +    - GNU Autoconf %{V_ancient} (ancient version, for backward-compatibility)
    1.80 +
    1.81 +%track
    1.82 +    prog autoconf = {
    1.83 +        version   = %{version}
    1.84 +        url       = ftp://ftp.gnu.org/gnu/autoconf/
    1.85 +        regex     = autoconf-(__VER__)\.tar\.gz
    1.86 +    }
    1.87 +
    1.88 +%prep
    1.89 +    %setup -q -c -n autoconf-%{V_latest}
    1.90 +    %setup -q -T -D -a 1
    1.91 +    %setup -q -T -D -a 2
    1.92 +    %patch -p0
    1.93 +%if "%{with_acx_macros}" == "yes"
    1.94 +    %setup -q -T -D -a 3
    1.95 +    cp \
    1.96 +        autoconf-archive-%{V_acx_macros}/m4/acx_pthread.m4 \
    1.97 +        autoconf-%{V_latest}/lib/autoconf/
    1.98 +    ( cd autoconf-%{V_latest}/lib/autoconf
    1.99 +      cp autoconf.m4 autoconf.m4.tmp
   1.100 +      cat autoconf.m4.tmp | %{l_sed} -e '72a\
   1.101 +m4_include([autoconf/acx_pthread.m4])' >autoconf.m4
   1.102 +      rm autoconf.m4.tmp
   1.103 +    ) || exit $?
   1.104 +%endif
   1.105 +
   1.106 +%build
   1.107 +    #   configure and build Autoconf (deprecated version)
   1.108 +    ( cd autoconf-%{V_ancient}
   1.109 +      CC="%{l_cc}" \
   1.110 +      CFLAGS="%{l_cflags -O}" \
   1.111 +      ./configure \
   1.112 +          --prefix=%{l_prefix} \
   1.113 +          --program-suffix="-%{V_ancient_comp}"
   1.114 +      %{l_shtool} subst \
   1.115 +          -e 's;\(acdatadir = $(datadir)/autoconf\);\1/%{V_ancient_comp};' \
   1.116 +          Makefile
   1.117 +      %{l_make} %{l_mflags}
   1.118 +    ) || exit $?
   1.119 +
   1.120 +    #   configure and build Autoconf (older version)
   1.121 +    ( cd autoconf-%{V_older}
   1.122 +      %{l_shtool} subst \
   1.123 +          -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \
   1.124 +          configure
   1.125 +      %{l_shtool} subst \
   1.126 +          -e 's;^\(pkgdatadir.=..(datadir)\)/@PACKAGE@;\1;' \
   1.127 +          Makefile.in */Makefile.in */*/Makefile.in
   1.128 +      CC="%{l_cc}" \
   1.129 +      CFLAGS="%{l_cflags -O}" \
   1.130 +      ACLOCAL=true \
   1.131 +      AUTOMAKE=true \
   1.132 +      AUTOCONF=true \
   1.133 +      AUTOHEADER=true \
   1.134 +      MAKEINFO=true \
   1.135 +      GREP=grep \
   1.136 +      ./configure \
   1.137 +          --prefix=%{l_prefix} \
   1.138 +          --datadir=%{l_prefix}/share/autoconf/%{V_older_comp} \
   1.139 +          --program-suffix="-%{V_older_comp}"
   1.140 +      %{l_make} %{l_mflags}
   1.141 +    ) || exit $?
   1.142 +
   1.143 +    #   configure and build Autoconf (current version)
   1.144 +    ( cd autoconf-%{V_latest}
   1.145 +      %{l_shtool} subst \
   1.146 +          -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \
   1.147 +          configure
   1.148 +      %{l_shtool} subst \
   1.149 +          -e 's;^\(pkgdatadir.=..(datadir)\)/@PACKAGE@;\1;' \
   1.150 +          Makefile.in */Makefile.in */*/Makefile.in
   1.151 +      CC="%{l_cc}" \
   1.152 +      CFLAGS="%{l_cflags -O}" \
   1.153 +      ACLOCAL=true \
   1.154 +      AUTOMAKE=true \
   1.155 +      AUTOCONF=true \
   1.156 +      AUTOHEADER=true \
   1.157 +      MAKEINFO=true \
   1.158 +      GREP=grep \
   1.159 +      ./configure \
   1.160 +          --prefix=%{l_prefix} \
   1.161 +          --mandir=%{l_prefix}/man \
   1.162 +          --datadir=%{l_prefix}/share/autoconf/%{V_latest_comp} \
   1.163 +          --infodir=%{l_prefix}/info
   1.164 +      %{l_make} %{l_mflags}
   1.165 +    ) || exit $?
   1.166 +
   1.167 +%install
   1.168 +    rm -rf $RPM_BUILD_ROOT
   1.169 +
   1.170 +    #   configure and build Autoconf (deprecated version)
   1.171 +    ( cd autoconf-%{V_ancient}
   1.172 +      %{l_make} %{l_mflags} install \
   1.173 +          prefix=$RPM_BUILD_ROOT%{l_prefix}
   1.174 +      mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \
   1.175 +         $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-%{V_ancient_comp}.info
   1.176 +    ) || exit $?
   1.177 +
   1.178 +    #   configure and build Autoconf (older version)
   1.179 +    ( cd autoconf-%{V_older}
   1.180 +      %{l_make} %{l_mflags} install \
   1.181 +          prefix=$RPM_BUILD_ROOT%{l_prefix} \
   1.182 +          datadir=$RPM_BUILD_ROOT%{l_prefix}/share/autoconf/%{V_older_comp} \
   1.183 +          mandir=$RPM_BUILD_ROOT%{l_prefix}/man \
   1.184 +          infodir=$RPM_BUILD_ROOT%{l_prefix}/info
   1.185 +      mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \
   1.186 +         $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-%{V_older_comp}.info
   1.187 +    ) || exit $?
   1.188 +
   1.189 +    #   configure and build Autoconf (current version)
   1.190 +    ( cd autoconf-%{V_latest}
   1.191 +      %{l_make} %{l_mflags} install \
   1.192 +          prefix=$RPM_BUILD_ROOT%{l_prefix} \
   1.193 +          datadir=$RPM_BUILD_ROOT%{l_prefix}/share/autoconf/%{V_latest_comp} \
   1.194 +          mandir=$RPM_BUILD_ROOT%{l_prefix}/man \
   1.195 +          infodir=$RPM_BUILD_ROOT%{l_prefix}/info
   1.196 +    ) || exit $?
   1.197 +
   1.198 +%if "%{with_acx_macros}" == "yes"
   1.199 +    cp \
   1.200 +        autoconf-archive-%{V_acx_macros}/m4/acx_pthread.m4 \
   1.201 +        $RPM_BUILD_ROOT%{l_prefix}/share/autoconf/
   1.202 +%endif
   1.203 +
   1.204 +    #   strip down installation
   1.205 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
   1.206 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   1.207 +
   1.208 +    #   determine installation files
   1.209 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   1.210 +
   1.211 +%files -f files
   1.212 +
   1.213 +%clean
   1.214 +    rm -rf $RPM_BUILD_ROOT
   1.215 +

mercurial