summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatol Pomozov2015-06-17 08:46:42 -0700
committerAnatol Pomozov2015-06-17 08:46:42 -0700
commit53e5e4b7f9c363d711fe5eb7df4b076b1433a5df (patch)
treeb752eb3ca0c61962ce3cf40352eda9f06499780b
downloadaur-53e5e4b7f9c363d711fe5eb7df4b076b1433a5df.tar.gz
Initial import
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD31
-rw-r--r--linux_fixes.patch30
3 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..063f31d44ac7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = intel-me-tools-git
+ pkgdesc = Tools for working with Intel ME
+ pkgver = r8.fc0b1c3
+ pkgrel = 1
+ url = https://github.com/skochinsky/me-tools
+ arch = any
+ license = unknown
+ depends = python2
+ source = linux_fixes.patch
+ source = git+https://github.com/skochinsky/me-tools
+ md5sums = 5b282b95bef7692fded0558a98342f0e
+ md5sums = SKIP
+
+pkgname = intel-me-tools-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c7fe54fcb47a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintrainer: Anatol Pomozov
+
+pkgname=intel-me-tools-git
+pkgver=r8.fc0b1c3
+pkgrel=1
+pkgdesc='Tools for working with Intel ME'
+arch=(any)
+url='https://github.com/skochinsky/me-tools'
+license=(unknown)
+depends=(python2)
+source=(linux_fixes.patch
+ git+https://github.com/skochinsky/me-tools)
+md5sums=('5b282b95bef7692fded0558a98342f0e'
+ 'SKIP')
+
+pkgver() {
+ cd me-tools
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd me-tools
+ patch -p1 < ../linux_fixes.patch
+}
+
+package() {
+ cd me-tools
+ # me_util.py requires Windows, not useful for us
+ install -m755 -d "$pkgdir/usr/bin"
+ install -m755 -t "$pkgdir/usr/bin" me_unpack.py
+}
diff --git a/linux_fixes.patch b/linux_fixes.patch
new file mode 100644
index 000000000000..427000b85c41
--- /dev/null
+++ b/linux_fixes.patch
@@ -0,0 +1,30 @@
+diff --git a/me_unpack.py b/me_unpack.py
+index c7d4f7e..86b3f8f 100644
+--- a/me_unpack.py
++++ b/me_unpack.py
+@@ -1,3 +1,4 @@
++#!/usr/bin/python2
+ # Intel ME ROM image dumper/extractor
+ # Copyright (c) 2012-2014 Igor Skochinsky
+ # Version 0.1 2012-10-10
+@@ -287,10 +288,7 @@ def extract_code_mods(nm, f, soff):
+
+
+ def decomp_lzma(compdata):
+- import subprocess, _subprocess
+- # hide the console window
+- si = subprocess.STARTUPINFO()
+- si.dwFlags |= _subprocess.STARTF_USESHOWWINDOW
++ import subprocess
+ if in_ida:
+ basedir = idaapi.idadir("loaders")
+ else:
+@@ -298,7 +296,7 @@ def decomp_lzma(compdata):
+ path = os.path.join(basedir, "lzma")
+ #print "using decompressor at '%s'" % path
+ try:
+- process = subprocess.Popen([path, "d", "-si", "-so"], startupinfo=si, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
++ process = subprocess.Popen([path, "d", "-si", "-so"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ output, errout = process.communicate(compdata)
+ retcode = process.poll()
+ except IOError as e: