summaryrefslogtreecommitdiff
path: root/clang-ccache-bindings/Pkgfile
blob: 39de73d5d18eb6765f330479949b96d2ee14d119 (plain)
    1 # Description: Masquerade directory to use ccache with clang.
    2 # URL: http://llvm.org/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Depends on: ccache clang
    5 
    6 name=clang-ccache-bindings
    7 version=10
    8 release=1
    9 source=()
   10 
   11 build() {
   12 	install -d $PKG/usr/lib/ccache
   13 
   14 	local clang0="$(clang++ -v 2>&1 | grep version | sed 's/.*version \([0-9]*\).[0-9]*.[0-9]* .*/\1/g')"
   15 	local clang1="$(clang++ -v 2>&1 | grep version | sed 's/.*version \([0-9]*.[0-9]*\).[0-9]* .*/\1/g')"
   16 
   17 	if [ -z $clang0 ]; then
   18 		echo 'Failed to find clang version'
   19 		exit 1
   20 	fi
   21 
   22 	ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang
   23 	ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang0
   24 	ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang-$clang1
   25 	ln -s ../../bin/ccache $PKG/usr/lib/ccache/clang++
   26 }

Generated by cgit