autoconf.spec 5.9 KB

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