From 022071b2b5f774c5a9c1fb9deef3ee160c48df81 Mon Sep 17 00:00:00 2001 From: JeremyRand Date: Mon, 24 Jun 2019 05:30:21 +0000 Subject: [PATCH] Add ncprop279 Fixes https://github.com/namecoin/ncdns-repro/issues/35 --- projects/ncprop279/build | 45 +++++++++++++++++++++++++++++++++++++++ projects/ncprop279/config | 33 ++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 projects/ncprop279/build create mode 100644 projects/ncprop279/config diff --git a/projects/ncprop279/build b/projects/ncprop279/build new file mode 100644 index 0000000..bd3262a --- /dev/null +++ b/projects/ncprop279/build @@ -0,0 +1,45 @@ +#!/bin/bash +[% c("var/set_default_env") -%] +[% pc('go', 'var/setup', { go_tarfile => c('input_files_by_name/go') }) %] +export CGO_ENABLED=[% c("var/cgo") %] +distdir=/var/tmp/dist/[% project %] +mkdir -p $distdir + +[% FOREACH dep = c("var/go_lib_deps") -%] + tar -C /var/tmp/dist -xf [% c('input_files_by_name/' _ dep) %] +[% END -%] + +mkdir -p $GOPATH/src/github.com/namecoin +tar -C $GOPATH/src/github.com/namecoin -xf [% project %]-[% c('version') %].tar.gz +mv $GOPATH/src/github.com/namecoin/ncprop279-[% c('version') %] $GOPATH/src/github.com/namecoin/ncprop279 + +go install -ldflags '-s' github.com/namecoin/ncprop279 + +#mkdir -p /var/tmp/build +#tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz +#cd /var/tmp/build/[% project %]-[% c('version') %] + +#mkdir -p "$GOPATH/src/github.com/namecoin" +#ln -sf "$PWD" "$GOPATH/src/github.com/namecoin/ncdns" + +#mkdir -p out +#cd out +#for x in .. ../ncdumpzone ../generate_nmc_cert; do +# go build -ldflags '-s' "$x" +#done + +[% IF c("var/linux-x86_64") -%] + GOPATHBIN="${GOPATH}/bin" +[% ELSE -%] + GOPATHBIN="${GOPATH}/bin/${GOOS}_${GOARCH}" +[% END -%] + +ls $GOPATHBIN + +cp -a $GOPATHBIN/ncprop279[% IF c("var/windows") %].exe[% END %] $distdir/ + +cd $distdir +[% c('tar', { + tar_src => [ '.' ], + tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'), + }) %] diff --git a/projects/ncprop279/config b/projects/ncprop279/config new file mode 100644 index 0000000..5271651 --- /dev/null +++ b/projects/ncprop279/config @@ -0,0 +1,33 @@ +version: '[% c("abbrev") %]' +git_url: https://github.com/namecoin/ncprop279.git +git_hash: 'd72977987d841fa0b7fa51108a868263e7f4a9a0' +filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz' + +var: + container: + use_container: 1 + go_lib_deps: + - github.com,miekg,dns + - gopkg.in,hlandau,easyconfig.v1 + - gopkg.in,hlandau,madns.v1 + - ncdns + cgo: 0 + build_go_lib_pre: | + export CGO_ENABLED=[% c("var/cgo") %] + +input_files: + - project: container-image + - name: go + project: go + - name: github.com,miekg,dns + project: github.com,miekg,dns + - name: gopkg.in,hlandau,easyconfig.v1 + project: gopkg.in,hlandau,easyconfig.v1 + - name: gopkg.in,hlandau,madns.v1 + project: gopkg.in,hlandau,madns.v1 + - name: ncdns + project: ncdns + # Build ncdns as a library, not an executable. + # TODO: refactor this once our build_go_lib executable patch is merged by upstream Tor + var: + go_lib_no_output: 0