64 lines
1.7 KiB
Bash
64 lines
1.7 KiB
Bash
# Maintainer: Yauheni Kirylau <actionless dot loveless AT gmail.com>
|
|
# shellcheck disable=SC2034,SC2154
|
|
|
|
pkgname=pikaur-git
|
|
pkgver=1.18.3.r15.g163aa82
|
|
pkgrel=1
|
|
pkgdesc="AUR helper which asks all questions before installing/building. Inspired by pacaur, yaourt and yay."
|
|
arch=('any')
|
|
url="https://github.com/actionless/pikaur"
|
|
license=('GPL3')
|
|
source=(
|
|
"$pkgname::git+https://github.com/actionless/pikaur.git#branch=master"
|
|
)
|
|
b2sums=(
|
|
"SKIP"
|
|
)
|
|
depends=(
|
|
'pyalpm'
|
|
'git'
|
|
)
|
|
makedepends=(
|
|
'python-wheel'
|
|
'python-hatchling'
|
|
'python-build'
|
|
'python-installer'
|
|
'python-setuptools' # i think it normally should be required by python-pep517 which required by python-build/installer
|
|
'python-markdown-it-py'
|
|
)
|
|
optdepends=(
|
|
'devtools: for Arch Pkgs support in -G/--getpkgbuild operation'
|
|
'python-pysocks: for socks5 proxy support'
|
|
'python-defusedxml: securely wrap Arch news replies'
|
|
)
|
|
conflicts=('pikaur')
|
|
provides=('pikaur')
|
|
|
|
pkgver() {
|
|
cd "${srcdir}/${pkgname}" || exit 2
|
|
set -o pipefail
|
|
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || echo 0.0.1
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}" || exit 2
|
|
sed -i -e "s/^VERSION.*=.*/VERSION = '${pkgver}'/g" pikaur/config.py
|
|
if test -d ./dist ; then
|
|
rm -r ./dist
|
|
fi
|
|
make
|
|
/usr/bin/python3 -m build --wheel --no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${pkgname}" || exit 2
|
|
/usr/bin/python3 -m installer --destdir="$pkgdir" dist/*.whl
|
|
for langmo in $(cd ./locale && ls ./*.mo); do
|
|
lang=$(sed -e 's/.mo$//' <<< "${langmo}")
|
|
install -Dm644 "locale/${langmo}" "$pkgdir/usr/share/locale/${lang}/LC_MESSAGES/pikaur.mo"
|
|
done
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
install -Dm644 pikaur.1 "$pkgdir/usr/share/man/man1/pikaur.1"
|
|
cp -r ./packaging/* "${pkgdir}"
|
|
}
|