summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb1b8d2f758d7f61e9c1cb8bb8efa1f56e392031 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer: Olivier Le Moal <mail at olivierlemoal dot fr>
# Contributor: Sid Karunaratne <sid at karunaratne dot net>
pkgname=weevely
_pkgname=weevely3
pkgver=4.0.2
pkgrel=1
pkgdesc="a stealth PHP web shell that provides a telnet-like console"
arch=('any')
url="https://github.com/epinna/weevely3"
license=('GPL3')
depends=(python python-dateutil python-mako python-prettytable python-pyopenssl python-yaml python-pysocks)
source=("https://github.com/epinna/${_pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('2bdad7efd59d3854b50b7c41f8a8a864b7ec36de8c6f343d32f258680dd1aef8')

build() {
  cd ${_pkgname}-${pkgver}
  python -m compileall .
  python -O -m compileall .
}

package() {
    cd ${_pkgname}-${pkgver}
    install -d "${pkgdir}/usr/bin"
    install -d "${pkgdir}/opt/${pkgname}"
    install -D -m644 weevely.1 -t "${pkgdir}/usr/share/man/man1/"
    cp -a --no-preserve=ownership "bd/" "core/" "modules/" "utils/" "weevely.py" "${pkgdir}/opt/${pkgname}"
    cat > "${pkgdir}/usr/bin/weevely" << EOF
#!/bin/sh
cd /opt/${pkgname}
python weevely.py "\$@"
EOF
    chmod 755 "${pkgdir}/usr/bin/weevely"

}