socat.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. ##
  2. ## socat.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 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.4
  27. %define V_minor 0.3
  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
  35. Class: BASE
  36. Group: Network
  37. License: GPL
  38. Version: %{V_major}.%{V_minor}
  39. Release: 20041022
  40. # list of sources
  41. Source0: http://www.dest-unreach.org/socat/download/socat-%{version}.tar.bz2
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. BuildPreReq: readline, openssl
  48. PreReq: readline, openssl
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. socat is a relay for bidirectional data transfer between two
  53. independent data channels. Each of these data channels may be a
  54. file, pipe, device (terminal or modem etc.), socket (UNIX, IP4, IP6
  55. - raw, UDP, TCP), a file descriptor (stdin etc.), a program, or an
  56. arbitrary combination of two of these.
  57. %track
  58. prog socat = {
  59. version = %{version}
  60. url = http://www.dest-unreach.org/socat/download/
  61. regex = socat-(__VER__)\.tar\.bz2
  62. }
  63. %prep
  64. %setup -q -n socat-%{V_major}
  65. %build
  66. CC="%{l_cc} %{l_cflags -O} %{l_cppflags}" \
  67. CFLAGS="%{l_cflags -O} %{l_cppflags}" \
  68. CPPFLAGS="%{l_cppflags}" \
  69. LDFLAGS="%{l_ldflags}" \
  70. ./configure \
  71. --prefix=%{l_prefix} \
  72. --enable-msglevel=debug \
  73. --enable-readline \
  74. --enable-openssl
  75. %{l_make} %{l_mflags -O}
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. %{l_shtool} mkdir -f -p -m 755 \
  79. $RPM_BUILD_ROOT%{l_prefix}/bin \
  80. $RPM_BUILD_ROOT%{l_prefix}/man/man1
  81. %{l_shtool} subst -e 's;-o 0 -g 0;;' Makefile
  82. %{l_make} %{l_mflags} install \
  83. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  84. exec_prefix=$RPM_BUILD_ROOT%{l_prefix}
  85. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  86. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  87. %files -f files
  88. %clean
  89. rm -rf $RPM_BUILD_ROOT