File: buildRelease.sh

package info (click to toggle)
canu 1.7.1+dfsg-1~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 7,680 kB
  • sloc: cpp: 66,708; perl: 13,682; ansic: 4,020; makefile: 627; sh: 472; python: 39
file content (56 lines) | stat: -rw-r--r-- 1,574 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh

version=$1

if [ x$version = x ] ; then
  echo usage: $0 numeric-version
  exit
fi

#  From the tarball

if [ ! -e canu-$version.tar.gz ] ; then
  echo Fetch.
  curl -L -R -o canu-$version.tar.gz https://github.com/marbl/canu/archive/v$version.tar.gz
fi
if [ ! -d canu-$versioin ] ; then
  echo Unpack.
  gzip -dc canu-$version.tar.gz | tar -xf -
fi
cd canu-$version

#  From the repo

#git clone git@github.com:marbl/canu.git
#mv canu canu-$version
#cd canu-$version
#git tag v$version
#git checkout v$version

echo Build MacOS.
cd src
gmake -j 12 > ../Darwin-amd64.out 2>&1
cd ../..

rm -f canu-$version/linux.sh

echo >> canu-$version/linux.sh  \#\!/bin/bash
#echo >> canu-$version/linux.sh  yum install -y git
echo >> canu-$version/linux.sh  cd /build/canu-$version/src
echo >> canu-$version/linux.sh  gmake -j 12 \> ../Linux-amd64.out 2\>\&1
echo >> canu-$version/linux.sh  cd ../..
echo >> canu-$version/linux.sh  rm -rf canu-$version/Darwin-amd64/obj
echo >> canu-$version/linux.sh  rm -rf canu-$version/Linux-amd64/obj
echo >> canu-$version/linux.sh  tar -cf canu-$version.Darwin-amd64.tar canu-$version/README* canu-$version/Darwin-amd64
echo >> canu-$version/linux.sh  tar -cf canu-$version.Linux-amd64.tar  canu-$version/README* canu-$version/Linux-amd64

chmod 755 canu-$version/linux.sh

echo Build Linux and make tarballs.
docker run -v `pwd`:/build -t -i --rm phusion/holy-build-box-64:latest /hbb_exe/activate-exec bash /build/canu-$version/linux.sh

echo Compress.
xz -9v canu-$version.Darwin-amd64.tar
xz -9v canu-$version.Linux-amd64.tar

exit