From 6833c99dfc2fe54fd8264106cc7712325a244baa Mon Sep 17 00:00:00 2001 From: noraj Date: Sat, 8 Feb 2025 02:11:02 +0100 Subject: [PATCH] add hexhttp & python-notify_py --- packages/hexhttp/PKGBUILD | 54 ++++++++++++++++++++++++++++++ packages/python-notify_py/PKGBUILD | 43 ++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 packages/hexhttp/PKGBUILD create mode 100644 packages/python-notify_py/PKGBUILD diff --git a/packages/hexhttp/PKGBUILD b/packages/hexhttp/PKGBUILD new file mode 100644 index 00000000000..d61e4468c64 --- /dev/null +++ b/packages/hexhttp/PKGBUILD @@ -0,0 +1,54 @@ +# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). +# See COPYING for license details. + +pkgname=hexhttp +pkgver=v1.7.4.r1.g0f01774 +pkgrel=1 +pkgdesc='Perform tests on HTTP headers and analyze the results to identify vulnerabilities and interesting behaviors.' +arch=('any') +groups=('blackarch' 'blackarch-scanner' 'blackarch-webapp') +url='https://github.com/c0dejump/HExHTTP' +license=('MIT') +depends=('python' # https://github.com/c0dejump/HExHTTP/blob/main/requirements.txt + 'python-requests' + 'wafw00f' + 'python-urllib3' + 'python-notify_py' + ) +makedepends=('git') +source=("$pkgname::git+$url.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)" + ) +} + +package() { + cd $pkgname + + install -dm 755 "$pkgdir/usr/bin" + install -dm 755 "$pkgdir/usr/share/$pkgname" + + install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md + + install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + rm -rf docs/ *.md LICENSE .github/ .gitignore Dockerfile requirements.txt + + cp -a * "$pkgdir/usr/share/$pkgname/" + + cat > "$pkgdir/usr/bin/$pkgname" << EOF +#!/bin/sh +#cd /usr/share/$pkgname +python /usr/share/$pkgname/$pkgname.py "\$@" +EOF + + chmod a+x "$pkgdir/usr/bin/$pkgname" +} diff --git a/packages/python-notify_py/PKGBUILD b/packages/python-notify_py/PKGBUILD new file mode 100644 index 00000000000..57659f32a32 --- /dev/null +++ b/packages/python-notify_py/PKGBUILD @@ -0,0 +1,43 @@ +# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). +# See COPYING for license details. + +pkgname=python-notify_py +_pkgname=${pkgname#python-} +pkgver=0.3.43 +pkgrel=1 +pkgdesc='Python Module for sending cross-platform desktop notifications.' +arch=('any') +url='https://github.com/ms7m/notify-py' +license=('MIT') +depends=('python' # https://github.com/ms7m/notify-py/blob/master/pyproject.toml + 'python-loguru' + 'python-jeepney' + 'libnotify') +makedepends=('python-build' 'python-pip') +options=(!emptydirs) +source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz") +sha512sums=('573aedb394a2af1e5872851455af5584ab81f393c71a4229c1499cd68204a40a45f9a01dd72a7a79991e83160b12c4d7c9b3ef9cbec84a7ceb7bda1fdde641ba') + +build() { + cd "$_pkgname-$pkgver" + + python -m build --wheel --outdir="$startdir/dist" +} + +package() { + cd "$_pkgname-$pkgver" + + 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 +} +