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

unblob: add package #4380

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions lists/to-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
python-cstruct
python-lzallright
jefferson
python-plotext
python-pyfatfs
python-pyperscan
python-ubi-reader
python-unblob-native
unblob
50 changes: 50 additions & 0 deletions packages/jefferson/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=jefferson
pkgver=v0.4.5.r0.g96dd903
pkgrel=1
pkgdesc='JFFS2 filesystem extraction tool.'
arch=('any')
groups=('blackarch' 'blackarch-forensic' 'blackarch-reversing')
url='https://github.com/onekey-sec/jefferson'
license=('MIT')
depends=('python' 'python-click' 'python-cstruct' 'python-lzallright')
makedepends=('git' 'python-build' 'python-pip')
source=("git+https://github.com/onekey-sec/$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 -m build --wheel --outdir="$startdir/dist"
}

package() {
cd $pkgname

pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$pkgname
}

39 changes: 39 additions & 0 deletions packages/python-cstruct/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-cstruct
pkgver=v5.3.r1.g1236e1e
pkgrel=1
pkgdesc='C-style structs for Python.'
arch=('any')
url='https://github.com/andreax79/python-cstruct'
license=('MIT')
depends=('python')
makedepends=('git' 'python-setuptools')
options=(!emptydirs)
source=("git+https://github.com/andreax79/$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
}

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

pkgname=python-lzallright
_pkgname=${pkgname#python-}
pkgver=v0.2.5.r0.gcfa42fa
pkgrel=1
pkgdesc='Python binding for LZ library.'
arch=('any')
url='https://github.com/vlaci/lzallright'
license=('MIT')
depends=('python')
makedepends=('git' 'python-build' 'python-pip' 'rust')
options=(!emptydirs)
source=("git+https://github.com/vlaci/$_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

export CXXFLAGS="$CXXFLAGS -ffat-lto-objects"
python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd $_pkgname

pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

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

pkgname=python-plotext
_pkgname=${pkgname#python-}
pkgver=5.3.2.r0.g4d19108
pkgrel=1
pkgdesc='Plotting on terminal.'
arch=('any')
url='https://github.com/piccolomo/plotext'
depends=('python')
makedepends=('git' 'python-setuptools')
license=('MIT')
options=(!emptydirs)
source=("git+https://github.com/piccolomo/$_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
}

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

pkgname=python-pyfatfs
_pkgname=${pkgname#python-}
pkgver=v1.1.0.r0.g5590fb8
pkgrel=1
pkgdesc='Python based FAT12/FAT16/FAT32 implementation with VFAT support.'
arch=('x86_64' 'aarch64')
url='https://github.com/nathanhi/pyfatfs'
license=('MIT')
depends=('python' 'python-fs')
makedepends=('git' 'python-build' 'python-pip')
options=(!emptydirs)
source=("git+https://github.com/nathanhi/$_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 -m build --wheel --outdir="$startdir/dist"
}

package() {
cd $_pkgname

pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

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

pkgname=python-pyperscan
_pkgname=${pkgname#python-}
pkgver=v0.3.0.r8.g96f73ad
pkgrel=1
pkgdesc='Python binding for Hyperscan.'
arch=('any')
url='https://github.com/vlaci/pyperscan'
license=('Apache-2.0' 'MIT')
depends=('python' 'hyperscan')
makedepends=('git' 'python-build' 'python-pip' 'rust')
options=(!emptydirs)
source=("git+https://github.com/vlaci/$_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 -m build --wheel --outdir="$startdir/dist"
}

package() {
cd $_pkgname

pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

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

pkgname=python-ubi-reader
_pkgname=ubi_reader
pkgver=v0.8.9.r2.gcc7225e
pkgrel=1
pkgdesc='Collection of Python scripts for reading information about and extracting data from UBI and UBIFS images.'
arch=('any')
groups=('blackarch' 'blackarch-forensic' 'blackarch-reversing')
url='https://github.com/onekey-sec/ubi_reader'
license=('GPL-3.0-or-later')
depends=('python' 'python-lzallright')
makedepends=('git' 'python-build' 'python-pip')
options=(!emptydirs)
source=("git+https://github.com/onekey-sec/$_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 -m build --wheel --outdir="$startdir/dist"
}

package() {
cd $_pkgname

pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

Loading
Loading