summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 81c1ce0742242e10e041eed19c8dfb766a1c901c (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
35
36
37
38
39
40
# Maintainer: KiWi42 < pullthisplug dash aur at yahoo dot com >

pkgname=scans2any
pkgver=0.8.0
pkgrel=1
pkgdesc="Convert and merge infrastructure scans to Typst, Markdown, HTML, ..."
arch=("any")
url="https://github.com/softScheck/scans2any"
license=("AGPL-3.0-or-later")
provides=(scans2any)
conflicts=(scans2any-git)
depends=(python python-defusedxml python-jinja python-libnmap python-pandas
	python-partial-json-parser python-sortedcontainers python-tabulate
	python-tqdm python-yaml)
makedepends=(python-build python-installer python-wheel uv)
source=(https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/${pkgname//-/_}-$pkgver.tar.gz)
sha256sums=("c665347f08b800f6eba1d4cab94f1aa310ad312834e72d2370541829a2c90a4e")


build() {
	cd ${pkgname}-${pkgver}
	python -m build --wheel
}


package() {
	# Install python module
	cd ${pkgname}-${pkgver}
	python -m installer --destdir="$pkgdir" dist/*.whl

	# Install scans2markdown executable
	mkdir -p "${pkgdir}/usr/bin"
	install src/scans2any/main.py "${pkgdir}/usr/bin/scans2any"

	# install zsh completion file _scans2markdown as well as man page
	mkdir -p "${pkgdir}/usr/share/zsh/site-functions"
	mkdir -p "${pkgdir}/usr/share/man/man1"
	install -m 644 data/_scans2any "${pkgdir}/usr/share/zsh/site-functions/_scans2any"
	install -m 644 data/scans2any.1 "${pkgdir}/usr/share/man/man1/scans2any.1"
}