opt/ccache/Pkgfile

37 lines
977 B
Plaintext
Raw Normal View History

2015-02-11 14:02:22 +01:00
# Description: A fast compiler cache.
2019-07-27 14:23:08 +02:00
# URL: https://ccache.dev/
2014-11-10 13:25:50 +01:00
# Maintainer: Danny Rawlins, crux at romster dot me
2022-01-08 13:43:41 +01:00
# Optional: asciidoctor clang-ccache-bindings
2006-02-23 16:26:10 +01:00
name=ccache
2022-08-27 11:23:52 +02:00
version=4.6.2
2022-03-05 17:28:35 +01:00
release=1
source=(https://github.com/$name/$name/releases/download/v$version/$name-$version.tar.xz
2020-11-23 14:03:04 +01:00
ccache.1)
2006-02-23 16:26:10 +01:00
build() {
2022-01-08 13:43:41 +01:00
cmake -S $name-$version -B build -G Ninja \
2020-11-09 12:34:51 +01:00
-D CMAKE_INSTALL_PREFIX=/usr \
2020-11-23 14:39:13 +01:00
-D CMAKE_INSTALL_LIBDIR=lib \
2020-11-09 12:34:51 +01:00
-D CMAKE_BUILD_TYPE=Release \
2020-11-23 14:39:13 +01:00
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
2021-08-22 16:10:56 +02:00
-D ZSTD_FROM_INTERNET=ON \
-D REDIS_STORAGE_BACKEND=OFF
cmake --build build
DESTDIR=$PKG cmake --install build
# install bundled man page else generate it with asciidoctor
if [ ! -e '/usr/bin/asciidoctor' ]; then
install -d $PKG/usr/share/man/man1
install -m 644 $SRC/ccache.1 $PKG/usr/share/man/man1/
fi
2018-09-07 11:03:12 +02:00
install -d $PKG/usr/lib/ccache
2015-02-11 14:02:22 +01:00
2018-09-07 11:03:12 +02:00
for c in cc gcc g++ cpp c++; do
2015-02-11 14:02:22 +01:00
ln -s /usr/bin/ccache $PKG/usr/lib/ccache/$c
done
2006-02-23 16:26:10 +01:00
}