blob: f1664552a5b3dd85734ba880ae4289c5a53f5fd8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Maintainer: tarball <bootctl@gmail.com>
# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jeff Mickey <jeff@archlinux.org>
# Contributor: Steve Sansom <snsansom@gmail.com>
pkgname=units
pkgver=2.24
pkgrel=1
pkgdesc="converts between different units"
arch=('x86_64' 'aarch64' 'armv7h' 'riscv64')
url="https://www.gnu.org/software/units/units.html"
depends=('readline')
optdepends=('python-unidecode: for live currency rates'
'python-requests: for live currency rates')
makedepends=('python-unidecode' 'python-requests')
license=("GPL-3.0-or-later")
options=('!makeflags')
validpgpkeys=(
'927D02FA733C3D902D21CAC02D649F2B7B4C8179' # Adrian Mariano <avm4@cornell.edu>
)
source=(https://ftp.gnu.org/gnu/units/$pkgname-$pkgver.tar.gz{,.sig}
'units_currency.timer'
'units_currency.service')
sha256sums=('1e502c4edfacf20b29284716c72e5ddb51a495a2365d7b03e7960494c4a0c902'
'SKIP'
'c1cb48a6157c850a0b7ecbf4387b82820d6e42f4a2c7ff0eb9de293bad6b128f'
'52e8cd68110e797e3ee3737f06200505225039b18f3f9b87ae38b6c539c9ccb2')
build() {
cd "$pkgname-$pkgver"
./configure --prefix=/usr --datadir=/usr/share --sharedstatedir=/var/lib
# /usr/bin/pager seems to be a Debian-ism; it is not provided by any of the
# packages shipped with Arch Linux. Replace it with less, which, according to
# pkgstats, is shipped on 100% of Arch systems, and will make the 'help'
# function work correctly on systems with an empty $PAGER env var.
sed -i 's|DEFAULTPAGER "/usr/bin/pager"|DEFAULTPAGER "/usr/bin/less"|' units.c
make
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
rm "$pkgdir/usr/share/units/currency.units"
ln -s /var/lib/units/currency.units "$pkgdir/usr/share/units/currency.units"
install -Dm644 ../units_currency.timer "$pkgdir/usr/lib/systemd/system/units_currency.timer"
install -Dm644 ../units_currency.service "$pkgdir/usr/lib/systemd/system/units_currency.service"
}
|