import Python bindings for The Sleuth Kit (libtsk).
ok benoit@ shadchin@
This commit is contained in:
parent
327d8ffa9a
commit
51a2d7d1bf
36
sysutils/py-tsk/Makefile
Normal file
36
sysutils/py-tsk/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2017/01/22 08:18:04 rpointel Exp $
|
||||
|
||||
COMMENT = Python bindings for The Sleuth Kit (libtsk)
|
||||
|
||||
MODPY_EGG_VERSION = 20160721
|
||||
DISTNAME = pytsk3-${MODPY_EGG_VERSION}
|
||||
PKGNAME = py-tsk-${MODPY_EGG_VERSION}
|
||||
|
||||
CATEGORIES = sysutils
|
||||
|
||||
HOMEPAGE = https://github.com/py4n6/pytsk/
|
||||
|
||||
MAINTAINER = Remi Pointel <rpointel@openbsd.org>
|
||||
|
||||
# Apache v2
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
MODULES = lang/python
|
||||
MODPY_PI = Yes
|
||||
MODPY_SETUPTOOLS = Yes
|
||||
|
||||
WANTLIB += pthread talloc tsk ${MODPY_WANTLIB}
|
||||
|
||||
pre-configure:
|
||||
${SUBST_DATA} ${WRKSRC}/setup.py ${WRKSRC}/setup.py.new
|
||||
mv ${WRKSRC}/setup.py.new ${WRKSRC}/setup.py
|
||||
|
||||
LIB_DEPENDS = sysutils/sleuthkit \
|
||||
devel/libtalloc
|
||||
TEST_DEPENDS = sysutils/py-tsk=${MODPY_EGG_VERSION}
|
||||
|
||||
# it needs test_data/* in the Github repository
|
||||
do-test:
|
||||
cd ${WRKSRC} && ${MODPY_BIN} run_tests.py
|
||||
|
||||
.include <bsd.port.mk>
|
2
sysutils/py-tsk/distinfo
Normal file
2
sysutils/py-tsk/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (pytsk3-20160721.tar.gz) = 3m9J5oek63R9BStD7FXm6upbwzOUaA7iMq8DKSCf/IU=
|
||||
SIZE (pytsk3-20160721.tar.gz) = 2958826
|
43
sysutils/py-tsk/patches/patch-setup_py
Normal file
43
sysutils/py-tsk/patches/patch-setup_py
Normal file
@ -0,0 +1,43 @@
|
||||
$OpenBSD: patch-setup_py,v 1.1.1.1 2017/01/22 08:18:04 rpointel Exp $
|
||||
--- setup.py.orig Thu Jul 21 21:02:40 2016
|
||||
+++ setup.py Thu Oct 13 22:33:14 2016
|
||||
@@ -171,7 +171,7 @@ class BuildExtCommand(build_ext):
|
||||
compiler = new_compiler(compiler=self.compiler)
|
||||
self.define = self.configure_source_tree(compiler)
|
||||
|
||||
- libtsk_path = "sleuthkit/tsk"
|
||||
+ libtsk_path = "${LOCALBASE}/include/tsk"
|
||||
|
||||
if not os.access("pytsk3.c", os.R_OK):
|
||||
# Generate the Python binding code (pytsk3.c).
|
||||
@@ -286,7 +286,7 @@ class UpdateCommand(Command):
|
||||
with open("version.txt", "w") as fd:
|
||||
fd.write(self.version)
|
||||
|
||||
- libtsk_path = "sleuthkit/tsk"
|
||||
+ libtsk_path = "${LOCALBASE}/include/tsk"
|
||||
|
||||
# Generate the Python binding code (pytsk3.c).
|
||||
libtsk_header_files = [
|
||||
@@ -325,7 +325,7 @@ class ProjectBuilder(object):
|
||||
self._argv = argv
|
||||
|
||||
# The path to the "tsk" directory.
|
||||
- self._libtsk_path = "sleuthkit/tsk"
|
||||
+ self._libtsk_path = "${LOCALBASE}/include/tsk"
|
||||
|
||||
# paths under the tsk/ directory which contain files we need to compile.
|
||||
self._sub_library_names = "auto base docs fs hashdb img vs".split()
|
||||
@@ -333,9 +333,9 @@ class ProjectBuilder(object):
|
||||
# The args for the extension builder.
|
||||
self.extension_args = dict(
|
||||
define_macros=[],
|
||||
- include_dirs=["talloc", "sleuthkit/tsk", "sleuthkit", "."],
|
||||
- library_dirs=[],
|
||||
- libraries=[],
|
||||
+ include_dirs=[".", "${LOCALBASE}/include"],
|
||||
+ library_dirs=["${LOCALBASE}/lib"],
|
||||
+ libraries=["tsk", "talloc"],
|
||||
)
|
||||
|
||||
# The sources to build.
|
1
sysutils/py-tsk/pkg/DESCR
Normal file
1
sysutils/py-tsk/pkg/DESCR
Normal file
@ -0,0 +1 @@
|
||||
Python bindings for The Sleuth Kit (libtsk).
|
8
sysutils/py-tsk/pkg/PLIST
Normal file
8
sysutils/py-tsk/pkg/PLIST
Normal file
@ -0,0 +1,8 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2017/01/22 08:18:04 rpointel Exp $
|
||||
lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
|
||||
lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO
|
||||
lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt
|
||||
lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt
|
||||
lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/not-zip-safe
|
||||
lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt
|
||||
lib/python${MODPY_VERSION}/site-packages/pytsk3.so
|
Loading…
Reference in New Issue
Block a user