sleuthkit.spec 4.4 KB

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