27 lines
693 B
Plaintext
27 lines
693 B
Plaintext
# Description: Masquerade directory to use ccache with clang.
|
|
# URL: https://ccache.dev/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: ccache clang
|
|
|
|
name=clang-ccache-bindings
|
|
version=14
|
|
release=1
|
|
source=()
|
|
|
|
build() {
|
|
install -d $PKG/usr/lib/ccache
|
|
|
|
local clang0="$(clang --version | awk '/version/ { split($3,i,"."); print i[1]"."i[2] }')"
|
|
local clang1="${clang0:0:2}"
|
|
|
|
if [ -z "$clang0" ]; then
|
|
echo 'Failed to find clang version'
|
|
exit 1
|
|
fi
|
|
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang0
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang1
|
|
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang++
|
|
}
|