From b8f4fa67cf3679016150adb54e3d5d07b4d36095 Mon Sep 17 00:00:00 2001
From: Juan RP <xtraeme@gmail.com>
Date: Fri, 8 Mar 2013 09:29:20 +0100
Subject: [PATCH] New package: foremost-1.5.7.

---
 .../foremost-1.4-config-location.patch        | 11 +++++++
 srcpkgs/foremost/template                     | 30 +++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 srcpkgs/foremost/patches/foremost-1.4-config-location.patch
 create mode 100644 srcpkgs/foremost/template

diff --git a/srcpkgs/foremost/patches/foremost-1.4-config-location.patch b/srcpkgs/foremost/patches/foremost-1.4-config-location.patch
new file mode 100644
index 0000000000..6e67a21cdb
--- /dev/null
+++ b/srcpkgs/foremost/patches/foremost-1.4-config-location.patch
@@ -0,0 +1,11 @@
+--- config.c	2006-08-31 17:50:47.000000000 +0100
++++ config.c	2006-08-31 17:51:09.000000000 +0100
+@@ -288,7 +288,7 @@
+ #ifdef __WIN32
+ 		set_config_file(s, "/Program Files/foremost/foremost.conf");
+ #else
+-		set_config_file(s, "/usr/local/etc/foremost.conf");
++		set_config_file(s, "/etc/foremost.conf");
+ #endif
+ 		if ((f = fopen(get_config_file(s), "r")) == NULL)
+ 			{
diff --git a/srcpkgs/foremost/template b/srcpkgs/foremost/template
new file mode 100644
index 0000000000..da5f9f9ebd
--- /dev/null
+++ b/srcpkgs/foremost/template
@@ -0,0 +1,30 @@
+# Template file for 'foremost'
+pkgname=foremost
+version=1.5.7
+revision=1
+short_desc="Forensic program to recover lost files"
+maintainer="Juan RP <xtraeme@gmail.com>"
+license="Public domain, GPL-2"
+homepage="http://foremost.sourceforge.net/"
+distfiles="http://foremost.sourceforge.net/pkg/foremost-${version}.tar.gz"
+checksum=502054ef212e3d90b292e99c7f7ac91f89f024720cd5a7e7680c3d1901ef5f34
+long_desc="
+ Foremost is a console program to recover files based on their headers, footers,
+ and internal data structures. This process is commonly referred to as data
+ carving. Foremost can work on image files, such as those generated by dd,
+ Safeback, Encase, etc, or directly on a drive. The headers and footers can be
+ specified by a configuration file or you can use command line switches to
+ specify built-in file types. These built-in types look at the data structures
+ of a given file format allowing for a more reliable and faster recovery."
+
+conf_files="/etc/${pkgname}.conf"
+
+do_build() {
+	make RAW_CC="$CC" ${makejobs}
+}
+
+do_install() {
+	vinstall foremost 755 usr/bin
+	vinstall foremost.8.gz 644 usr/share/man/man8
+	vinstall foremost.conf 644 etc
+}