blob: 01ddafa339f788e352a52ad3536e599a0be4096f (
plain)
1 # Description: A fast compiler cache.
2 # URL: https://ccache.dev/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Optional: asciidoctor clang-ccache-bindings
5
6 name=ccache
7 version=4.6.2
8 release=1
9 source=(https://github.com/$name/$name/releases/download/v$version/$name-$version.tar.xz
10 ccache.1)
11
12 build() {
13 cmake -S $name-$version -B build -G Ninja \
14 -D CMAKE_INSTALL_PREFIX=/usr \
15 -D CMAKE_INSTALL_LIBDIR=lib \
16 -D CMAKE_BUILD_TYPE=Release \
17 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
18 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
19 -D ZSTD_FROM_INTERNET=ON \
20 -D REDIS_STORAGE_BACKEND=OFF
21
22 cmake --build build
23 DESTDIR=$PKG cmake --install build
24
25 # install bundled man page else generate it with asciidoctor
26 if [ ! -e '/usr/bin/asciidoctor' ]; then
27 install -d $PKG/usr/share/man/man1
28 install -m 644 $SRC/ccache.1 $PKG/usr/share/man/man1/
29 fi
30
31 install -d $PKG/usr/lib/ccache
32
33 for c in cc gcc g++ cpp c++; do
34 ln -s /usr/bin/ccache $PKG/usr/lib/ccache/$c
35 done
36 }
|