From 742bd573e74f503e1962d40300ba860048c7d4a9 Mon Sep 17 00:00:00 2001 From: psykose <alice@ayaya.dev> Date: Wed, 5 Jan 2022 04:05:16 +0000 Subject: [PATCH] community/units: split units_cur bin only used to update the currency database, and needs python3 to do so --- community/units/APKBUILD | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/community/units/APKBUILD b/community/units/APKBUILD index 7383c5289960..47837a3b429e 100644 --- a/community/units/APKBUILD +++ b/community/units/APKBUILD @@ -2,18 +2,17 @@ # Maintainer: Miguel Terron <miguel.a.terron@gmail.com> pkgname=units pkgver=2.21 -pkgrel=1 +pkgrel=2 pkgdesc="Units conversion and calculation program" url="https://www.gnu.org/software/units/" arch="all" license="GPL-3.0-only" makedepends="readline-dev python3 py3-requests" -subpackages="$pkgname-doc" +subpackages="$pkgname-doc $pkgname-cur-update:_cur" source="https://ftp.gnu.org/gnu/units/units-$pkgver.tar.gz" build() { - export PYTHON=$(which python3) - sed -i "1c #!$PYTHON" units_cur + export PYTHON="$(command -v python3)" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -32,6 +31,13 @@ package() { make DESTDIR="$pkgdir" install } +_cur() { + pkgdesc="$pkgdesc (currency database updater)" + depends="units py3-requests python3" + + amove usr/bin/units_cur +} + sha512sums=" 34bacff606f12aa5b2e59170f6b2142277aa1121d79610a51b57f07f17ae2dbdfbbb0e60be34522f367679cc152408f77c1ebb551016224d23f81c21f4b3ba62 units-2.21.tar.gz " -- GitLab