tcpwrappers.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. ##
  2. ## tcpwrappers.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 information
  26. Name: tcpwrappers
  27. Summary: TCP Wrappers Toolkit
  28. URL: http://www.web-insights.net/socket_wrappers/
  29. Vendor: Wietse Venema, Steve Grubb
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [EVAL]
  32. Group: Network
  33. License: BSD
  34. Version: 7.6k
  35. Release: 20031021
  36. # list of sources
  37. Source0: http://www.web-insights.net/socket_wrappers/socket_wrappers-%{version}.tar.gz
  38. Source1: hosts.allow
  39. Patch0: tcpwrappers.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20030103
  44. PreReq: OpenPKG, openpkg >= 20030103
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. The TCP Wrappers package allows you to monitor and filter incoming
  49. requests for various network services. It provides tiny daemon
  50. wrapper programs that can be installed without any changes to
  51. existing software or to existing configuration files. The wrappers
  52. report the name of the client host and of the requested service.
  53. The wrappers do not exchange information with the client or server
  54. applications, and impose no overhead on the actual conversation
  55. between the client and server applications.
  56. Additionally, the wrapper functionality is available as a C API
  57. for use in other networking applications, too.
  58. This package actually is based on Steve Grubb's revised version
  59. (Socket Wrappers) of Wietse Venema's original TCP Wrappers.
  60. %prep
  61. %setup -q -n socket_wrappers-%{version}
  62. %patch -p0
  63. chmod a+w Makefile.orig
  64. %{l_shtool} subst \
  65. -e 's;/etc/hosts\.deny;%{l_prefix}/etc/tcpwrappers/hosts.deny;g' \
  66. -e 's;/etc/hosts\.allow;%{l_prefix}/etc/tcpwrappers/hosts.allow;g' \
  67. Makefile
  68. %build
  69. case "%{l_platform -t}" in
  70. *-freebsd* ) platform="freebsd" ;;
  71. *-linux* ) platform="linux" ;;
  72. *-sunos* ) platform="sunos5" ;;
  73. * ) platform="other" ;;
  74. esac
  75. %{l_make} %{l_mflags} \
  76. $platform \
  77. CC="%{l_cc} %{l_cflags -O}"
  78. %install
  79. rm -rf $RPM_BUILD_ROOT
  80. %{l_shtool} mkdir -f -p -m 755 \
  81. $RPM_BUILD_ROOT%{l_prefix}/etc/tcpwrappers \
  82. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  83. $RPM_BUILD_ROOT%{l_prefix}/lib \
  84. $RPM_BUILD_ROOT%{l_prefix}/include \
  85. $RPM_BUILD_ROOT%{l_prefix}/man/man3 \
  86. $RPM_BUILD_ROOT%{l_prefix}/man/man5 \
  87. $RPM_BUILD_ROOT%{l_prefix}/man/man8
  88. %{l_shtool} install -c -s -m 755 \
  89. tcpd tcpdchk tcpdmatch try-from safe_finger \
  90. $RPM_BUILD_ROOT%{l_prefix}/sbin/
  91. %{l_shtool} install -c -m 644 \
  92. tcpd.h $RPM_BUILD_ROOT%{l_prefix}/include/
  93. %{l_shtool} install -c -m 644 \
  94. libwrap.a $RPM_BUILD_ROOT%{l_prefix}/lib/
  95. %{l_shtool} install -c -m 644 \
  96. *.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/
  97. %{l_shtool} install -c -m 644 \
  98. *.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
  99. %{l_shtool} install -c -m 644 \
  100. *.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  101. %{l_shtool} install -c -m 644 \
  102. %{SOURCE hosts.allow} \
  103. $RPM_BUILD_ROOT%{l_prefix}/etc/tcpwrappers/
  104. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  105. %{l_files_std} \
  106. '%config %{l_prefix}/etc/tcpwrappers/*'
  107. %files -f files
  108. %clean
  109. rm -rf $RPM_BUILD_ROOT