summaryrefslogtreecommitdiffstats
path: root/main/ccache/APKBUILD
blob: 456010520b45f1cda4c0e2767cfd8ee6304a7f5c (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ccache
pkgver=3.1.9
pkgrel=1
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
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="367916e4ecba4968f77f59a378e61458  ccache-3.1.9.tar.gz"
sha256sums="a2270654537e4b736e437975e0cb99871de0975164a509dee34cf91e36eeb447  ccache-3.1.9.tar.gz"
sha512sums="735909e36d9d52efd917d6ebe35ecbfa57693576deb8b960677a02d2591da3b87831b7970b3e50a5f8eac1b9268d0e1d3fc35336291d825299dc275ebb06e18b  ccache-3.1.9.tar.gz"