Skip to content

Commit

Permalink
maryam: use pip install (still broken).
Browse files Browse the repository at this point in the history
  • Loading branch information
noptrix committed May 14, 2024
1 parent 9374f35 commit 47d7e47
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 15 deletions.
37 changes: 22 additions & 15 deletions packages/maryam/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,46 @@
# See COPYING for license details.

pkgname=maryam
pkgver=885.651eb9e77
pkgver=v.2.5.2.r1.g651eb9e77
pkgrel=1
epoch=2
epoch=3
pkgdesc='Full-featured Web Identification framework written in Python.'
groups=('blackarch' 'blackarch-scanner' 'blackarch-webapp' 'blackarch-recon')
arch=('any')
url='https://github.com/saeeddhqan/Maryam'
license=('MIT')
depends=('python' 'python-requests' 'python-beautifulsoup4' 'python-lxml'
'python-cloudscraper' 'python-flask' 'python-pandas' 'python-plotly'
'python-vadersentiment' 'python-matplotlib' 'python-wordcloud'
'python-numpy' 'python-dask' 'python-scikit-learn' 'python-scipy'
'python-bertopic' 'python-gensim' 'python-top2vec'
'python-sentence-transformers')
depends=('python' 'python-virtualenv' 'python-pip')
makedepends=('git')
source=("$pkgname::git+https://github.com/saeeddhqan/Maryam.git")
sha512sums=('SKIP')
install="$pkgname.install"

pkgver() {
cd $pkgname

echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
cd $pkgname

python setup.py build
}

package() {
cd $pkgname

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
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 *.md LICENSE

cp -a * "$pkgdir/usr/share/$pkgname/"

cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
source /usr/share/$pkgname/venv/bin/activate
exec python /usr/share/$pkgname/$pkgname.py "\$@"
EOF

chmod +x "$pkgdir/usr/bin/$pkgname"
}

14 changes: 14 additions & 0 deletions packages/maryam/maryam.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
post_install() {
set -e
cd /usr/share/maryam
python -m virtualenv venv
source venv/bin/activate &&
pip install git+https://github.com/saeeddhqan/maryam.git \
--isolated --root='/usr/share/maryame' --prefix='venv' -r requirements
}

post_upgrade() {
post_install "$@"
}

#

0 comments on commit 47d7e47

Please sign in to comment.