aboutsummaryrefslogtreecommitdiffstats
path: root/main/ccache/APKBUILD
blob: e6eb7ecc1451c8b8c1d1ba2334b8d28f493f1462 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ccache
pkgver=3.2.5
pkgrel=0
pkgdesc="A fast C/C++ compiler cache"
url="http://ccache.samba.org/"
arch="all"
license="GPL3+"
depends=""
makedepends=""
subpackages="$pkgname-doc"
source="http://samba.org/ftp/$pkgname/$pkgname-$pkgver.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
}

build () {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	install -Dm 755 ccache "$pkgdir"/usr/bin/ccache || return 1
	install -Dm 644 ccache.1 "$pkgdir"/usr/share/man/man1/ccache.1 || return 1
	mkdir -p "$pkgdir"/usr/lib/ccache/bin
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/cc
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/gcc
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/g++
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/cpp
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/c++
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-cc
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-gcc
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-g++
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-cpp
	ln -sf /usr/bin/ccache "$pkgdir"/usr/lib/ccache/bin/${CHOST}-c++
}

md5sums="8b145fdcab760b7c0d7c85d44d506a50  ccache-3.2.5.tar.gz"
sha256sums="a0e3cf20483e0a13d70398ea2e01a21f544bd15da0de243f1a30758f2481ee03  ccache-3.2.5.tar.gz"
sha512sums="d686c794c6b4759c435f7fd31b0a69cbff425a79066b03d9c0c8444da4b5b206018b5105510de09432477117e4bcd0d348616b4c6505b1325a0d6d9167028e40  ccache-3.2.5.tar.gz"