makedeb
THEGOLDENPRO utils library.
Viewing /PKGBUILD
.
Click here to go back to the Git tree for python3-devgoldyutils-git.
# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
_gitname=devgoldyutils
_pkgname=python3-devgoldyutils
pkgname=python3-devgoldyutils-git
pkgver=3.0.0.r8.9c9ed88
pkgrel=1
pkgdesc="THEGOLDENPRO utils library."
arch=('all')
license=('GPL3')
depends=('python3')
makedepends=('git' 'python3-build' 'python3-installer' 'python3-wheel' 'python3-setuptools-scm')
source=("git+https://github.com/THEGOLDENPRO/devgoldyutils")
b2sums=(SKIP)
provides=('python3-devgoldyutils')
conflicts=('python3-devgoldyutils')
pkgver() {
cd "${_gitname}"
printf "%s.r%s.%s" "$(grep '__version__' devgoldyutils/__init__.py | cut -d '"' -f 2)" "$(git rev-list --count HEAD)" "$(git describe --long --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g')"
}
build(){
cd "$srcdir/${_gitname}"
python3 -m build --no-isolation --wheel
}
package() {
cd $srcdir/${_gitname}
python3 -m installer --destdir="$pkgdir" dist/*.whl #--optimize=1 --skip-build
# Manual remove local
mv "$pkgdir/usr/local/"* "$pkgdir/usr/"
rmdir "$pkgdir/usr/local"
#doc
install -Dm644 "README.md" "$pkgdir/usr/share/doc/$_pkgname/readme"
ln -s /usr/share/common-licenses/GPL-3 "$pkgdir/usr/share/doc/$_pkgname/"
}