opt/clang-ccache-bindings/Pkgfile

27 lines
692 B
Plaintext
Raw Normal View History

2023-08-27 17:49:40 +02:00
# Description: Masquerade directory to use ccache with clang
# URL: https://ccache.dev/
2023-08-27 17:49:40 +02:00
# Maintainer: Tim Biermann, tbier at posteo dot de
2018-09-07 11:27:30 +02:00
# Depends on: ccache clang
name=clang-ccache-bindings
2023-10-08 11:54:49 +02:00
version=17
2020-05-02 06:10:29 +02:00
release=1
2018-09-07 11:27:30 +02:00
source=()
build() {
2023-08-27 17:49:40 +02:00
install -d $PKG/usr/lib/ccache
2018-09-07 11:27:30 +02:00
2023-08-27 17:49:40 +02:00
local clang0="$(clang --version | awk -F'[ .]' '/version/ { print $3"."$4 }')"
local clang1="${clang0:0:2}"
2018-09-07 11:27:30 +02:00
2023-08-27 17:49:40 +02:00
if [ -z "$clang0" ]; then
echo 'Failed to find clang version'
exit 1
fi
2018-09-07 11:27:30 +02:00
2023-08-27 17:49:40 +02:00
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++
2018-09-07 11:27:30 +02:00
}