tcpwrappers.spec 4.7 KB

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