Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/foremost: new aport

From: Jesse Young <jlyo_at_jlyo.org>
Date: Tue, 15 Sep 2015 08:13:30 -0500

---
 testing/foremost/APKBUILD                | 49 ++++++++++++++++++++++++++++++++
 testing/foremost/foremost-makefile.patch | 23 +++++++++++++++
 2 files changed, 72 insertions(+)
 create mode 100644 testing/foremost/APKBUILD
 create mode 100644 testing/foremost/foremost-makefile.patch
diff --git a/testing/foremost/APKBUILD b/testing/foremost/APKBUILD
new file mode 100644
index 0000000..115b86b
--- /dev/null
+++ b/testing/foremost/APKBUILD
_at_@ -0,0 +1,49 @@
+# Contributor: Jesse Young <jlyo_at_jlyo.org>
+# Maintainer: Jesse Young <jlyo_at_jlyo.org>
+
+pkgname=foremost
+pkgver=1.5.7
+pkgrel=0
+pkgdesc="A console program to recover files based on their headers, footers, and internal data structures"
+url="http://foremost.sourceforge.net/"
+arch="all"
+license="custom"
+depends_dev=""
+depends=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://foremost.sourceforge.net/pkg/${pkgname}-${pkgver}.tar.gz \
+        ${pkgname}-makefile.patch"
+
+_builddir="${srcdir}/${pkgname}-${pkgver}"
+prepare() {
+    local i
+    cd "$_builddir"
+    for i in $source; do
+        case $i in
+        *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+        esac
+    done
+}
+
+build() {
+    cd "$_builddir"
+    make
+}
+
+package () {
+    cd "$_builddir"
+    for f in etc usr/bin usr/share/man/man8 usr/share/licenses/foremost; do
+        install -dm755 "${pkgdir}/${f}"
+    done
+    make DESTDIR="$pkgdir" install
+    ./foremost -V > "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT"
+}
+
+md5sums="860119c49665c2a3fb2b0b1d3dbad02a  foremost-1.5.7.tar.gz
+776278a7eb5cb16a27f895dd9c5674ee  foremost-makefile.patch"
+sha256sums="502054ef212e3d90b292e99c7f7ac91f89f024720cd5a7e7680c3d1901ef5f34  foremost-1.5.7.tar.gz
+5da6c886bba9de120c852ae192b4f1372ddc09e790e47f2eb07ae4493e09f210  foremost-makefile.patch"
+sha512sums="8827c29d52496783be26374f3943eb26a154d842f34e50fb489f87b3a5045bf85f1e44d7d8d8b12b2355ba3fe4b06a0db979cc22c0f431593c5976001eb931ab  foremost-1.5.7.tar.gz
+2a0d3007fbd29c93bab33af8ea2a5c50eb6c3e71ab359611858cb4970925e84461d04d6e7c299e5647c31aa60329705337a4bf3f4d22542072bcb28ef885461c  foremost-makefile.patch"
diff --git a/testing/foremost/foremost-makefile.patch b/testing/foremost/foremost-makefile.patch
new file mode 100644
index 0000000..445471e
--- /dev/null
+++ b/testing/foremost/foremost-makefile.patch
_at_@ -0,0 +1,23 @@
+--- a/Makefile	2008-10-14 02:09:13.000000000 +0200
++++ b/Makefile	2008-10-14 18:31:38.000000000 +0200
+_at_@ -26,5 +26,5 @@
+ # Where we get installed
+-BIN = /usr/local/bin
+-MAN = /usr/share/man/man8
+-CONF= /usr/local/etc
++BIN = $(DESTDIR)/usr/bin
++MAN = $(DESTDIR)/usr/share/man/man8
++CONF= $(DESTDIR)/etc
+ # Setup for compiling and cross-compiling for Windows
+diff -uNr foremost-1.4.orig/config.c foremost-1.4/config.c
+--- a/config.c	2006-08-31 17:50:47.000000000 +0100
++++ b/config.c	2006-08-31 17:51:09.000000000 +0100
+_at_@ -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)
+ 			{
-- 
2.4.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Sep 15 2015 - 08:13:30 GMT