archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / ccache / repos / community-x86_64 / PKGBUILD
blob660a889d89534db739577f4c0445a510b80ca810
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
3 # Contributor: Tom Newsom <Jeepster@gmx.co.uk>
5 pkgname=ccache
6 pkgver=4.8
7 pkgrel=1
8 pkgdesc='Compiler cache that speeds up recompilation by caching previous compilations'
9 url='https://ccache.dev/'
10 arch=('x86_64')
11 license=('GPL3')
12 depends=('glibc' 'gcc-libs' 'hiredis' 'zstd' 'libzstd.so')
13 makedepends=('cmake' 'asciidoctor' 'perl')
14 source=(https://github.com/ccache/ccache/releases/download/v${pkgver}/ccache-${pkgver}.tar.xz{,.asc})
15 validpgpkeys=('5A939A71A46792CF57866A51996DDA075594ADB8') # Joel Rosdahl <joel@rosdahl.net>
16 sha512sums=('561424d448a049971742b846429c2fa5f1df43c05f201610dab0a3fab7e4806589c14ca20875cb5733763603c0813fe9350a244b63dda03e9def95d547738d0b'
17             'SKIP')
18 b2sums=('5cca7d49088c5391abf93a2a493ba8e120575ae834abae86f3669e8c883a93ec29d48ab934aa086a87feb6a08d0c0053b3ce7174cec2f342c2d695a93fa3ef9a'
19         'SKIP')
21 build() {
22   cd ${pkgname}-${pkgver}
23   cmake \
24     -DCMAKE_INSTALL_PREFIX=/usr \
25     -DCMAKE_BUILD_TYPE=None \
26     -Wno-dev \
27     -B build \
28     -S .
29   make VERBOSE=1 -C build
32 check() {
33   cd ${pkgname}-${pkgver}
34   make VERBOSE=1 check -C build
37 package() {
38   cd ${pkgname}-${pkgver}
40   make DESTDIR="${pkgdir}" install -C build
41   make DESTDIR="${pkgdir}" install -C build/doc
43   install -Dm 644 doc/*.md doc/*.adoc -t "${pkgdir}/usr/share/doc/${pkgname}"
45   install -d "${pkgdir}/usr/lib/ccache/bin"
46   local _prog
47   for _prog in gcc g++ c++; do
48     ln -s /usr/bin/ccache "${pkgdir}/usr/lib/ccache/bin/$_prog"
49     ln -s /usr/bin/ccache "${pkgdir}/usr/lib/ccache/bin/${CHOST}-$_prog"
50   done
51   for _prog in cc clang clang++; do
52     ln -s /usr/bin/ccache "${pkgdir}/usr/lib/ccache/bin/$_prog"
53   done
56 # vim: ts=2 sw=2 et: