curl.spec.in 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. # Use --define 'nossl 1' on the command line to disable SSL detection
  2. %{!?nossl:%define SSL 1}
  3. %{?nossl:%define SSL 0}
  4. %define name curl
  5. %define version @VERSION@
  6. %define release 1%{!?nossl:ssl}
  7. %define curlroot %{_builddir}/%{name}-%{version}
  8. Summary: get a file from a FTP or HTTP server.
  9. Name: %{name}
  10. Version: %{version}
  11. Release: %{release}
  12. License: MIT/X derivate
  13. Vendor: Daniel Stenberg <Daniel.Stenberg@haxx.se>
  14. Group: Applications/Internet
  15. Source: %{name}-%{version}.tar.bz2
  16. URL: http://curl.haxx.se/
  17. Provides: curl
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. Prefix: %{_prefix}
  20. %description
  21. curl is a client to get documents/files from servers, using any of the
  22. supported protocols. The command is designed to work without user
  23. interaction or any kind of interactivity.
  24. curl offers many useful tricks like proxy support, user authentication,
  25. ftp upload, HTTP post, file transfer resume and more.
  26. %if %{SSL} == 1
  27. Note: this version is compiled with SSL support.
  28. %else
  29. Note: this version is compiled without SSL support.
  30. %endif
  31. %package devel
  32. Summary: Development files for the curl libary
  33. Group: Development/Libraries
  34. %if %{SSL} == 1
  35. Requires: openssl >= 0.9.5
  36. %endif
  37. Requires: curl = %{version}
  38. Provides: curl-devel
  39. %description devel
  40. libcurl is the core engine of curl; this packages contains all the
  41. libs, headers, and manual pages to develop applications using libcurl.
  42. %define DEFCC xlc
  43. %prep
  44. rm -rf %{curlroot}
  45. %setup -q
  46. %build
  47. # Use the default compiler for this platform - gcc otherwise
  48. if [[ -z "$CC" ]]
  49. then
  50. if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then
  51. export CC=%{DEFCC}
  52. else
  53. export CC=gcc
  54. fi
  55. fi
  56. cd %{curlroot} && (if [ -f configure.in ]; then mv -f configure.in configure.in.
  57. rpm; fi)
  58. ./configure --prefix=%{prefix} \
  59. %if %{SSL} == 1
  60. --with-ssl
  61. %else
  62. --without-ssl
  63. %endif
  64. make
  65. %install
  66. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  67. make DESTDIR=%{buildroot} install-strip
  68. ( cd $RPM_BUILD_ROOT # same as %{buildroot}
  69. for dir in bin include
  70. do
  71. mkdir -p usr/$dir
  72. cd usr/$dir
  73. ln -sf ../..%{prefix}/$dir/* .
  74. cd -
  75. done
  76. mkdir -p usr/lib
  77. cd usr/lib
  78. ln -sf ../..%{prefix}/lib/* .
  79. cd -
  80. )
  81. %clean
  82. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  83. %files
  84. %defattr(-,root,root)
  85. %attr(0755,root,root) %{_bindir}/curl
  86. %attr(0644,root,root) %{_mandir}/man1/curl.1*
  87. %{_libdir}/libcurl.a
  88. %if %{SSL} == 1
  89. %{_datadir}/curl/curl-ca-bundle.crt
  90. %endif
  91. %doc CHANGES COPYING README RELEASE-NOTES
  92. %doc docs/BUGS docs/CONTRIBUTE docs/FAQ docs/FEATURES docs/HISTORY
  93. %doc docs/INSTALL docs/KNOWN_BUGS
  94. %doc docs/MANUAL docs/RESOURCES docs/THANKS docs/VERSIONS docs/TODO
  95. %doc docs/TheArtOfHttpScripting
  96. %if %{SSL} == 1
  97. %doc docs/SSLCERTS
  98. %endif
  99. /usr/bin/curl
  100. /usr/lib/libcurl.a
  101. %files devel
  102. %defattr(-,root,root)
  103. %attr(0755,root,root) %{_bindir}/curl-config
  104. %attr(0644,root,root) %{_mandir}/man1/curl-config.1*
  105. %attr(0644,root,root) %{_mandir}/man3/*
  106. %attr(0644,root,root) %{_includedir}/curl/*
  107. %{_libdir}/libcurl.la
  108. %doc docs/BINDINGS docs/INTERNALS docs/LICENSE-MIXING
  109. /usr/bin/curl-config
  110. /usr/include/curl