autoconf.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. %define V_latest 2.52
  25. %define V_old 2.13
  26. # package information
  27. Name: autoconf
  28. Summary: GNU Source Autoconfiguration
  29. URL: http://www.gnu.org/software/autoconf/
  30. Vendor: Free Software Foundation
  31. Packager: The OpenPKG Project
  32. Distribution: OpenPKG [REL]
  33. Group: Development
  34. License: GPL
  35. Version: %{V_latest}
  36. Release: 20020206
  37. # list of sources
  38. Source1: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_latest}.tar.gz
  39. Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_old}.tar.gz
  40. Patch0: autoconf-%{V_old}.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020206, m4, make
  45. PreReq: OpenPKG, openpkg >= 20020206, m4
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. GNU Autoconf is a package for generating configure scripts. These
  50. scripts are present in a large number of free software packages and
  51. are used to detect system features at compilation time. Autoconf
  52. is mostly needed by people producing packages that run on a wide
  53. variety of platforms--particularly UNIX-a-likes.
  54. %prep
  55. %setup0 -q -c -n autoconf-%{V_latest}
  56. %setup1 -q -T -D -a 1
  57. cd autoconf-%{V_old}
  58. %{l_patch} -p0 <%{SOURCE autoconf-%{V_old}.patch}
  59. %build
  60. PATH="%{l_prefix}/bin:$PATH"; export PATH
  61. ( cd autoconf-%{V_old}
  62. CC="%{l_cc}" \
  63. CFLAGS="%{l_cflags -O}" \
  64. ./configure \
  65. --prefix=%{l_prefix} \
  66. --program-suffix=-old
  67. %{l_rpmtool} subst \
  68. 's;\(acdatadir = $(datadir)/autoconf\);\1/old;' \
  69. -- Makefile
  70. %{l_make} %{l_mflags}
  71. )
  72. ( cd autoconf-%{V_latest}
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. ./configure \
  76. --prefix=%{l_prefix}
  77. %{l_make} %{l_mflags}
  78. )
  79. %install
  80. rm -rf $RPM_BUILD_ROOT
  81. ( cd autoconf-%{V_old}
  82. %{l_make} %{l_mflags} install \
  83. prefix=$RPM_BUILD_ROOT%{l_prefix}
  84. mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \
  85. $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-old.info
  86. )
  87. ( cd autoconf-%{V_latest}
  88. %{l_make} %{l_mflags} install \
  89. prefix=$RPM_BUILD_ROOT%{l_prefix}
  90. )
  91. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  93. %files -f files
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT