aboutsummaryrefslogtreecommitdiffstats
path: root/main/ccache/APKBUILD
blob: 09fec313e773f3d8e6c36647e6b2e9e1398d4663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ccache
pkgver=3.3.6
pkgrel=0
pkgdesc="A fast C/C++ compiler cache"
url="http://ccache.samba.org/"
arch="all"
license="GPL-3.0-or-later"
makedepends="zlib-dev"
subpackages="$pkgname-doc"
source="http://samba.org/ftp/$pkgname/$pkgname-$pkgver.tar.xz"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	update_config_sub
}

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

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	install -Dm 755 ccache "$pkgdir"/usr/bin/ccache
	install -Dm 644 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="149ac45b2bc2bf09d9a97d4e7b4352fbea1d8e230f75c0caaae785afb9f8c468fa62cf4adf8eb72da41c79a2f7d8d9330bbf9bb7737fe368bd422bf1e6579918  ccache-3.3.6.tar.xz"