sleuthkit.spec 4.2 KB

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