autoconf.spec 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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.60
  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
  34. Distribution: OpenPKG
  35. Class: CORE
  36. Group: Development
  37. License: GPL
  38. Version: %{V_latest}
  39. Release: 20060627
  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. %track
  61. prog autoconf = {
  62. version = %{version}
  63. url = ftp://ftp.gnu.org/gnu/autoconf/
  64. regex = autoconf-(__VER__)\.tar\.gz
  65. }
  66. %prep
  67. %setup -q -c -n autoconf-%{V_latest}
  68. %setup -q -T -D -a 1
  69. %setup -q -T -D -a 2
  70. %patch -p0
  71. %build
  72. # configure and build Autoconf (deprecated version)
  73. ( cd autoconf-%{V_ancient}
  74. CC="%{l_cc}" \
  75. CFLAGS="%{l_cflags -O}" \
  76. ./configure \
  77. --prefix=%{l_prefix} \
  78. --program-suffix=-213
  79. %{l_shtool} subst \
  80. -e 's;\(acdatadir = $(datadir)/autoconf\);\1/213;' \
  81. Makefile
  82. %{l_make} %{l_mflags}
  83. ) || exit $?
  84. # configure and build Autoconf (older version)
  85. ( cd autoconf-%{V_older}
  86. %{l_shtool} subst \
  87. -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \
  88. configure
  89. CC="%{l_cc}" \
  90. CFLAGS="%{l_cflags -O}" \
  91. ACLOCAL=true \
  92. AUTOMAKE=true \
  93. AUTOCONF=true \
  94. AUTOHEADER=true \
  95. MAKEINFO=true \
  96. ./configure \
  97. --prefix=%{l_prefix} \
  98. --datadir=%{l_prefix}/share/autoconf/259 \
  99. --program-suffix=-259
  100. %{l_make} %{l_mflags}
  101. ) || exit $?
  102. # configure and build Autoconf (current version)
  103. ( cd autoconf-%{V_latest}
  104. %{l_shtool} subst \
  105. -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \
  106. configure
  107. CC="%{l_cc}" \
  108. CFLAGS="%{l_cflags -O}" \
  109. ACLOCAL=true \
  110. AUTOMAKE=true \
  111. AUTOCONF=true \
  112. AUTOHEADER=true \
  113. MAKEINFO=true \
  114. ./configure \
  115. --prefix=%{l_prefix} \
  116. --mandir=%{l_prefix}/man \
  117. --infodir=%{l_prefix}/info
  118. %{l_make} %{l_mflags}
  119. ) || exit $?
  120. %install
  121. rm -rf $RPM_BUILD_ROOT
  122. # configure and build Autoconf (deprecated version)
  123. ( cd autoconf-%{V_ancient}
  124. %{l_make} %{l_mflags} install \
  125. prefix=$RPM_BUILD_ROOT%{l_prefix}
  126. mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \
  127. $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-213.info
  128. ) || exit $?
  129. # configure and build Autoconf (older version)
  130. ( cd autoconf-%{V_older}
  131. %{l_make} %{l_mflags} install \
  132. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  133. datadir=$RPM_BUILD_ROOT%{l_prefix}/share/autoconf/259
  134. mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \
  135. $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-259.info
  136. ) || exit $?
  137. # configure and build Autoconf (current version)
  138. ( cd autoconf-%{V_latest}
  139. %{l_make} %{l_mflags} install \
  140. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  141. mandir=$RPM_BUILD_ROOT%{l_prefix}/man \
  142. infodir=$RPM_BUILD_ROOT%{l_prefix}/info
  143. ) || exit $?
  144. # strip down installation
  145. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
  146. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  147. # determine installation files
  148. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  149. %files -f files
  150. %clean
  151. rm -rf $RPM_BUILD_ROOT