blob: a63a684204b263cdddcd9cbeb94b728e8648eb95 (
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
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgbase=decasify
pkgname=("$pkgbase" "lua-$pkgbase" "lua53-$pkgbase" "lua52-$pkgbase" "lua51-$pkgbase")
pkgver=0.4.3
_rockrel=1
pkgrel=1
pkgdesc='cast strings to title-case according to locale specific style guides including Turkish'
arch=(x86_64)
url="https://github.com/alerque/$pkgbase"
license=(GPL3)
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
jq)
_archive="$pkgbase-$pkgver"
source=("$url/releases/download/v$pkgver/$_archive.tar.xz")
sha256sums=('20f7b7e96c48d8cbe411960b54fa5fe9f313f7e99b18b2c48bbb2000575b0060')
prepare() {
cd "$_archive"
sed Makefile.am -i \
-e 's/cargo \(build\|install\|test\)/cargo --offline \1/'
autoreconf
cargo fetch --locked
}
build() {
cd "$_archive"
./configure --prefix /usr
make
}
check() {
cd "$_archive"
make check
}
package_decasify() {
cd "$_archive"
make DESTDIR="$pkgdir" install
}
_package_helper() {
cd "$_archive"
luarocks --lua-version="$1" --tree="$pkgdir/usr/" \
make --deps-mode=none --no-manifest "rockspecs/$pkgbase-$pkgver-$_rockrel.rockspec"
}
package_lua-decasify() {
depends=(lua "${_luadeps[@]/#/lua-}")
_package_helper 5.4
}
package_lua51-decasify() {
depends=(lua51 "${_luadeps[@]/#/lua51-}")
_package_helper 5.1
}
package_lua52-decasify() {
depends=(lua52 "${_luadeps[@]/#/lua52-}")
_package_helper 5.2
}
package_lua53-decasify() {
depends=(lua53 "${_luadeps[@]/#/lua53-}")
_package_helper 5.3
}
|