curl.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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.17.0
  35. Release: 20070914
  36. # package options
  37. %option with_ssl yes
  38. %option with_zlib yes
  39. %option with_ssh no
  40. %option with_idn no
  41. %option with_ares no
  42. %option with_kerberos no
  43. # list of sources
  44. Source0: http://curl.haxx.se/download/curl-%{version}.tar.bz2
  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. %if "%{with_ssh}" == "yes"
  71. BuildPreReq: libssh2
  72. PreReq: libssh2
  73. %endif
  74. AutoReq: no
  75. AutoReqProv: no
  76. %description
  77. Curl is the tool for transferring files with URL syntax, supporting FTP,
  78. HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. Curl supports HTTPS
  79. certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload,
  80. proxies, cookies, user+password authentication, file transfer resume and a
  81. busload of other useful tricks.
  82. %track
  83. prog curl = {
  84. version = %{version}
  85. url = http://curl.haxx.se/download/
  86. regex = curl-(__VER__)\.tar\.gz
  87. }
  88. %prep
  89. %setup -q
  90. %build
  91. %{l_shtool} subst \
  92. -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
  93. configure
  94. ( echo 'ac_cv_header_openssl_engine_h=no'
  95. echo 'lt_cv_prog_compiler_c_o_F77=no'
  96. echo 'lt_cv_sys_max_cmd_len=100'
  97. ) >config.cache
  98. export CC="%{l_cc}"
  99. export CXX="%{l_cxx}"
  100. export CFLAGS="%{l_cflags -O} %{l_cppflags}"
  101. export CPPFLAGS="%{l_cppflags}"
  102. export LDFLAGS="%{l_ldflags}"
  103. export LIBS=""
  104. %if "%{with_idn}" == "yes"
  105. CFLAGS="$CFLAGS `pkg-config --cflags libidn`"
  106. LIBS="$LIBS `pkg-config --libs libidn`"
  107. %endif
  108. export GREP="grep"
  109. ./configure \
  110. --cache-file=./config.cache \
  111. --prefix=%{l_prefix} \
  112. --datarootdir=%{l_prefix} \
  113. %if "%{with_ssl}" == "yes"
  114. --with-ssl=%{l_prefix} \
  115. --with-ca-bundle=%{l_prefix}/etc/curl/ca-bundle.crt \
  116. %else
  117. --without-ssl \
  118. %endif
  119. %if "%{with_zlib}" == "yes"
  120. --with-zlib=%{l_prefix} \
  121. %else
  122. --without-zlib \
  123. %endif
  124. %if "%{with_idn}" == "yes"
  125. --with-libidn=%{l_prefix} \
  126. %else
  127. --without-libidn \
  128. %endif
  129. %if "%{with_ares}" == "yes"
  130. --enable-ares=%{l_prefix} \
  131. %else
  132. --disable-ares \
  133. %endif
  134. %if "%{with_kerberos}" == "yes"
  135. --with-gssapi=%{l_prefix} \
  136. %else
  137. --without-gssapi \
  138. %endif
  139. %if "%{with_ssh}" == "yes"
  140. --with-libssh2=%{l_prefix} \
  141. %else
  142. --without-libssh2 \
  143. %endif
  144. --disable-ldap \
  145. --disable-shared
  146. %{l_make} %{l_mflags -O}
  147. %install
  148. rm -rf $RPM_BUILD_ROOT
  149. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  150. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  151. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  152. %if "%{with_ssl}" == "yes"
  153. %{l_files_std} \
  154. '%config %{l_prefix}/etc/curl/*'
  155. %else
  156. %{l_files_std}
  157. %endif
  158. %files -f files
  159. %clean
  160. rm -rf $RPM_BUILD_ROOT