curl.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ##
  2. ## curl.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. # package information
  25. Name: curl
  26. Summary: Batch Client for HTTP, HTTPS, FTP, LDAP and DICT protocol
  27. URL: http://curl.haxx.se/
  28. Vendor: Daniel Stenberg
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: BASE
  32. Group: Web
  33. License: MIT-style
  34. Version: 7.15.4
  35. Release: 20060612
  36. # package options
  37. %option with_ssl yes
  38. %option with_zlib yes
  39. %option with_idn no
  40. # list of sources
  41. Source0: http://curl.haxx.se/download/curl-%{version}.tar.bz2
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. %if "%{with_ssl}" == "yes"
  48. BuildPreReq: openssl >= 0.9.7
  49. PreReq: openssl >= 0.9.7
  50. %endif
  51. %if "%{with_zlib}" == "yes"
  52. BuildPreReq: zlib
  53. PreReq: zlib
  54. %endif
  55. %if "%{with_idn}" == "yes"
  56. BuildPreReq: libidn, pkgconfig
  57. PreReq: libidn
  58. %endif
  59. AutoReq: no
  60. AutoReqProv: no
  61. %description
  62. Curl is the tool for transferring files with URL syntax, supporting FTP,
  63. HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. Curl supports HTTPS
  64. certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload,
  65. proxies, cookies, user+password authentication, file transfer resume and a
  66. busload of other useful tricks.
  67. %track
  68. prog curl = {
  69. version = %{version}
  70. url = http://curl.haxx.se/download/
  71. regex = curl-(__VER__)\.tar\.gz
  72. }
  73. %prep
  74. %setup -q
  75. %build
  76. %{l_shtool} subst \
  77. -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
  78. configure
  79. ( echo 'ac_cv_header_openssl_engine_h=no'
  80. echo 'lt_cv_prog_compiler_c_o_F77=no'
  81. echo 'lt_cv_sys_max_cmd_len=100'
  82. ) >config.cache
  83. export CC="%{l_cc}"
  84. export CXX="%{l_cxx}"
  85. export CFLAGS="%{l_cflags -O} %{l_cppflags}"
  86. export CPPFLAGS="%{l_cppflags}"
  87. export LDFLAGS="%{l_ldflags}"
  88. export LIBS=""
  89. %if "%{with_idn}" == "yes"
  90. CFLAGS="$CFLAGS `pkg-config --cflags libidn`"
  91. LIBS="$LIBS `pkg-config --libs libidn`"
  92. %endif
  93. ./configure \
  94. --cache-file=./config.cache \
  95. --prefix=%{l_prefix} \
  96. %if "%{with_ssl}" == "yes"
  97. --with-ssl=%{l_prefix} \
  98. --with-ca-bundle=%{l_prefix}/etc/curl/ca-bundle.crt \
  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 \
  119. %if "%{with_ssl}" == "yes"
  120. %{l_files_std} \
  121. '%config %{l_prefix}/etc/curl/*'
  122. %else
  123. %{l_files_std}
  124. %endif
  125. %files -f files
  126. %clean
  127. rm -rf $RPM_BUILD_ROOT