upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / crystal / trunk / PKGBUILD
blobcdee05210a314e7d9f1177b2898486dde6f23a24
1 # Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
2 # Contributor: Jonne Haß <me@jhass.eu>
4 pkgname=crystal
5 pkgver=1.8.2
6 pkgrel=1
7 pkgdesc='The Crystal Programming Language'
8 arch=(x86_64)
9 url='https://crystal-lang.org'
10 license=(Apache)
11 depends=(gc pcre2 libevent llvm-libs)
12 makedepends=(libxml2 llvm crystal) # to compile version N we need crystal compiler of N-1 version
13 checkdepends=(libyaml libxml2 gmp inetutils git)
14 optdepends=('shards: crystal language package manager'
15             'libyaml: For YAML support'
16             'gmp: For BigInt support'
17             'libxml2: For XML support')
18 source=(crystal-$pkgver.tar.gz::https://github.com/crystal-lang/crystal/archive/$pkgver.tar.gz)
19 sha256sums=('6e722e3239a8c467ba42a8838916788a4795b0ceaa2d1e2e98616cedeb540605')
21 build() {
22   cd $pkgname-$pkgver
24   make release=1 interpreter=1 \
25        FLAGS="--release --no-debug" \
26        CRYSTAL_CONFIG_PATH="lib:/usr/lib/crystal" \
27        CRYSTAL_CACHE_DIR="/tmp/crystal"
28   make docs CRYSTAL_CACHE_DIR="/tmp/crystal"
31 check() {
32   cd $pkgname-$pkgver
33   return # tests require too much RAM, disable it temporary
35   make spec CRYSTAL_CACHE_DIR="/tmp/crystal"
38 package() {
39   cd $pkgname-$pkgver
41   # /usr/bin/crystal                compiled executable
42   # /usr/lib/crystal/               compiler src & core libs
43   # /usr/share/doc/crystal/api      api docs
44   # /usr/share/doc/crystal/samples/ samples
46   install -Dm755 ".build/crystal" "$pkgdir/usr/bin/crystal"
48   install -dm755 "$pkgdir/usr/lib" "$pkgdir/usr/share/man/man1"
49   cp -r src "$pkgdir/usr/lib/crystal"
51   install -dm755 "$pkgdir/usr/share/doc/crystal"
52   cp -r docs "$pkgdir/usr/share/doc/crystal/api"
53   cp -r samples "$pkgdir/usr/share/doc/crystal/"
55   install -Dm644 man/crystal.1 "$pkgdir/usr/share/man/man1/"
57   install -Dm644 etc/completion.bash "$pkgdir/usr/share/bash-completion/completions/crystal"
58   install -Dm644 etc/completion.zsh "$pkgdir/usr/share/zsh/site-functions/_crystal"
60   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"