2020-12-05 21:08:44 +00:00
|
|
|
# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
|
|
|
|
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
|
|
|
# Contributor: Ding Xiao <tinocodfcdsa10@mails.tsinghua.edu.cn>
|
|
|
|
# Contributor: Firmy <firmianay@gmail.com>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - removed makedepend on pandoc
|
|
|
|
|
|
|
|
pkgname=python-pwntools
|
|
|
|
_pyname=pwntools
|
2024-02-23 00:52:49 +00:00
|
|
|
pkgver=4.12.0
|
2024-04-27 16:00:31 +00:00
|
|
|
pkgrel=2
|
2020-12-05 21:08:44 +00:00
|
|
|
pkgdesc='CTF framework and exploit development library'
|
|
|
|
url='https://github.com/Gallopsled/pwntools'
|
|
|
|
arch=('any')
|
|
|
|
license=('MIT' 'GPL2' 'BSD')
|
2023-09-16 14:33:01 +00:00
|
|
|
depends=(
|
|
|
|
'python'
|
|
|
|
'python-capstone'
|
|
|
|
'python-colored-traceback'
|
|
|
|
'python-dateutil'
|
|
|
|
'python-intervaltree'
|
|
|
|
'python-mako'
|
|
|
|
'python-packaging'
|
|
|
|
'python-paramiko'
|
|
|
|
'python-pip'
|
|
|
|
'python-psutil'
|
|
|
|
'python-pyelftools'
|
|
|
|
'python-pygments'
|
|
|
|
'python-pyserial'
|
|
|
|
'python-pysocks'
|
|
|
|
'python-requests'
|
|
|
|
'python-rpyc'
|
|
|
|
'python-six'
|
|
|
|
'python-sortedcontainers'
|
|
|
|
'python-unicorn'
|
|
|
|
'ropgadget'
|
|
|
|
)
|
|
|
|
makedepends=(
|
|
|
|
'python-build'
|
|
|
|
'python-installer'
|
|
|
|
)
|
|
|
|
backup=('etc/pwn.conf')
|
2020-12-05 21:08:44 +00:00
|
|
|
source=(https://github.com/Gallopsled/pwntools/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
|
|
|
|
pwn.conf)
|
2024-02-23 00:52:49 +00:00
|
|
|
sha256sums=('1eb1f4156ab2cd429b79cc5d7c69e6e788ea8af5dd84d15d7be4331e26a7d8b0'
|
2020-12-05 21:08:44 +00:00
|
|
|
'50916e4e45d026422cd6bfe8de50e7246c61b0b1e0007571e7c04a994282fe89')
|
2024-02-23 00:52:49 +00:00
|
|
|
b2sums=('f4739b659f30b8f8522881cacaceed96e12a8c4c9591c738a3b1b98cbd8ec7ce49d2adbffb099deb470a72d9880c0c2aea2702ec8ea48dfe9894c780d549fa5e'
|
2020-12-05 21:08:44 +00:00
|
|
|
'cac0a12eea8abd3d2ee21632e7f2281e7e35c2d7839cfbcba83ae5d0e8f427e9cc2462a6d17d187252b99d9dbbb14393b9d5a63996c42043f553e9b66bfe9e07')
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd ${_pyname}-${pkgver}
|
2023-09-16 14:33:01 +00:00
|
|
|
python -m build --wheel --no-isolation
|
2020-12-05 21:08:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2023-09-16 14:33:01 +00:00
|
|
|
local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
|
|
|
|
|
|
cd ${_pyname}-${pkgver}
|
|
|
|
python -m installer --destdir=test_dir dist/*.whl
|
|
|
|
|
|
|
|
PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH" PWNLIB_NOTERM=true python -c 'import pwn'
|
2020-12-05 21:08:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd ${_pyname}-${pkgver}
|
2023-09-16 14:33:01 +00:00
|
|
|
python -m installer --destdir="${pkgdir}" dist/*.whl
|
|
|
|
find "${pkgdir}/usr/bin" -type f ! -name pwn -delete
|
|
|
|
|
2020-12-05 21:08:44 +00:00
|
|
|
install -Dm 644 "${srcdir}/pwn.conf" -t "${pkgdir}/etc"
|
|
|
|
install -Dm 644 LICENSE-pwntools.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
2021-11-15 18:12:56 +00:00
|
|
|
|
2022-12-30 16:49:37 +00:00
|
|
|
# https://github.com/Gallopsled/pwntools/issues/2150
|
|
|
|
install -d "${pkgdir}/usr/share/doc/"
|
|
|
|
mv -v "${pkgdir}/usr/pwntools-doc" "${pkgdir}/usr/share/doc/"
|
|
|
|
|
2021-11-15 18:12:56 +00:00
|
|
|
install -Dm 644 extra/bash_completion.d/pwn -t "${pkgdir}/usr/share/bash-completion/completions/"
|
|
|
|
install -Dm 644 extra/zsh_completion/_pwn -t "${pkgdir}/usr/share/zsh/site-functions/"
|
2020-12-05 21:08:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|