diff --git a/packages/python-pefile/PKGBUILD b/packages/python-pefile/PKGBUILD new file mode 100644 index 00000000000..d43991b6a7d --- /dev/null +++ b/packages/python-pefile/PKGBUILD @@ -0,0 +1,28 @@ +# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). +# See COPYING for license details. + +pkgname=python-pefile +_pkgname=${pkgname#python-} +pkgver=2024.8.26 +pkgrel=1 +pkgdesc='Read and work with PE (Portable Executable) files.' +arch=('any') +url='https://github.com/erocarrera/pefile' +license=('MIT') +depends=('python') +makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel') +options=(!emptydirs) +source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz") +sha512sums=('62781f2ab84040a13304ce550dd1e943991df152c5f2951281906e837b1659694051a074ff49cd08d5d508e9b70009b56418a4237511c4464c4eba9bda4bccf7') + +build() { + cd "$_pkgname-$pkgver" + + python -m build --wheel --no-isolation +} + +package() { + cd "$_pkgname-$pkgver" + + python -m installer --destdir="$pkgdir" dist/*.whl +} diff --git a/packages/smbclient-ng/PKGBUILD b/packages/smbclient-ng/PKGBUILD new file mode 100644 index 00000000000..c1c4ab07e8c --- /dev/null +++ b/packages/smbclient-ng/PKGBUILD @@ -0,0 +1,59 @@ +# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). +# See COPYING for license details. + +pkgname=smbclient-ng +_pkgname=smbclientng +pkgver=2.1.7.r5.g4f29b0f +pkgrel=1 +pkgdesc='Interact with SMB shares.' +arch=('any') +groups=('blackarch' 'blackarch-networking' 'blackarch-windows') +url='https://github.com/p0dalirius/smbclient-ng' +license=('GPL-3.0-only') +depends=('python' + 'impacket-ba' + 'python-rich' + 'python-charset-normalizer' + 'python-pefile') +makedepends=('git' 'python-build' 'python-pip') +source=("git+https://github.com/p0dalirius/$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 + + # Alias + install -dm 755 "$pkgdir/usr/bin/" + ln -s "/usr/bin/$_pkgname" "$pkgdir/usr/bin/$pkgname" +} +