Skip to content

Commit

Permalink
add smbclient-ng + python-pefile
Browse files Browse the repository at this point in the history
  • Loading branch information
noraj authored and noptrix committed Feb 26, 2025
1 parent 7da731d commit ffc4687
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/python-pefile/PKGBUILD
Original file line number Diff line number Diff line change
@@ -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
}
59 changes: 59 additions & 0 deletions packages/smbclient-ng/PKGBUILD
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit ffc4687

Please sign in to comment.