blob: 5b66664cb75016a2d4c7d4960bd1a9182645b6b6 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgbase=decasify
pkgname=("$pkgbase" "lua-$pkgbase" "lua53-$pkgbase" "lua52-$pkgbase" "lua51-$pkgbase" "python-$pkgbase")
pkgver=0.6.0
_rockrel=1
pkgrel=2
pkgdesc='cast strings to title-case according to locale specific style guides including Turkish'
arch=(x86_64)
url="https://github.com/alerque/$pkgbase"
license=(LGPL-3.0-only)
depends=(gcc-libs
glibc)
makedepends=(cargo
lua{,-luarocks-build-rust-mlua}
lua51{,-luarocks-build-rust-mlua}
lua52{,-luarocks-build-rust-mlua}
lua53{,-luarocks-build-rust-mlua}
luarocks
python-{build,installer,wheel}
python-maturin
jq)
_archive="$pkgbase-$pkgver"
source=("$url/releases/download/v$pkgver/$_archive.tar.zst"{,.asc})
sha256sums=('01293c3300692bc4596ad8f91e9dbd0d0adb0bccf35a5ebac04047ce693d3c0b'
'SKIP')
validpgpkeys=('9F377DDB6D3153A48EB3EB1E63CC496475267693') # Caleb Maclennan <caleb@alerque.com> (@alerque)
prepare() {
cd "$_archive"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$_archive"
export CARGO_FEATURE_FLAGS==--offline
./configure --prefix /usr
make
python -m build -wn
}
check() {
cd "$_archive"
# export CARGO_FEATURE_FLAGS==--offline
# check requires lua & python developer tooling, needs to be reworked for a simple selfcheck
# make check
}
package_decasify() {
cd "$_archive"
make DESTDIR="$pkgdir" install
}
_package() {
cd "$_archive"
luarocks --lua-version "$1" --tree "$pkgdir/usr/" \
make --deps-mode none --no-manifest "rockspecs/$_archive-$_rockrel.rockspec"
}
package_lua-decasify() {
_package 5.4
}
package_lua51-decasify() {
_package 5.1
}
package_lua52-decasify() {
_package 5.2
}
package_lua53-decasify() {
_package 5.3
}
package_python-decasify() {
depends=(python)
cd "$_archive"
python -m installer -d "$pkgdir" dist/*.whl
}
|