namcap/PKGBUILD
2024-10-31 13:18:18 +08:00

44 lines
1.2 KiB
Bash

# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <xhaa123@outlook.com>
pkgname=namcap
pkgver=3.5.2
pkgrel=1
pkgdesc="A Pacman package analyzer"
arch=('x86_64')
url="https://gitlab.archlinux.org/pacman/namcap"
license=('GPL-2.0-or-later')
depends=(
'binutils'
'elfutils'
'pkgconf'
'licenses'
'python-pyalpm'
'python'
'python-pyelftools'
'python-license-expression'
)
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools')
source=(https://gitlab.archlinux.org/pacman/namcap/-/releases/${pkgver}/downloads/${pkgname}-${pkgver}.tar.bz2)
sha256sums=(fbd3b1f0777fe457afd3dbb1f55de8adbaeb50257492626bcffd1a3eef67d618)
build() {
cd ${pkgname}-${pkgver}
python3 -m build -wn
}
package() {
cd ${pkgname}-${pkgver}
python3 -m installer -d ${pkgdir} dist/*.whl
local site_packages=$(python3 -c "import site; print(site.getsitepackages()[0])")
mv ${pkgdir}/{${site_packages}/usr/share,usr}
rmdir ${pkgdir}/${site_packages}/usr
}