Исправлено: определение корректной версии .rpm

Дополнено: шаблон генерации пакетов pip
This commit is contained in:
Евгений Храмов 2025-04-06 15:48:28 +03:00
parent 2bbc308810
commit c59ed6d505
2 changed files with 43 additions and 45 deletions

@ -41,10 +41,10 @@ checksums=('blake2b-256:{{.SourceURL.Digests.blake2b_256}}')
build() {
cd "$srcdir/{{.Info.Name}}-${version}"
python3 -m build
python -m build --wheel --no-isolation
}
package() {
cd "$srcdir/{{.Info.Name}}-${version}"
pip install --root="${pkgdir}/" . --no-deps --disable-pip-version-check
pip install --root="${pkgdir}/" . --no-deps --ignore-installed --disable-pip-version-check
}

@ -96,17 +96,14 @@ if [ -z "$noPkgMgr" ]; then
echo "Полученный список файлов:"
echo "$fileList"
if [ "$pkgMgr" == "pacman" ]; then
latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*\.pkg\.tar\.zst' | sort -V | tail -n 1)
elif [ "$pkgMgr" == "apt" ]; then
latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*\.amd64\.deb' | sort -V | tail -n 1)
elif [[ "$pkgMgr" == "dnf" || "$pkgMgr" == "yum" || "$pkgMgr" == "zypper" ]]; then
latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*\.x86_64\.rpm' | grep -v 'alt1' | sort -V | tail -n 1)
elif [ "$pkgMgr" == "apt-get" ]; then
latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*-alt[0-9]+\.x86_64\.rpm' | sort -V | tail -n 1)
elif [[ "$pkgMgr" == "dnf" || "$pkgMgr" == "yum" || "$pkgMgr" == "zypper" ]]; then
latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*\.x86_64\.rpm' | sort -V | tail -n 1)
fi
else
error "Не поддерживаемый менеджер пакетов для автоматической установки"
fi
@ -134,6 +131,7 @@ fi
rm $fname
info "Готово!"
else
info "Клонирование репозитория ALR"
git clone https://gitea.plemya-x.ru/xpamych/ALR.git /tmp/alr