curl.spec 4.7 KB

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