summaryrefslogtreecommitdiff
path: root/ccache/Pkgfile
blob: 8cdf38ecd9a7eeb03ecf74416e7fe77b7419136e (plain)
    1 # Description: A fast compiler cache.
    2 # URL: https://ccache.dev/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Depends on: cmake
    5 # Optional: asciidoctor clang-ccache-bindings
    6 
    7 name=ccache
    8 version=4.6.1
    9 release=1
   10 source=(https://github.com/$name/$name/releases/download/v$version/$name-$version.tar.xz
   11 	ccache.1)
   12 
   13 build() {
   14 	prt-get isinst ninja && PKGMK_CCACHE+=' -G Ninja'
   15 
   16 	cmake -S $name-$version -B build $PKGMK_CCACHE \
   17 		-D CMAKE_INSTALL_PREFIX=/usr \
   18 		-D CMAKE_INSTALL_LIBDIR=lib \
   19 		-D CMAKE_BUILD_TYPE=Release \
   20 		-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
   21 		-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
   22 		-D ZSTD_FROM_INTERNET=ON \
   23 		-D REDIS_STORAGE_BACKEND=OFF
   24 
   25 	cmake --build build
   26 	DESTDIR=$PKG cmake --install build
   27 
   28 	# install bundled man page else generate it with asciidoctor
   29 	if [ ! -e '/usr/bin/asciidoctor' ]; then
   30 		install -d $PKG/usr/share/man/man1
   31 		install -m 644 $SRC/ccache.1 $PKG/usr/share/man/man1/
   32 	fi
   33 
   34 	install -d $PKG/usr/lib/ccache
   35 
   36 	for c in cc gcc g++ cpp c++; do
   37 		ln -s /usr/bin/ccache $PKG/usr/lib/ccache/$c
   38 	done
   39 }

Generated by cgit