File: setup

package info (click to toggle)
aptly 1.6.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,928 kB
  • sloc: python: 10,398; sh: 252; makefile: 184
file content (20 lines) | stat: -rwxr-xr-x 507 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -eux

TMP_DIR="$(mktemp -d)"
APTLY_SRC_DIR="${TMP_DIR}/src/github.com/aptly-dev/aptly"

# apply patches
dpkg-source --before-build .

# copy source to GOPATH-compatible dir
mkdir -p $(dirname $APTLY_SRC_DIR)
cp -a . $APTLY_SRC_DIR

# not in a git tree, so we need to generate the version ourselves
dpkg-parsechangelog --show-field Version | perl -pe 's/\n//' > ${APTLY_SRC_DIR}/VERSION

# use only apt-supplied go libraries
export GOPATH="${TMP_DIR}:/usr/share/gocode"
export GO111MODULE=off