ipaudit.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. ##
  2. ## ipaudit.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.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: ipaudit
  27. Summary: Network activity monitor
  28. URL: http://ipaudit.sourceforge.net/
  29. Vendor: Jonathan Rifkin
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BRK]
  32. Group: Net
  33. License: GPL
  34. Version: 0.95
  35. Release: 20020424
  36. # list of sources
  37. Source0: http://ipaudit.sourceforge.net/download/ipaudit-%{version}.tgz
  38. Patch0: ipaudit.patch
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20020206, libpcap
  43. PreReq: OpenPKG, openpkg >= 20020206
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. IPaudit listens to a network device in promiscuous mode, and records of
  48. every 'connection', each conversation between two ip addresses. A unique
  49. connection is determined by the ip addresses of the two machines, the
  50. protocol used between them and the port numbers (if they are communicating
  51. via UDP or TCP).
  52. It uses a hash table to keep track of the number of bytes and packets in
  53. both directions. When IPaudit receives a signal SIGTERM (kill) or SIGINT
  54. (kill -2, usually the same as a Control-C), it stops collecting data and
  55. writes the tabulated results.
  56. IPaudit is built using the pcap packet capture library to read the network
  57. port from LBNL Network Research Group.
  58. %prep
  59. %setup -q
  60. %patch -p0
  61. %build
  62. %{l_shtool} subst \
  63. -e 's;^\(MAKE=\).*$;\1%{l_make};' \
  64. -e 's;^\(CIDIR=\).*$;\1-I%{l_prefix}/include;' \
  65. Makefile
  66. %{l_shtool} subst \
  67. -e 's;^\(CIDIR=\).*$;\1-I%{l_prefix}/include;' \
  68. src/Makefile
  69. %{l_make} %{l_mflags -O}
  70. %install
  71. rm -rf $RPM_BUILD_ROOT
  72. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
  73. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man1
  74. ( cd src
  75. for i in ipaudit ipstrings total; do
  76. %{l_shtool} install -c -m 755 \
  77. $i $RPM_BUILD_ROOT%{l_prefix}/bin/
  78. done
  79. )
  80. ( cd man/man1
  81. for i in ipaudit ipstrings total; do
  82. %{l_shtool} install -c -m 644 \
  83. $i.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  84. done
  85. )
  86. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  88. %files -f files
  89. %clean
  90. rm -rf $RPM_BUILD_ROOT