From e0e4c0d66931c98adec302ef8b301dfc615d9025 Mon Sep 17 00:00:00 2001 From: khorben Date: Sat, 2 Aug 2014 14:11:08 +0000 Subject: Imported security/pev version 0.60 from wip pev is a PE file analysis toolkit that includes some nice programs to work with PE files in many systems. It can be useful for programmers, security analysts and forensic investigators. It's licensed under GPLv3+ terms. --- security/pev/DESCR | 3 +++ security/pev/Makefile | 25 +++++++++++++++++++++++++ security/pev/PLIST | 23 +++++++++++++++++++++++ security/pev/distinfo | 7 +++++++ security/pev/patches/patch-lib_libpe_Makefile | 27 +++++++++++++++++++++++++++ security/pev/patches/patch-src_Makefile | 18 ++++++++++++++++++ 6 files changed, 103 insertions(+) create mode 100644 security/pev/DESCR create mode 100644 security/pev/Makefile create mode 100644 security/pev/PLIST create mode 100644 security/pev/distinfo create mode 100644 security/pev/patches/patch-lib_libpe_Makefile create mode 100644 security/pev/patches/patch-src_Makefile diff --git a/security/pev/DESCR b/security/pev/DESCR new file mode 100644 index 00000000000..9d2d2ee078c --- /dev/null +++ b/security/pev/DESCR @@ -0,0 +1,3 @@ +pev is a PE file analysis toolkit that includes some nice programs to work with +PE files in many systems. It can be useful for programmers, security analysts +and forensic investigators. It's licensed under GPLv3+ terms. diff --git a/security/pev/Makefile b/security/pev/Makefile new file mode 100644 index 00000000000..b3a3dedb3e3 --- /dev/null +++ b/security/pev/Makefile @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1 2014/08/02 14:11:08 khorben Exp $ +# + +DISTNAME= pev-0.60 +CATEGORIES= security +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pev/} + +MAINTAINER= khorben@defora.org +HOMEPAGE= http://pev.sourceforge.net/ +COMMENT= The PE analysis toolkit + +LICENSE= gnu-gpl-v3 + +USE_TOOLS+= gmake + +MAKE_FLAGS+= DESTDIR=${DESTDIR} +MAKE_FLAGS+= PREFIX=${PREFIX} +AUTO_MKDIRS= yes + +#pre-install: +# ${MKDIR} ${DESTDIR}${PREFIX}/man/man1 + +.include "../../security/openssl/buildlink3.mk" +.include "../../devel/pcre/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/security/pev/PLIST b/security/pev/PLIST new file mode 100644 index 00000000000..5491a0771f6 --- /dev/null +++ b/security/pev/PLIST @@ -0,0 +1,23 @@ +@comment $NetBSD: PLIST,v 1.1 2014/08/02 14:11:08 khorben Exp $ +bin/ofs2rva +bin/pedis +bin/pehash +bin/pepack +bin/pescan +bin/pesec +bin/pestr +bin/readpe +bin/rva2ofs +lib/libpe.so +lib/libpe.so.1 +lib/libpe.so.1.0 +man/man1/ofs2rva.1 +man/man1/pedis.1 +man/man1/pehash.1 +man/man1/pepack.1 +man/man1/pescan.1 +man/man1/pesec.1 +man/man1/pestr.1 +man/man1/readpe.1 +man/man1/rva2ofs.1 +share/pev/userdb.txt diff --git a/security/pev/distinfo b/security/pev/distinfo new file mode 100644 index 00000000000..298fc3913c9 --- /dev/null +++ b/security/pev/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2014/08/02 14:11:08 khorben Exp $ + +SHA1 (pev-0.60.tar.gz) = fb61e4cb2fd62d0957f0637dabcd17202b41b181 +RMD160 (pev-0.60.tar.gz) = 27d88a10dfedd68c46163d17ba483b45f57389d4 +Size (pev-0.60.tar.gz) = 216584 bytes +SHA1 (patch-lib_libpe_Makefile) = 5adf4a60f3320da9deddf74a740dd152b1810f0a +SHA1 (patch-src_Makefile) = f8b1a5e33820626b4afad487b50ec184239db3bf diff --git a/security/pev/patches/patch-lib_libpe_Makefile b/security/pev/patches/patch-lib_libpe_Makefile new file mode 100644 index 00000000000..f3e52b68d4f --- /dev/null +++ b/security/pev/patches/patch-lib_libpe_Makefile @@ -0,0 +1,27 @@ +$NetBSD: patch-lib_libpe_Makefile,v 1.1 2014/08/02 14:11:08 khorben Exp $ + +Fixed generation and installation of the libpe shared library on NetBSD + +--- lib/libpe/Makefile.orig 2012-10-31 03:59:14.000000000 +0000 ++++ lib/libpe/Makefile +@@ -30,6 +30,8 @@ all: pe.c pe.h + $(CC) -o $(LIBNAME).o $(CFLAGS) $(SRC) + ifeq ($(PLATFORM_OS), Linux) + $(CC) -shared -Wl,-soname,$(LIBNAME).so.1 -o $(LIBNAME).so $(LIBNAME).o ++else ifeq ($(PLATFORM_OS), NetBSD) ++ $(CC) -shared -Wl,-soname,$(LIBNAME).so.1 -o $(LIBNAME).so $(LIBNAME).o + else ifeq ($(PLATFORM_OS), Darwin) + $(CC) -headerpad_max_install_names -dynamiclib \ + -flat_namespace -install_name $(LIBNAME).$(VERSION).dylib \ +@@ -46,6 +48,11 @@ ifeq ($(PLATFORM_OS), Linux) + $(INSTALL) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION) + cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so + cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1 ++else ifeq ($(PLATFORM_OS), NetBSD) ++ $(STRIP) $(LIBNAME).so ++ $(INSTALL) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION) ++ cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so ++ cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1 + else ifeq ($(PLATFORM_OS), Darwin) + $(STRIP) $(LIBNAME).dylib + $(INSTALL) $(LIBNAME).dylib $(DEST)/$(LIBNAME).$(VERSION).dylib diff --git a/security/pev/patches/patch-src_Makefile b/security/pev/patches/patch-src_Makefile new file mode 100644 index 00000000000..54eb3103ee5 --- /dev/null +++ b/security/pev/patches/patch-src_Makefile @@ -0,0 +1,18 @@ +$NetBSD: patch-src_Makefile,v 1.1 2014/08/02 14:11:08 khorben Exp $ + +Fixed DESTDIR support + +--- src/Makefile.orig 2012-10-31 03:59:14.000000000 +0000 ++++ src/Makefile +@@ -20,9 +20,9 @@ RM = rm -f + SOURCES = output.c + PROGS = readpe pedis pepack pescan rva2ofs pesec ofs2rva pestr pehash pestr + INSTALL = install -m 0755 +-SHAREDIR = /usr/share/pev ++SHAREDIR = $(DESTDIR)$(PREFIX)/share/pev + MAN = ../doc/manpages +-MANDIR = /usr/share/man/man1 ++MANDIR = $(DESTDIR)$(PREFIX)/man/man1 + + ####### Build rules + -- cgit v1.2.3