aide.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. ##
  2. ## aide.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: aide
  26. Summary: Advanced Intrusion Detection Environment
  27. URL: http://aide.sourceforge.net/
  28. Vendor: R. Lehti & P. Virolainen
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: PLUS
  32. Group: Filesystem
  33. License: GPL
  34. Version: 0.11
  35. Release: 20060924
  36. # package options
  37. %option with_fsl yes
  38. # list of sources
  39. Source0: http://switch.dl.sourceforge.net/sourceforge/aide/aide-%{version}.tar.gz
  40. Source1: aide.conf
  41. Source2: rc.aide
  42. Source3: fsl.aide
  43. Patch0: aide.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20060823, make, bison, flex, gcc
  48. BuildPreReq: mhash, zlib
  49. PreReq: OpenPKG, openpkg >= 20060823
  50. PreReq: mhash, zlib
  51. %if "%{with_fsl}" == "yes"
  52. BuildPreReq: fsl >= 1.2.0
  53. PreReq: fsl >= 1.2.0
  54. %endif
  55. AutoReq: no
  56. AutoReqProv: no
  57. %description
  58. Aide is an intrusion detection system for checking the integrity of
  59. files.
  60. %track
  61. prog aide = {
  62. version = %{version}
  63. url = http://prdownloads.sourceforge.net/aide/
  64. regex = aide-(\d+\.\d+)\.tar\.gz
  65. }
  66. %prep
  67. %setup -q
  68. %patch -p0
  69. %build
  70. CC="%{l_cc}" \
  71. CFLAGS="%{l_cflags -O}" \
  72. CPPFLAGS="%{l_cppflags}" \
  73. LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  74. LIBS="%{l_fsl_libs}" \
  75. ./configure \
  76. --prefix=%{l_prefix} \
  77. --sysconfdir=%{l_prefix}/etc/aide \
  78. --with-dbhmactype=sha1 \
  79. --with-dbhmackey=T3BlblBLRyBNYWludGFpbmVy
  80. %{l_make} %{l_mflags}
  81. %install
  82. rm -rf $RPM_BUILD_ROOT
  83. %{l_shtool} mkdir -f -p -m 755 \
  84. $RPM_BUILD_ROOT%{l_prefix}/etc/aide \
  85. $RPM_BUILD_ROOT%{l_prefix}/var/aide
  86. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  87. # supply empty default configuration (just in order to tag it as config)
  88. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  89. %{SOURCE aide.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/aide/
  90. # install run-command script
  91. %{l_shtool} mkdir -f -p -m 755 \
  92. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  93. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  94. %{SOURCE rc.aide} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  95. # install OSSP fsl configuration
  96. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  97. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  98. %{SOURCE fsl.aide} \
  99. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  100. # strip installation
  101. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/locale >/dev/null 2>&1 || true
  102. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  103. # determine installation files
  104. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  105. '%config %{l_prefix}/etc/aide/*' \
  106. '%not %dir %{l_prefix}/etc/fsl' \
  107. '%config %{l_prefix}/etc/fsl/fsl.aide'
  108. %files -f files
  109. %clean
  110. rm -rf $RPM_BUILD_ROOT