socat.spec 3.2 KB

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