Skip to content
Snippets Groups Projects
PKGBUILD 1.76 KiB
Newer Older
Levente Polyak's avatar
Levente Polyak committed
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=ccache
pkgver=4.10.2
Levente Polyak's avatar
Levente Polyak committed
pkgdesc='Compiler cache that speeds up recompilation by caching previous compilations'
url='https://ccache.dev/'
arch=('x86_64')
license=('GPL-3.0-or-later')
Antonio Rojas's avatar
Antonio Rojas committed
depends=('fmt' 'glibc' 'gcc-libs' 'hiredis' 'zstd' 'libzstd.so')
Felix Yan's avatar
Felix Yan committed
makedepends=('cmake' 'asciidoctor' 'perl')
source=(https://github.com/ccache/ccache/releases/download/v${pkgver}/ccache-${pkgver}.tar.xz{,.asc})
sha512sums=('3815c71d7266c32839acb306763268018acc58b3bbbd9ec79fc101e4217c1720d2ad2f01645bf69168c1c61d27700b6f3bb755cfa82689cca69824f015653f3c'
b2sums=('7352b8b48ed889e1f251ae59cb7cd9d01d7d3226b58a7823be176907dc074ff22ca5d6a271e2caede7d97a65457b9067b48e9d39ab833bf45fb055eb3bfe7607'
validpgpkeys=('5A939A71A46792CF57866A51996DDA075594ADB8') # Joel Rosdahl <joel@rosdahl.net>
Levente Polyak's avatar
Levente Polyak committed
  cd ${pkgname}-${pkgver}
  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=None \
    -Wno-dev \
    -B build \
    -S .
  make VERBOSE=1 -C build
Levente Polyak's avatar
Levente Polyak committed
check() {
Levente Polyak's avatar
Levente Polyak committed
  cd ${pkgname}-${pkgver}
  make VERBOSE=1 check -C build
Levente Polyak's avatar
Levente Polyak committed
}
Levente Polyak's avatar
Levente Polyak committed
package() {
Levente Polyak's avatar
Levente Polyak committed
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install -C build
  make DESTDIR="${pkgdir}" install -C build/doc

  install -Dm 644 doc/*.md doc/*.adoc -t "${pkgdir}/usr/share/doc/${pkgname}"
Levente Polyak's avatar
Levente Polyak committed
  install -d "${pkgdir}/usr/lib/ccache/bin"
  local _prog
  for _prog in gcc g++ c++; do
Levente Polyak's avatar
Levente Polyak committed
    ln -s /usr/bin/ccache "${pkgdir}/usr/lib/ccache/bin/$_prog"
    ln -s /usr/bin/ccache "${pkgdir}/usr/lib/ccache/bin/${CHOST}-$_prog"
  done
  for _prog in cc clang clang++; do
Levente Polyak's avatar
Levente Polyak committed
    ln -s /usr/bin/ccache "${pkgdir}/usr/lib/ccache/bin/$_prog"
Levente Polyak's avatar
Levente Polyak committed

# vim: ts=2 sw=2 et: