samhain.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. ##
  2. ## samhain.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: 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 [EXP]
  32. Group: Converter
  33. License: GPL
  34. Version: 1.4.5
  35. Release: 20020312
  36. # list of sources
  37. Source0: http://la-samhna.de/samhain/samhain-current.tar.gz
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 20020206, tar, gzip
  42. PreReq: OpenPKG, openpkg >= 20020206
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Samhain is an open source file integrity and intrusion detection
  47. system for Unix that uses cryptographic checksums of files to
  48. detect modifications, and allows you to trace: what changes have
  49. occured in your system, when these changes have occured, and who
  50. was logged into the system at the respective time.
  51. %prep
  52. %setup -q -c samhain-%{version}
  53. %{l_prefix}/bin/gzip -d -c samhain-%{version}.tar.gz |\
  54. %{l_prefix}/bin/tar xf -
  55. %build
  56. ( cd samhain-%{version}
  57. CC="%{l_cc}" \
  58. CFLAGS="%{l_cflags -O}" \
  59. ./configure \
  60. --prefix=%{l_prefix} \
  61. --with-config-file=%{l_prefix}/etc/samhain/samhainrc \
  62. --with-dataroot-prefix=%{l_prefix}/var/samhain \
  63. --with-html-file=%{l_prefix}/var/samhain/samhain.html \
  64. --with-data-file=%{l_prefix}/var/samhain/samhain.data \
  65. --with-log-file=%{l_prefix}/var/samhain/run/samhain.log \
  66. --with-lock-file=%{l_prefix}/var/samhain/run/samhain.pid
  67. %{l_make} %{l_mflags}
  68. )
  69. %install
  70. rm -rf $RPM_BUILD_ROOT
  71. ( cd samhain-%{version}
  72. %{l_shtool} subst \
  73. -e "s; %{l_prefix}; $RPM_BUILD_ROOT%{l_prefix};g" \
  74. Makefile Makefile_D
  75. %{l_make} %{l_mflags} install install-man
  76. )
  77. %{l_shtool} mkdir -f -p -m 755 \
  78. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  79. %{l_shtool} install -c -m 755 \
  80. -e 's;@l_prefix@;%{l_prefix};g' \
  81. %{SOURCE rc.samhain} \
  82. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  83. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  84. %files -f files
  85. %clean
  86. rm -rf $RPM_BUILD_ROOT
  87. %post
  88. $RPM_INSTALL_PREFIX/sbin/samhain -t init