curl.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. ##
  2. ## curl.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 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. # package information
  26. Name: curl
  27. Summary: Batch Client for HTTP, HTTPS, FTP, LDAP and DICT protocol
  28. URL: http://curl.haxx.se/
  29. Vendor: Daniel Stenberg
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: BASE
  33. Group: Web
  34. License: GPL
  35. Version: 7.12.1
  36. Release: 20041018
  37. # package options
  38. %option with_ssl yes
  39. %option with_zlib yes
  40. %option with_idn no
  41. # list of sources
  42. Source0: http://curl.haxx.se/download/curl-%{version}.tar.bz2
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. %if "%{with_ssl}" == "yes"
  49. BuildPreReq: openssl >= 0.9.7
  50. PreReq: openssl >= 0.9.7
  51. %endif
  52. %if "%{with_zlib}" == "yes"
  53. BuildPreReq: zlib
  54. PreReq: zlib
  55. %endif
  56. %if "%{with_idn}" == "yes"
  57. BuildPreReq: pkgconfig, libidn
  58. PreReq: pkgconfig, libidn
  59. %endif
  60. AutoReq: no
  61. AutoReqProv: no
  62. %description
  63. Curl is the tool for transferring files with URL syntax, supporting FTP,
  64. HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. Curl supports HTTPS
  65. certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload,
  66. proxies, cookies, user+password authentication, file transfer resume and a
  67. busload of other useful tricks.
  68. %track
  69. prog curl = {
  70. version = %{version}
  71. url = http://curl.haxx.se/download/
  72. regex = curl-(__VER__)\.tar\.gz
  73. }
  74. %prep
  75. %setup -q
  76. %build
  77. %{l_shtool} subst \
  78. -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
  79. configure
  80. ( echo 'ac_cv_header_openssl_engine_h=no'
  81. echo 'lt_cv_prog_compiler_c_o_F77=no'
  82. echo 'lt_cv_sys_max_cmd_len=100'
  83. ) >config.cache
  84. export CC="%{l_cc}"
  85. export CXX="%{l_cxx}"
  86. export CFLAGS="%{l_cflags -O} %{l_cppflags}"
  87. export CPPFLAGS="%{l_cppflags}"
  88. export LDFLAGS="%{l_ldflags}"
  89. export LIBS=""
  90. %if "%{with_idn}" == "yes"
  91. CFLAGS="$CFLAGS `pkg-config --cflags libidn`"
  92. LIBS="$LIBS `pkg-config --libs libidn`"
  93. %endif
  94. ./configure \
  95. --cache-file=./config.cache \
  96. --prefix=%{l_prefix} \
  97. %if "%{with_ssl}" == "yes"
  98. --with-ssl=%{l_prefix} \
  99. %else
  100. --without-ssl \
  101. %endif
  102. %if "%{with_zlib}" == "yes"
  103. --with-zlib=%{l_prefix} \
  104. %else
  105. --without-zlib \
  106. %endif
  107. %if "%{with_idn}" == "yes"
  108. --with-libidn=%{l_prefix} \
  109. %else
  110. --without-libidn \
  111. %endif
  112. --disable-shared
  113. %{l_make} %{l_mflags -O}
  114. %install
  115. rm -rf $RPM_BUILD_ROOT
  116. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  117. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  118. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  119. %files -f files
  120. %clean
  121. rm -rf $RPM_BUILD_ROOT