summaryrefslogtreecommitdiffstats
path: root/main/ccache/APKBUILD
blob: 374792ade95af1feb525c1203915b46a12ebe704 (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.1.10
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="cb3ff52366f53f6a03231efa8f15136c  ccache-3.1.10.tar.gz"
sha256sums="ea37a21529c4d5c700d8dd1533c1d5f61e1e06e4c54c95ff30d5f1830b51fd3b  ccache-3.1.10.tar.gz"
sha512sums="c51cc5e4b70306397cd0ab094400174c9ec9f3ce399a0ec44dddc1cfd103165759e381a9a7ab567aed661f38015a53512b3c4fd699ae273995ee092407b5cfce  ccache-3.1.10.tar.gz"