config 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. version: '[% c("abbrev") %]'
  2. git_url: https://github.com/hlandau/service.git
  3. git_hash: 0496f910e39ef577ba805f512f6e1b80d652c4b9
  4. filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
  5. build: '[% c("projects/go/var/build_go_lib") %]'
  6. var:
  7. container:
  8. use_container: 1
  9. go_lib: gopkg.in/hlandau/service.v2
  10. go_lib_deps:
  11. - gosvcutils
  12. - goeasyconfig
  13. build_go_lib_pre: |
  14. [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
  15. tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
  16. export PATH="/var/tmp/dist/binutils/bin:$PATH"
  17. export CGO_ENABLED=1
  18. [% IF c("var/linux-cross") %]
  19. # libcap includes
  20. mkdir -p /var/tmp/dist/gcc-cross/[% c("var/crosstarget") %]/include/sys/
  21. cp /usr/include/sys/capability.h /var/tmp/dist/gcc-cross/[% c("var/crosstarget") %]/include/sys/
  22. # libcap libraries
  23. cp /lib/[% c("var/crosstarget") %]/libcap.* /var/tmp/dist/gcc-cross/[% c("var/crosstarget") %]/lib/
  24. cp /usr/lib/[% c("var/crosstarget") %]/libcap.* /var/tmp/dist/gcc-cross/[% c("var/crosstarget") %]/lib/
  25. cp /lib/[% c("var/crosstarget") %]/libattr.* /var/tmp/dist/gcc-cross/[% c("var/crosstarget") %]/lib/
  26. # libcap search paths
  27. export CGO_LDFLAGS="$CGO_LDFLAGS -Wl,-rpath-link=/var/tmp/dist/gcc-cross/[% c("var/crosstarget") %]/lib/"
  28. [% END %]
  29. targets:
  30. linux:
  31. var:
  32. arch_deps:
  33. - 'libcap-dev:[% c("var/arch_debian") %]'
  34. input_files:
  35. - project: container-image
  36. - name: go
  37. project: go
  38. - name: '[% c("var/compiler") %]'
  39. project: '[% c("var/compiler") %]'
  40. - name: binutils
  41. project: binutils
  42. - name: gosvcutils
  43. project: gosvcutils
  44. - name: goeasyconfig
  45. project: goeasyconfig