archrelease: copy trunk to community-any
[ArchLinux/community.git] / sccache / trunk / PKGBUILD
blobd82ec5ae46f0cb4e622136339ea773ec34623972
1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Chocobo1 <chocobo1@archlinux.net>
3 # Contributor: Jean Lucas <jean@4ray.co>
5 pkgname=sccache
6 pkgver=0.4.2
7 pkgrel=1
8 pkgdesc='Shared compilation cache'
9 arch=(x86_64)
10 url=https://github.com/mozilla/sccache
11 license=(Apache)
12 depends=(
13   gcc-libs
14   glibc
15   libzstd.so
16   openssl
17   zlib
19 makedepends=(
20   git
21   rust
23 optdepends=(
24   'memcached: Memcached support'
25   'redis: Redis support'
27 _tag=844da898992f8e2a755d0965adab743648261e51
28 source=(git+https://github.com/mozilla/sccache.git#tag=${_tag})
29 b2sums=(SKIP)
31 pkgver() {
32   cd sccache
33   git describe --tags | sed 's/^v//'
36 prepare() {
37   cargo fetch \
38     --locked \
39     --manifest-path sccache/Cargo.toml
42 build() {
43   export CFLAGS+=' -ffat-lto-objects'
44   export LDFLAGS+=' -lzstd'
45   cargo build \
46     --release \
47     --frozen \
48     --manifest-path sccache/Cargo.toml \
49     --features all \
50     --features native-zlib
53 #check() {
54 #  cargo test \
55 #    --release \
56 #    --frozen \
57 #    --manifest-path sccache/Cargo.toml \
58 #    --features all \
59 #    --features native-zlib
62 package() {
63   export CFLAGS+=' -ffat-lto-objects'
64   export LDFLAGS+=' -lzstd'
65   cargo install \
66     --frozen \
67     --offline \
68     --no-track \
69     --path sccache \
70     --root "${pkgdir}"/usr \
71     --features all \
72     --features native-zlib
75 # vim: ts=2 sw=2 et: