Advertisement
Guest User

ccache-git PKGBUILD

a guest
Dec 26th, 2018
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. _pkgname=ccache
  2. pkgname=$_pkgname-git
  3. pkgver=v3.5.34.g066f6f2
  4. pkgrel=1
  5. _realver=3.5
  6. pkgdesc='Compiler cache that speeds up recompilation by caching previous compilations'
  7. url='https://ccache.samba.org/'
  8. arch=('x86_64')
  9. license=('GPL3')
  10. depends=('zlib')
  11. source=("git+https://github.com/ccache/ccache.git")
  12. sha256sums=('SKIP')
  13.  
  14. pkgver() {
  15. cd "$srcdir/$_pkgname"
  16. git describe --always | sed 's|-|.|g'
  17. }
  18.  
  19. prepare() {
  20. cd "$srcdir/$_pkgname"
  21. }
  22.  
  23. build() {
  24. cd "$srcdir/$_pkgname"
  25. ./autogen.sh
  26. ./configure \
  27. --prefix=/usr \
  28. --sysconfdir=/etc
  29. make
  30. }
  31.  
  32. check() {
  33. cd "$srcdir/$_pkgname"
  34. make check
  35. }
  36.  
  37. package() {
  38. cd "$srcdir/$_pkgname"
  39.  
  40. install -Dm 755 ccache -t "${pkgdir}/usr/bin"
  41. install -Dm 644 doc/{AUTHORS,MANUAL,NEWS}.adoc README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  42.  
  43. install -d "${pkgdir}/usr/lib/ccache/bin"
  44. local _prog
  45. for _prog in gcc g++ c++; do
  46. ln -s /usr/bin/ccache "${pkgdir}/usr/lib/ccache/bin/$_prog"
  47. ln -s /usr/bin/ccache "${pkgdir}/usr/lib/ccache/bin/${CHOST}-$_prog"
  48. done
  49. for _prog in cc clang clang++; do
  50. ln -s /usr/bin/ccache "${pkgdir}/usr/lib/ccache/bin/$_prog"
  51. done
  52. }
  53.  
  54. # vim: ts=2 sw=2 et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement