From 7aff518e204c5fa0d0df5886065fcf56ec6c8a6c Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 12 Jul 2016 17:35:33 +0200 Subject: [PATCH] Add ccache to build it with correct CHOST --- ccache/default/PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 ccache/default/PKGBUILD diff --git a/ccache/default/PKGBUILD b/ccache/default/PKGBUILD new file mode 100644 index 00000000..d3ba21b2 --- /dev/null +++ b/ccache/default/PKGBUILD @@ -0,0 +1,41 @@ +# $Id: PKGBUILD 171533 2016-04-21 19:25:15Z arojas $ +# Maintainer: Giovanni Scafora +# Contributor: Tom Newsom + +pkgname=ccache +pkgver=3.2.5 +pkgrel=1.1 +pkgdesc="A compiler cache" +arch=('i686' 'x86_64') +url="http://ccache.samba.org/" +license=('GPL3') +depends=('zlib') +source=("http://samba.org/ftp/${pkgname}/${pkgname}-${pkgver}.tar.xz") +md5sums=('270c9ad0631c6e34f5fa84f0d9385f95') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --sysconfdir=/etc + + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + install -Dm 755 ccache ${pkgdir}/usr/bin/ccache + install -Dm 644 ccache.1 ${pkgdir}/usr/share/man/man1/ccache.1 + + install -d ${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++ +}