aboutsummaryrefslogtreecommitdiffstats
path: root/main/ccache/APKBUILD
blob: 9b7f3eb9c6755e1c3bd5dfada2a0036699260fb8 (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.7
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="0bd544068656ff447f052402674bda3e  ccache-3.2.7.tar.gz"
sha256sums="fa26c1ff9df6df8c89da1a673ecee82b99bd680f950abdf2541b35f93827c28a  ccache-3.2.7.tar.gz"
sha512sums="86cb39bcc73d386b821dc663d8ac365d0dbff53bc9d43a0f088e240da5386feed51758044d231294cc280558405f7240885bdba21b2c04d2e0416ac9a1eb75b9  ccache-3.2.7.tar.gz"