michael@11: ## michael@11: ## autoconf.spec -- OpenPKG RPM Package Specification michael@11: ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. michael@11: ## michael@11: ## Permission to use, copy, modify, and distribute this software for michael@11: ## any purpose with or without fee is hereby granted, provided that michael@11: ## the above copyright notice and this permission notice appear in all michael@11: ## copies. michael@11: ## michael@11: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@11: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@11: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@11: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@11: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@11: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@11: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@11: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@11: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@11: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@11: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@11: ## SUCH DAMAGE. michael@11: ## michael@11: michael@11: # version numbers michael@11: %define V_latest 2.63 michael@11: %define V_latest_comp 263 michael@11: %define V_older 2.59 michael@11: %define V_older_comp 259 michael@11: %define V_ancient 2.13 michael@11: %define V_ancient_comp 213 michael@11: %define V_acx_macros 2008-11-07 michael@11: michael@11: # package information michael@11: Name: autoconf michael@11: Summary: GNU Source Autoconfiguration michael@11: URL: http://www.gnu.org/software/autoconf/ michael@11: Vendor: Free Software Foundation michael@11: Packager: OpenPKG Foundation e.V. michael@11: Distribution: OpenPKG Community michael@11: Class: CORE michael@11: Group: Building michael@11: License: GPL michael@11: Version: %{V_latest} michael@43: Release: 20090106 michael@11: michael@11: # build options michael@11: %option with_acx_macros yes michael@11: michael@11: # list of sources michael@11: Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_latest}.tar.gz michael@11: Source1: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_older}.tar.gz michael@11: Source2: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_ancient}.tar.gz michael@11: Source3: http://autoconf-archive.cryp.to/autoconf-archive-%{V_acx_macros}.tar.bz2 michael@11: Patch0: autoconf.patch michael@11: michael@11: # build information michael@11: Prefix: %{l_prefix} michael@11: BuildRoot: %{l_buildroot} michael@11: BuildPreReq: OpenPKG, openpkg >= 20040130, m4 >= 1.4, perl, make michael@11: PreReq: OpenPKG, openpkg >= 20040130, m4 >= 1.4, perl michael@11: AutoReq: no michael@11: AutoReqProv: no michael@11: michael@11: %description michael@11: Autoconf is an extensible package of m4 macros that produce shell michael@11: scripts to automatically configure software source code packages. michael@11: These scripts can adapt the packages to many kinds of UNIX-like michael@11: systems without manual user intervention. Autoconf creates a michael@11: configuration script for a package from a template file that lists michael@11: the operating system features that the package can use, in the form michael@11: of m4 macro calls. michael@11: michael@11: This OpenPKG packages provides the following Autoconf versions: michael@11: - GNU Autoconf %{V_latest} (latest version, the default) michael@11: - GNU Autoconf %{V_older} (older version, as an alternative) michael@11: - GNU Autoconf %{V_ancient} (ancient version, for backward-compatibility) michael@11: michael@11: %track michael@11: prog autoconf = { michael@11: version = %{version} michael@11: url = ftp://ftp.gnu.org/gnu/autoconf/ michael@11: regex = autoconf-(__VER__)\.tar\.gz michael@11: } michael@11: michael@11: %prep michael@11: %setup -q -c -n autoconf-%{V_latest} michael@11: %setup -q -T -D -a 1 michael@11: %setup -q -T -D -a 2 michael@11: %patch -p0 michael@11: %if "%{with_acx_macros}" == "yes" michael@11: %setup -q -T -D -a 3 michael@11: cp \ michael@11: autoconf-archive-%{V_acx_macros}/m4/acx_pthread.m4 \ michael@11: autoconf-%{V_latest}/lib/autoconf/ michael@11: ( cd autoconf-%{V_latest}/lib/autoconf michael@11: cp autoconf.m4 autoconf.m4.tmp michael@11: cat autoconf.m4.tmp | %{l_sed} -e '72a\ michael@11: m4_include([autoconf/acx_pthread.m4])' >autoconf.m4 michael@11: rm autoconf.m4.tmp michael@11: ) || exit $? michael@11: %endif michael@11: michael@11: %build michael@11: # configure and build Autoconf (deprecated version) michael@11: ( cd autoconf-%{V_ancient} michael@11: CC="%{l_cc}" \ michael@11: CFLAGS="%{l_cflags -O}" \ michael@11: ./configure \ michael@11: --prefix=%{l_prefix} \ michael@11: --program-suffix="-%{V_ancient_comp}" michael@11: %{l_shtool} subst \ michael@11: -e 's;\(acdatadir = $(datadir)/autoconf\);\1/%{V_ancient_comp};' \ michael@11: Makefile michael@11: %{l_make} %{l_mflags} michael@11: ) || exit $? michael@11: michael@11: # configure and build Autoconf (older version) michael@11: ( cd autoconf-%{V_older} michael@11: %{l_shtool} subst \ michael@11: -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \ michael@11: configure michael@11: %{l_shtool} subst \ michael@11: -e 's;^\(pkgdatadir.=..(datadir)\)/@PACKAGE@;\1;' \ michael@11: Makefile.in */Makefile.in */*/Makefile.in michael@11: CC="%{l_cc}" \ michael@11: CFLAGS="%{l_cflags -O}" \ michael@11: ACLOCAL=true \ michael@11: AUTOMAKE=true \ michael@11: AUTOCONF=true \ michael@11: AUTOHEADER=true \ michael@11: MAKEINFO=true \ michael@11: GREP=grep \ michael@11: ./configure \ michael@11: --prefix=%{l_prefix} \ michael@11: --datadir=%{l_prefix}/share/autoconf/%{V_older_comp} \ michael@11: --program-suffix="-%{V_older_comp}" michael@11: %{l_make} %{l_mflags} michael@11: ) || exit $? michael@11: michael@11: # configure and build Autoconf (current version) michael@11: ( cd autoconf-%{V_latest} michael@11: %{l_shtool} subst \ michael@11: -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \ michael@11: configure michael@11: %{l_shtool} subst \ michael@11: -e 's;^\(pkgdatadir.=..(datadir)\)/@PACKAGE@;\1;' \ michael@11: Makefile.in */Makefile.in */*/Makefile.in michael@11: CC="%{l_cc}" \ michael@11: CFLAGS="%{l_cflags -O}" \ michael@11: ACLOCAL=true \ michael@11: AUTOMAKE=true \ michael@11: AUTOCONF=true \ michael@11: AUTOHEADER=true \ michael@11: MAKEINFO=true \ michael@11: GREP=grep \ michael@11: ./configure \ michael@11: --prefix=%{l_prefix} \ michael@11: --mandir=%{l_prefix}/man \ michael@11: --datadir=%{l_prefix}/share/autoconf/%{V_latest_comp} \ michael@11: --infodir=%{l_prefix}/info michael@11: %{l_make} %{l_mflags} michael@11: ) || exit $? michael@11: michael@11: %install michael@11: rm -rf $RPM_BUILD_ROOT michael@11: michael@11: # configure and build Autoconf (deprecated version) michael@11: ( cd autoconf-%{V_ancient} michael@11: %{l_make} %{l_mflags} install \ michael@11: prefix=$RPM_BUILD_ROOT%{l_prefix} michael@11: mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \ michael@11: $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-%{V_ancient_comp}.info michael@11: ) || exit $? michael@11: michael@11: # configure and build Autoconf (older version) michael@11: ( cd autoconf-%{V_older} michael@11: %{l_make} %{l_mflags} install \ michael@11: prefix=$RPM_BUILD_ROOT%{l_prefix} \ michael@11: datadir=$RPM_BUILD_ROOT%{l_prefix}/share/autoconf/%{V_older_comp} \ michael@11: mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ michael@11: infodir=$RPM_BUILD_ROOT%{l_prefix}/info michael@11: mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \ michael@11: $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-%{V_older_comp}.info michael@11: ) || exit $? michael@11: michael@11: # configure and build Autoconf (current version) michael@11: ( cd autoconf-%{V_latest} michael@11: %{l_make} %{l_mflags} install \ michael@11: prefix=$RPM_BUILD_ROOT%{l_prefix} \ michael@11: datadir=$RPM_BUILD_ROOT%{l_prefix}/share/autoconf/%{V_latest_comp} \ michael@11: mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ michael@11: infodir=$RPM_BUILD_ROOT%{l_prefix}/info michael@11: ) || exit $? michael@11: michael@11: %if "%{with_acx_macros}" == "yes" michael@11: cp \ michael@11: autoconf-archive-%{V_acx_macros}/m4/acx_pthread.m4 \ michael@11: $RPM_BUILD_ROOT%{l_prefix}/share/autoconf/ michael@11: %endif michael@11: michael@11: # strip down installation michael@11: rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs michael@11: rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir michael@11: michael@11: # determine installation files michael@11: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@11: michael@11: %files -f files michael@11: michael@11: %clean michael@11: rm -rf $RPM_BUILD_ROOT michael@11: