summaryrefslogblamecommitdiff
path: root/user/ccache/APKBUILD
blob: e8df804e5835b9ee323389c32b2baf3f8416fd6c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13



                                                              
            







                                     
                                                                                            

































                                                                          
                                                                                                                                                                  
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=ccache
pkgver=3.7.4
pkgrel=0
pkgdesc="A fast C/C++ compiler cache"
url="https://ccache.dev/"
arch="all"
license="GPL-3.0+"
makedepends="zlib-dev"
checkdepends="bash perl"
subpackages="$pkgname-doc"
source="https://github.com/ccache/ccache/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make test
}

package() {
	install -Dm 755 ccache "$pkgdir"/usr/bin/ccache
	install -Dm 644 doc/ccache.1 "$pkgdir"/usr/share/man/man1/ccache.1

	local link=
	mkdir -p "$pkgdir"/usr/lib/ccache/bin

	for link in cc gcc g++ cpp c++ ${CHOST}-cc ${CHOST}-gcc \
			${CHOST}-g++ ${CHOST}-cpp ${CHOST}-c++; do
		ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/$link
	done
}

sha512sums="cc382f37f7efb30a64f6fc2b136ef7424fe51795a778dbb18dde7c9e80636515f242f51c3ef3231f74d154e65ed9e815abf8241eb1a8f4e0b4fe4f533ea27146  ccache-3.7.4.tar.xz"