sleuthkit.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. ##
  2. ## sleuthkit.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 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: sleuthkit
  27. Summary: Forensic Analysis Toolkit
  28. URL: http://www.sleuthkit.org/
  29. Vendor: Brian Carrier et al.
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: PLUS
  33. Group: System
  34. License: GPL
  35. Version: 1.69
  36. Release: 20040421
  37. # list of sources
  38. Source0: http://osdn.dl.sourceforge.net/sleuthkit/sleuthkit-%{version}.tar.gz
  39. Patch0: sleuthkit.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130, perl, perl-time
  44. PreReq: OpenPKG, openpkg >= 20040130, perl, perl-time, file
  45. AutoReq: no
  46. AutoReqProv: no
  47. %description
  48. The Sleuth Kit (previously known as TASK) is a collection of
  49. UNIX-based command line file system and media management forensic
  50. analysis tools. The file system tools allow you to examine NTFS,
  51. FAT, FFS, EXT2FS, and EXT3FS file systems of a suspect computer in
  52. a non-intrusive fashion. The tools have a layer-based design and
  53. can extract data from the internal file system structures. Because
  54. the tools do not rely on the operating system to process the file
  55. systems, deleted and hidden content is shown. The media management
  56. tools allow you to examine the layout of disks and other media. The
  57. Sleuth Kit supports DOS partitions, BSD partitions (disk labels),
  58. Mac partitions, and Sun slices (Volume Table of Contents). With
  59. these tools, you can identify where partitions are located and
  60. extract them so that they can be analyzed with file system analysis
  61. tools.
  62. %track
  63. prog sleuthkit = {
  64. version = %{version}
  65. url = http://prdownloads.sourceforge.net/sleuthkit/
  66. regex = sleuthkit-(__VER__)\.tar\.gz
  67. }
  68. %prep
  69. %setup -q
  70. %patch -p0
  71. %{l_shtool} subst \
  72. -e 's;/usr/local/bin/;%{l_prefix}/bin/;' \
  73. -e 's;read perlexe;exit 1;' \
  74. src/sorter/install src/timeline/config-perl
  75. %{l_shtool} subst \
  76. -e 's;ACLOCAL=aclocal;ACLOCAL=true;' \
  77. -e 's;AUTOCONF=autoconf;AUTOCONF=true;' \
  78. -e 's;AUTOMAKE=automake;AUTOMAKE=true;' \
  79. -e 's;AUTOHEADER=autoheader;AUTOHEADER=true;' \
  80. src/file/configure
  81. %build
  82. # build programs
  83. %{l_make} %{l_mflags} \
  84. CC="%{l_cc} %{l_cflags -O}"
  85. # remove local file(1), because we use OpenPKG "file" package
  86. rm -f bin/file
  87. rm -f man/man1/file.1
  88. # adjust Perl scripts
  89. %{l_shtool} subst \
  90. -e 's;#!/usr/bin/perl;%!{l_prefix}/bin/perl;' \
  91. -e 's;\(SK_DIR="\)[^"]*\("\);\1%{l_prefix}\2;' \
  92. -e 's;/share/sorter;%{l_prefix}/share/sleuthkit/sorter;' \
  93. bin/sorter
  94. %{l_shtool} subst \
  95. -e 's;#!/usr/bin/perl;%!{l_prefix}/bin/perl;' \
  96. -e '/^use lib.*/d' \
  97. bin/mactime
  98. %install
  99. rm -rf $RPM_BUILD_ROOT
  100. %{l_shtool} mkdir -f -p -m 755 \
  101. $RPM_BUILD_ROOT%{l_prefix}/bin \
  102. $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  103. $RPM_BUILD_ROOT%{l_prefix}/share/sleuthkit/sorter
  104. %{l_shtool} install -c -m 755 \
  105. bin/* $RPM_BUILD_ROOT%{l_prefix}/bin/
  106. %{l_shtool} install -c -m 644 \
  107. man/man1/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  108. %{l_shtool} install -c -m 644 \
  109. share/sorter/* $RPM_BUILD_ROOT%{l_prefix}/share/sleuthkit/sorter/
  110. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  111. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  112. %files -f files
  113. %clean
  114. rm -rf $RPM_BUILD_ROOT