autoconf.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. ##
  2. ## autoconf.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@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.54
  26. %define V_old 2.13
  27. # package options
  28. %ifndef with_acx_pthread
  29. %define with_acx_pthread no
  30. %endif
  31. # package information
  32. Name: autoconf
  33. Summary: GNU Source Autoconfiguration
  34. URL: http://www.gnu.org/software/autoconf/
  35. Vendor: Free Software Foundation
  36. Packager: The OpenPKG Project
  37. Distribution: OpenPKG [CORE]
  38. Group: Development
  39. License: GPL
  40. Version: %{V_latest}
  41. Release: 20021020
  42. # list of sources
  43. Source1: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_latest}.tar.gz
  44. Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_old}.tar.gz
  45. Source2: http://www.gnu.org/software/ac-archive/Installed_Packages/acx_pthread.m4
  46. Patch0: autoconf-%{V_old}.patch
  47. # build information
  48. Prefix: %{l_prefix}
  49. BuildRoot: %{l_buildroot}
  50. BuildPreReq: OpenPKG, openpkg >= 20020206, m4, perl, make
  51. PreReq: OpenPKG, openpkg >= 20020206, m4, perl
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. GNU Autoconf is a package for generating configure scripts. These
  56. scripts are present in a large number of free software packages and
  57. are used to detect system features at compilation time. Autoconf
  58. is mostly needed by people producing packages that run on a wide
  59. variety of platforms--particularly UNIX-a-likes.
  60. Options:
  61. --define 'with_acx_pthread %{with_acx_pthread}'
  62. %prep
  63. %setup0 -q -c -n autoconf-%{V_latest}
  64. %setup1 -q -T -D -a 1
  65. cd autoconf-%{V_old}
  66. %{l_patch} -p0 <%{SOURCE autoconf-%{V_old}.patch}
  67. %if "%{with_acx_pthread}" == "yes"
  68. ( cd ../autoconf-%{V_latest}/lib/autoconf
  69. cp -rp %{SOURCE acx_pthread.m4} .
  70. cat autoconf.m4 | %{l_sed} -e '69a\
  71. m4_include([autoconf/acx_pthread.m4])' >autoconf.m4
  72. %endif
  73. )
  74. %build
  75. ( cd autoconf-%{V_old}
  76. CC="%{l_cc}" \
  77. CFLAGS="%{l_cflags -O}" \
  78. ./configure \
  79. --prefix=%{l_prefix} \
  80. --program-suffix=-old
  81. %{l_shtool} subst \
  82. -e 's;\(acdatadir = $(datadir)/autoconf\);\1/old;' \
  83. Makefile
  84. %{l_make} %{l_mflags}
  85. )
  86. ( cd autoconf-%{V_latest}
  87. CC="%{l_cc}" \
  88. CFLAGS="%{l_cflags -O}" \
  89. ./configure \
  90. --prefix=%{l_prefix}
  91. %{l_make} %{l_mflags}
  92. )
  93. %install
  94. rm -rf $RPM_BUILD_ROOT
  95. ( cd autoconf-%{V_old}
  96. %{l_make} %{l_mflags} install \
  97. prefix=$RPM_BUILD_ROOT%{l_prefix}
  98. mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \
  99. $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-old.info
  100. )
  101. ( cd autoconf-%{V_latest}
  102. %{l_make} %{l_mflags} install \
  103. prefix=$RPM_BUILD_ROOT%{l_prefix}
  104. )
  105. %if "%{with_acx_pthread}" == "yes"
  106. cp -rp %{SOURCE acx_pthread.m4} $RPM_BUILD_ROOT%{l_prefix}/share/autoconf/autoconf
  107. %endif
  108. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  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