Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghidriff: add package #4278

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lists/to-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python-jpype1
python-pyhidra
python-mdutils
ghidriff
39 changes: 39 additions & 0 deletions packages/ghidriff/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ghidriff
pkgver=v0.7.3.r0.g853ff79
pkgrel=1
pkgdesc='Python Command-Line Ghidra Binary Diffing Engine.'
arch=('any')
groups=('blackarch' 'blackarch-automation' 'blackarch-reversing')
url='https://github.com/clearbluejar/ghidriff'
license=('GPL3')
depends=('python' 'python-pyhidra' 'python-mdutils' 'ghidra')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/clearbluejar/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

build() {
cd $pkgname

python setup.py build
}

package() {
cd $pkgname

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

29 changes: 29 additions & 0 deletions packages/python-jpype1/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-jpype1
_pkgname=${pkgname#python-}
pkgver=1.5.0
pkgrel=1
pkgdesc='Python to Java bridge, an effort to allow Python programs full access to Java class libraries.'
arch=('x86_64')
url='https://github.com/jpype-project/jpype'
license=('Apache-2.0')
depends=('python' 'python-typing_extensions' 'python-packaging' 'java-runtime')
makedepends=('python-setuptools' 'ant')
conflicts=('jpype' 'python-jpype')
source=("https://github.com/jpype-project/jpype/archive/JPype1-$pkgver.tar.gz")
sha512sums=('7c3c8434dd07743d0a0b4176c13f8d82b2f042c25925912e905c92e06de30721f2b1788683f9d547bcb7b66f767f565298ead4c940d8109bc92e8c5824c8e1f5')

build() {
cd "jpype-$pkgver"

python setup.py build
}

package() {
cd "jpype-$pkgver"

python setup.py install --root="$pkgdir" --optimize=1
}

39 changes: 39 additions & 0 deletions packages/python-mdutils/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-mdutils
_pkgname=${pkgname#python-}
pkgver=v1.6.0.r4.geaa500d
pkgrel=1
pkgdesc='Set of basic tools that can help to create a markdown file.'
arch=('any')
url='https://github.com/didix21/mdutils'
license=('MIT')
depends=('python')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/didix21/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $_pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

build() {
cd $_pkgname

python setup.py build
}

package() {
cd $_pkgname

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

30 changes: 30 additions & 0 deletions packages/python-pyhidra/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pyhidra
_pkgname=${pkgname#python-}
pkgver=1.3.0
pkgrel=1
pkgdesc='Python library that provides direct access to the Ghidra API within a native CPython interpreter using jpype.'
arch=('any')
url='https://github.com/dod-cyber-crime-center/pyhidra'
license=('custom:LicenseRef-DC3-Pyhidra-Open-Source-License')
depends=('python' 'python-jpype1' 'java-environment>=17')
makedepends=('python-setuptools' 'python-build' 'python-installer'
'python-wheel')
source=($_pkgname-$pkgver.zip::"https://github.com/dod-cyber-crime-center/pyhidra/archive/$pkgver.zip")
sha512sums=('bf8f43436fec0eb340ca13ca415a9ed861dab3c50c54ca1a24c5e148c13883979164f02b58d5abbb56b112a99672d8ad25fe6a0ccf1ad4368a0334fa72aaa3d0')

build() {
cd "$_pkgname-$pkgver"

python -m build --wheel --no-isolation
}

package(){
cd "$_pkgname-$pkgver"

python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

Loading