File PKGBUILD of Package osc
pkgname=osc
pkgver=1.15.1
pkgrel=1
pkgdesc="Command Line Interface for Open Build Service"
arch=(any)
url=https://github.com/openSUSE/osc
license=(GPL-2.0-or-later)
depends=(python-cryptography python-ruamel-yaml python-urllib3)
makedepends=(python-setuptools diffstat)
optdepends=('python-progressbar: for showing download progressbars'
'python-distro: for setting the default editor by distro'
'python-keyring: for storing credentials in kwallet/gnome-keyring'
'python-keyring-keyutils: for storing credentials in kwallet/gnome-keyring'
'bash-completion: for completion when using bash'
'zsh-completions: for completion when using zsh')
source=(${url}/archive/refs/tags/${pkgver}.tar.gz)
sha256sums=('730f8729fb7d29425d852c99d0359e94c5ba77575be9fe0521ff39b219910d67')
build() {
cd ${pkgname}-${pkgver}
python setup.py build
}
package() {
cd ${pkgname}-${pkgver}
python setup.py install --root="${pkgdir}"/ --optimize=1 --prefix=/usr
install -Dm0755 contrib/osc.complete "${pkgdir}"/usr/lib/osc/complete
#install -Dm0644 contrib/complete.csh "${pkgdir}"/etc/profile.d/osc.csh
install -Dm0644 contrib/complete.sh "${pkgdir}"/usr/share/bash-completion/completions/osc
#install -Dm0644 contrib/osc.fish "${pkgdir}"/usr/share/fish/osc.fish
install -Dm0644 contrib/osc.zsh "${pkgdir}"/usr/share/zsh/site-functions/_osc
}