snort.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ##
  2. ## snort.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: snort
  27. Summary: Network Intrusion Detection System
  28. URL: http://www.snort.org/
  29. Vendor: B. Caswell, M. Roesch
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [PLUS]
  32. Group: Network
  33. License: GPL
  34. Version: 2.0.4
  35. Release: 20031106
  36. # list of sources
  37. Source0: http://www.snort.org/dl/snort-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20030103, make
  42. PreReq: OpenPKG, openpkg >= 20030103
  43. BuildPreReq: libpcap, libnet
  44. PreReq: libpcap, libnet
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. Snort is an open source network intrusion detection system,
  49. capable of performing real-time traffic analysis and packet
  50. logging on IP networks. It can perform protocol analysis, content
  51. searching/matching and can be used to detect a variety of attacks
  52. and probes. Snort uses a flexible rules language to describe traffic
  53. that it should collect or pass, as well as a detection engine that
  54. utilizes a modular plugin architecture. Snort has a real-time
  55. alerting capability as well. Snort has three primary uses. It can be
  56. used as a straight packet sniffer like tcpdump(1), a packet logger
  57. (useful for network traffic debugging, etc), or as a full blown
  58. network intrusion detection system.
  59. %prep
  60. %setup -q
  61. %build
  62. CC="%{l_cc}" \
  63. CFLAGS="%{l_cflags -O}" \
  64. CPPFLAGS="%{l_cppflags}" \
  65. LDFLAGS="%{l_ldflags}" \
  66. ./configure \
  67. --prefix=%{l_prefix} \
  68. --sysconfdir=%{l_prefix}/etc/snort \
  69. --with-libpcap-includes=%{l_prefix}/include \
  70. --with-libpcap-libraries=%{l_prefix}/lib \
  71. --with-libnet-includes=%{l_prefix}/include \
  72. --with-libnet-libraries=%{l_prefix}/lib
  73. %{l_make} %{l_mflags -O}
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_shtool} mkdir -f -p -m 755 \
  77. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  78. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  79. $RPM_BUILD_ROOT%{l_prefix}/etc/snort \
  80. $RPM_BUILD_ROOT%{l_prefix}/share/snort/rules
  81. %{l_shtool} install -c -s -m 755 \
  82. src/snort $RPM_BUILD_ROOT%{l_prefix}/sbin/
  83. %{l_shtool} install -c -m 644 \
  84. snort.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/
  85. %{l_shtool} install -c -m 644 \
  86. rules/*.rules $RPM_BUILD_ROOT%{l_prefix}/share/snort/rules/
  87. %{l_shtool} install -c -m 644 \
  88. -e 's;\(var RULE_PATH\).*;\1 %{l_prefix}/share/snort/rules;g' \
  89. etc/snort.conf $RPM_BUILD_ROOT%{l_prefix}/etc/snort/
  90. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  91. %files -f files
  92. %clean
  93. rm -rf $RPM_BUILD_ROOT