autoconf.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ##
  2. ## autoconf.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # version numbers
  26. %define V_latest 2.57
  27. %define V_old 2.13
  28. # package information
  29. Name: autoconf
  30. Summary: GNU Source Autoconfiguration
  31. URL: http://www.gnu.org/software/autoconf/
  32. Vendor: Free Software Foundation
  33. Packager: The OpenPKG Project
  34. Distribution: OpenPKG [CORE]
  35. Group: Development
  36. License: GPL
  37. Version: %{V_latest}
  38. Release: 20031015
  39. # list of sources
  40. Source1: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_latest}.tar.gz
  41. Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_old}.tar.gz
  42. Patch0: autoconf.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20020206, m4, perl, make
  47. PreReq: OpenPKG, openpkg >= 20020206, m4, perl
  48. AutoReq: no
  49. AutoReqProv: no
  50. %description
  51. Autoconf is an extensible package of m4 macros that produce shell
  52. scripts to automatically configure software source code packages.
  53. These scripts can adapt the packages to many kinds of UNIX-like
  54. systems without manual user intervention. Autoconf creates a
  55. configuration script for a package from a template file that lists
  56. the operating system features that the package can use, in the form
  57. of m4 macro calls.
  58. %prep
  59. %setup0 -q -c -n autoconf-%{V_latest}
  60. %setup1 -q -T -D -a 1
  61. %patch0 -p0
  62. %build
  63. # configure and build Autoconf (deprecated version)
  64. ( cd autoconf-%{V_old}
  65. CC="%{l_cc}" \
  66. CFLAGS="%{l_cflags -O}" \
  67. ./configure \
  68. --prefix=%{l_prefix} \
  69. --program-suffix=-old
  70. %{l_shtool} subst \
  71. -e 's;\(acdatadir = $(datadir)/autoconf\);\1/old;' \
  72. Makefile
  73. %{l_make} %{l_mflags}
  74. ) || exit $?
  75. # configure and build Autoconf (current version)
  76. ( cd autoconf-%{V_latest}
  77. %{l_shtool} subst \
  78. -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \
  79. configure
  80. CC="%{l_cc}" \
  81. CFLAGS="%{l_cflags -O}" \
  82. ACLOCAL=true \
  83. AUTOMAKE=true \
  84. AUTOCONF=true \
  85. AUTOHEADER=true \
  86. MAKEINFO=true \
  87. ./configure \
  88. --prefix=%{l_prefix}
  89. %{l_make} %{l_mflags}
  90. ) || exit $?
  91. %install
  92. rm -rf $RPM_BUILD_ROOT
  93. # configure and build Autoconf (deprecated version)
  94. ( cd autoconf-%{V_old}
  95. %{l_make} %{l_mflags} install \
  96. prefix=$RPM_BUILD_ROOT%{l_prefix}
  97. mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \
  98. $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-old.info
  99. ) || exit $?
  100. # configure and build Autoconf (current version)
  101. ( cd autoconf-%{V_latest}
  102. %{l_make} %{l_mflags} install \
  103. prefix=$RPM_BUILD_ROOT%{l_prefix}
  104. ) || exit $?
  105. # strip down installation
  106. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
  107. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  108. # determine installation files
  109. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  110. %files -f files
  111. %clean
  112. rm -rf $RPM_BUILD_ROOT