socat.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ##
  2. ## socat.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_major 1.7.0
  25. %define V_minor 0
  26. # package information
  27. Name: socat
  28. Summary: Socket Client
  29. URL: http://www.dest-unreach.org/socat/
  30. Vendor: Gerhard Rieger
  31. Packager: OpenPKG Foundation e.V.
  32. Distribution: OpenPKG Community
  33. Class: BASE
  34. Group: Network
  35. License: GPL
  36. Version: %{V_major}.%{V_minor}
  37. Release: 20081016
  38. # package options
  39. %option with_readline yes
  40. %option with_ssl yes
  41. # list of sources
  42. Source0: http://www.dest-unreach.org/socat/download/socat-%{V_major}.%{V_minor}.tar.bz2
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  47. PreReq: OpenPKG, openpkg >= 20040130
  48. %if "%{with_readline}" == "yes"
  49. BuildPreReq: readline
  50. PreReq: readline
  51. %endif
  52. %if "%{with_ssl}" == "yes"
  53. BuildPreReq: openssl
  54. PreReq: openssl
  55. %endif
  56. AutoReq: no
  57. AutoReqProv: no
  58. %description
  59. Socat is a relay for bi-directional data transfer between two
  60. independent data channels. Each of these data channels may be a
  61. file, pipe, device (terminal, modem, etc), socket (UNIX, IP4, IP6,
  62. raw, UDP, TCP), a file descriptor (stdin, etc), a program, or an
  63. arbitrary combination of two of these.
  64. %track
  65. prog socat = {
  66. version = %{version}
  67. url = http://www.dest-unreach.org/socat/download/
  68. regex = socat-(__VER__)\.tar\.bz2
  69. }
  70. %prep
  71. %setup -q -n socat-%{V_major}.%{V_minor}
  72. %build
  73. CC="%{l_cc} %{l_cflags -O} %{l_cppflags}" \
  74. CFLAGS="%{l_cflags -O} %{l_cppflags}" \
  75. CPPFLAGS="%{l_cppflags}" \
  76. LDFLAGS="%{l_ldflags}" \
  77. ./configure \
  78. --prefix=%{l_prefix} \
  79. --mandir=%{l_prefix}/man \
  80. --enable-msglevel=debug \
  81. %if "%{with_readline}" == "yes"
  82. --enable-readline \
  83. %else
  84. --disable-readline \
  85. %endif
  86. %if "%{with_ssl}" == "yes"
  87. --enable-openssl \
  88. %else
  89. --disable-openssl \
  90. %endif
  91. --disable-libwrap
  92. %{l_make} %{l_mflags -O}
  93. %install
  94. rm -rf $RPM_BUILD_ROOT
  95. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  96. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  98. %files -f files
  99. %clean
  100. rm -rf $RPM_BUILD_ROOT