curl.spec.in 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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: https://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 library
  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. %attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
  88. %{_libdir}/libcurl.a
  89. %if %{SSL} == 1
  90. %{_datadir}/curl/curl-ca-bundle.crt
  91. %endif
  92. %doc CHANGES COPYING README RELEASE-NOTES
  93. %doc docs/BUGS docs/CONTRIBUTE docs/FAQ docs/FEATURES docs/HISTORY
  94. %doc docs/INSTALL docs/KNOWN_BUGS
  95. %doc docs/MANUAL docs/RESOURCES docs/THANKS docs/VERSIONS docs/TODO
  96. %doc docs/TheArtOfHttpScripting
  97. %if %{SSL} == 1
  98. %doc docs/SSLCERTS
  99. %endif
  100. /usr/bin/curl
  101. /usr/lib/libcurl.a
  102. %files devel
  103. %defattr(-,root,root)
  104. %attr(0755,root,root) %{_bindir}/curl-config
  105. %attr(0644,root,root) %{_mandir}/man1/curl-config.1*
  106. %attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
  107. %attr(0644,root,root) %{_mandir}/man3/*
  108. %attr(0644,root,root) %{_includedir}/curl/*
  109. %{_libdir}/libcurl.la
  110. %doc docs/BINDINGS docs/INTERNALS docs/LICENSE-MIXING
  111. /usr/bin/curl-config
  112. /usr/include/curl