opt/clang-ccache-bindings/Pkgfile

27 lines
693 B
Plaintext
Raw Normal View History

2018-09-07 11:27:30 +02:00
# Description: Masquerade directory to use ccache with clang.
# URL: https://ccache.dev/
2018-09-07 11:27:30 +02:00
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: ccache clang
name=clang-ccache-bindings
2023-05-21 10:16:39 +02:00
version=16
2020-05-02 06:10:29 +02:00
release=1
2018-09-07 11:27:30 +02:00
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}"
2018-09-07 11:27:30 +02:00
2020-12-12 15:28:44 +01:00
if [ -z "$clang0" ]; then
2018-09-07 11:27:30 +02:00
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
2018-09-07 11:27:30 +02:00
ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang++
}