libnids.spec 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. ##
  2. ## libnids.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: libnids
  26. Summary: Network Intrusion Detection System Library
  27. URL: http://libnids.sourceforge.net/
  28. Vendor: Rafal Wojtczuk
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: PLUS
  32. Group: Network
  33. License: GPL
  34. Version: 1.21
  35. Release: 20060514
  36. # list of sources
  37. Source0: http://osdn.dl.sourceforge.net/sourceforge/libnids/libnids-%{version}.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20040130, libnet, libpcap, make, gcc, config
  42. PreReq: OpenPKG, openpkg >= 20040130, libnet, libpcap
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Libnids is an implementation of an E-component of Network Intrusion
  47. Detection System. It emulates the IP stack of Linux 2.0.x. Libnids
  48. offers IP defragmentation, TCP stream assembly and TCP port scan
  49. detection.
  50. %track
  51. prog libnids = {
  52. version = %{version}
  53. url = http://prdownloads.sourceforge.net/libnids/
  54. regex = libnids-(__VER__)\.tar\.gz
  55. }
  56. %prep
  57. %setup -q
  58. %{l_prefix}/bin/config install .
  59. %build
  60. define="LIBNET_LIL_ENDIAN"
  61. case "%{l_platform -p}" in
  62. sparc*-* ) define="LIBNET_BIG_ENDIAN" ;;
  63. *68*-* ) define="LIBNET_BIG_ENDIAN" ;;
  64. esac
  65. CC="%{l_cc}" \
  66. CFLAGS="%{l_cflags -O} -D$define" \
  67. ./configure \
  68. --prefix=%{l_prefix}
  69. # do not use --with-libpcap=%{l_prefix} and
  70. # --with-libnet=%{l_prefix} because else it surprisingly searches
  71. # the wrong locations. If nothing is specified it searches the
  72. # correct locations under --prefix and so %{l_prefix}.
  73. %{l_make} %{l_mflags}
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_make} %{l_mflags} install install_prefix=$RPM_BUILD_ROOT
  77. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  78. %files -f files
  79. %clean
  80. rm -rf $RPM_BUILD_ROOT