samhain.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. ##
  2. ## samhain.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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: samhain
  27. Summary: File Integrity and Intrusion Detection System
  28. URL: http://la-samhna.de/samhain/
  29. Vendor: Samhain Labs
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [PLUS]
  32. Group: System
  33. License: GPL
  34. Version: 1.7.5
  35. Release: 20030417
  36. # list of sources
  37. Source0: http://la-samhna.de/samhain/samhain-current.tar.gz
  38. Source1: rc.samhain
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20020826, gcc
  43. PreReq: OpenPKG, openpkg >= 20020826
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. Samhain is an open source file integrity and intrusion detection
  48. system for Unix that uses cryptographic checksums of files to
  49. detect modifications, and allows you to trace: what changes have
  50. occured in your system, when these changes have occured, and who
  51. was logged into the system at the respective time.
  52. %prep
  53. %setup -q -c samhain-%{version}
  54. %{l_gzip} -d -c samhain-%{version}.tar.gz |\
  55. %{l_tar} xf -
  56. %build
  57. ( cd samhain-%{version}
  58. CC="%{l_cc}" \
  59. CFLAGS="%{l_cflags -O}" \
  60. ./configure \
  61. --prefix=%{l_prefix} \
  62. --mandir=%{l_prefix}/man \
  63. --with-config-file=%{l_prefix}/etc/samhain/samhainrc \
  64. --with-state-dir=%{l_prefix}/var/samhain \
  65. --with-html-file=%{l_prefix}/var/samhain/samhain.html \
  66. --with-data-file=%{l_prefix}/var/samhain/samhain.data \
  67. --with-pid-file=%{l_prefix}/var/samhain/samhain.pid \
  68. --with-log-file=%{l_prefix}/var/samhain/samhain.log \
  69. --enable-login-watch \
  70. --enable-static \
  71. --disable-khide \
  72. --enable-suidcheck \
  73. --with-trusted=0,%{l_muid}
  74. %{l_make} %{l_mflags}
  75. )
  76. %install
  77. rm -rf $RPM_BUILD_ROOT
  78. ( cd samhain-%{version}
  79. %{l_make} %{l_mflags} \
  80. install-program install-man install-data \
  81. DESTDIR=$RPM_BUILD_ROOT
  82. )
  83. chmod -R a+r $RPM_BUILD_ROOT%{l_prefix}/man
  84. case "%{l_target}" in
  85. *-freebsd* ) rc="samhainrc.freebsd" ;;
  86. *-linux* ) rc="samhainrc.linux" ;;
  87. *-solaris* ) rc="samhainrc.solaris" ;;
  88. * ) echo "ERROR: platform \"%{l_target}\" not supported" 1>&2; exit 1 ;;
  89. esac
  90. %{l_shtool} install -c -m 644 \
  91. samhain-%{version}/$rc \
  92. $RPM_BUILD_ROOT%{l_prefix}/etc/samhain/samhainrc
  93. %{l_shtool} mkdir -f -p -m 755 \
  94. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  95. %{l_shtool} install -c -m 755 \
  96. -e 's;@l_prefix@;%{l_prefix};g' \
  97. %{SOURCE rc.samhain} \
  98. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  99. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  100. %{l_files_std} \
  101. '%config %{l_prefix}/etc/samhain/samhainrc'
  102. %files -f files
  103. %clean
  104. rm -rf $RPM_BUILD_ROOT
  105. %post
  106. if [ $1 -eq 1 ]; then
  107. $RPM_INSTALL_PREFIX/sbin/samhain -t init
  108. fi