curl.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. ##
  2. ## curl.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 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 Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: BASE
  32. Group: Web
  33. License: MIT-style
  34. Version: 7.16.4
  35. Release: 20070720
  36. # package options
  37. %option with_ssl yes
  38. %option with_zlib yes
  39. %option with_idn no
  40. %option with_ares no
  41. %option with_kerberos no
  42. # list of sources
  43. Source0: http://curl.haxx.se/download/curl-%{version}.tar.bz2
  44. Patch0: curl.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
  49. PreReq: OpenPKG, openpkg >= 20040130
  50. %if "%{with_ssl}" == "yes"
  51. BuildPreReq: openssl >= 0.9.7
  52. PreReq: openssl >= 0.9.7
  53. %endif
  54. %if "%{with_zlib}" == "yes"
  55. BuildPreReq: zlib
  56. PreReq: zlib
  57. %endif
  58. %if "%{with_idn}" == "yes"
  59. BuildPreReq: libidn, pkgconfig
  60. PreReq: libidn
  61. %endif
  62. %if "%{with_ares}" == "yes"
  63. BuildPreReq: ares
  64. PreReq: ares
  65. %endif
  66. %if "%{with_kerberos}" == "yes"
  67. BuildPreReq: kerberos
  68. PreReq: kerberos
  69. %endif
  70. AutoReq: no
  71. AutoReqProv: no
  72. %description
  73. Curl is the tool for transferring files with URL syntax, supporting FTP,
  74. HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. Curl supports HTTPS
  75. certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload,
  76. proxies, cookies, user+password authentication, file transfer resume and a
  77. busload of other useful tricks.
  78. %track
  79. prog curl = {
  80. version = %{version}
  81. url = http://curl.haxx.se/download/
  82. regex = curl-(__VER__)\.tar\.gz
  83. }
  84. %prep
  85. %setup -q
  86. %patch -p0
  87. %build
  88. %{l_shtool} subst \
  89. -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
  90. configure
  91. ( echo 'ac_cv_header_openssl_engine_h=no'
  92. echo 'lt_cv_prog_compiler_c_o_F77=no'
  93. echo 'lt_cv_sys_max_cmd_len=100'
  94. ) >config.cache
  95. export CC="%{l_cc}"
  96. export CXX="%{l_cxx}"
  97. export CFLAGS="%{l_cflags -O} %{l_cppflags}"
  98. export CPPFLAGS="%{l_cppflags}"
  99. export LDFLAGS="%{l_ldflags}"
  100. export LIBS=""
  101. %if "%{with_idn}" == "yes"
  102. CFLAGS="$CFLAGS `pkg-config --cflags libidn`"
  103. LIBS="$LIBS `pkg-config --libs libidn`"
  104. %endif
  105. export GREP="grep"
  106. ./configure \
  107. --cache-file=./config.cache \
  108. --prefix=%{l_prefix} \
  109. --datarootdir=%{l_prefix} \
  110. %if "%{with_ssl}" == "yes"
  111. --with-ssl=%{l_prefix} \
  112. --with-ca-bundle=%{l_prefix}/etc/curl/ca-bundle.crt \
  113. %else
  114. --without-ssl \
  115. %endif
  116. %if "%{with_zlib}" == "yes"
  117. --with-zlib=%{l_prefix} \
  118. %else
  119. --without-zlib \
  120. %endif
  121. %if "%{with_idn}" == "yes"
  122. --with-libidn=%{l_prefix} \
  123. %else
  124. --without-libidn \
  125. %endif
  126. %if "%{with_ares}" == "yes"
  127. --enable-ares=%{l_prefix} \
  128. %else
  129. --disable-ares \
  130. %endif
  131. %if "%{with_kerberos}" == "yes"
  132. --with-gssapi=%{l_prefix} \
  133. %else
  134. --without-gssapi \
  135. %endif
  136. --without-libssh2 \
  137. --disable-shared
  138. %{l_make} %{l_mflags -O}
  139. %install
  140. rm -rf $RPM_BUILD_ROOT
  141. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  142. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  143. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  144. %if "%{with_ssl}" == "yes"
  145. %{l_files_std} \
  146. '%config %{l_prefix}/etc/curl/*'
  147. %else
  148. %{l_files_std}
  149. %endif
  150. %files -f files
  151. %clean
  152. rm -rf $RPM_BUILD_ROOT