Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
pkg-scripts/concorde-03.12.19-0.build.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
65 lines (46 sloc)
1.5 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -xe | |
PKG=concorde | |
VERSION=03.12.19 | |
URL=http://www.math.uwaterloo.ca/tsp/concorde/downloads/codes/src/co031219.tgz | |
SRC=co031219.tgz | |
SRC_MD5=3476e01ae89b591bf7b329b2f5aa0353 | |
BUILD=0 | |
PREFIX=/pkg/$PKG-$VERSION-$BUILD | |
# PREFIX=/dev/shm/pkg/$PKG-$VERSION-$BUILD | |
mkdir -p $PREFIX | |
cat >$PREFIX/profile <<-EOF | |
PATH=$PREFIX/bin:\$PATH | |
EOF | |
source $PREFIX/profile | |
mkdir -p $PREFIX/build | |
cd $PREFIX/build | |
test -e $SRC || wget $URL | |
test $SRC_MD5 = $(md5sum $SRC|cut -d' ' -f1) | |
test -d concorde || tar -xf $SRC | |
mkdir -p concorde_build | |
cd concorde_build | |
# Note: there is no 'install' target, thus prefix is unneeded. | |
../concorde/configure | |
nice -12 make -j $(nproc) | |
# IMHO this one might be of some use, so add it. | |
cd HELDKARP | |
make heldkarp | |
cd .. | |
install -m 755 -d $PREFIX/bin | |
for E in `find -perm -u=x -type f -exec file {} \; | grep 'ELF 64-bit LSB executable' | cut -f1 -d:` ; do | |
install -m 755 $E $PREFIX/bin | |
done | |
install -m 755 -d $PREFIX/doc | |
cd $PREFIX/doc | |
wget https://wwwproxy.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/tsp/ALL_tsp.tar.gz | |
cat <<-DOC > README | |
Concorde is a computer code for the symmetric traveling salesman problem (TSP) | |
and some related network optimization problems. The code is written in the | |
ANSI C programming language and it is available for academic research use. | |
Links: | |
http://www.math.uwaterloo.ca/tsp/index.html | |
http://www.math.uwaterloo.ca/tsp/concorde/index.html | |
ALL_tsp.tar.gz is a set of sample problems for the tools in this package. | |
DOC | |
exit |