| author | deba | 
| Tue, 22 Jul 2008 11:20:06 +0000 | |
| changeset 2616 | 02971275e7bf | 
| permissions | -rwxr-xr-x | 
| alpar@2270 | 1  | 
#!/bin/bash  | 
| alpar@2270 | 2  | 
|
| alpar@2270 | 3  | 
case $# in  | 
| alpar@2270 | 4  | 
1)  | 
| alpar@2270 | 5  | 
;;  | 
| alpar@2270 | 6  | 
*)  | 
| alpar@2270 | 7  | 
echo "Usage: autopackage-glpk tarfile"  | 
| alpar@2270 | 8  | 
;;  | 
| alpar@2270 | 9  | 
esac  | 
| alpar@2270 | 10  | 
|
| alpar@2270 | 11  | 
|
| alpar@2270 | 12  | 
ORIGTAR=$1  | 
| alpar@2270 | 13  | 
VERSION=`echo ${ORIGTAR/.tar.gz}|tr - ' '|awk '{print $(NF)}'`
 | 
| alpar@2270 | 14  | 
|
| alpar@2270 | 15  | 
echo "GLPK VERSION: $VERSION"  | 
| alpar@2270 | 16  | 
echo " RELEASE: $RELEASE"  | 
| alpar@2270 | 17  | 
|
| alpar@2270 | 18  | 
|
| alpar@2270 | 19  | 
set -e  | 
| alpar@2270 | 20  | 
|
| alpar@2270 | 21  | 
function make-dir () {
 | 
| alpar@2270 | 22  | 
if [ ! -d $1 ]; then  | 
| alpar@2270 | 23  | 
mkdir $1  | 
| alpar@2270 | 24  | 
fi  | 
| alpar@2270 | 25  | 
}  | 
| alpar@2270 | 26  | 
|
| alpar@2270 | 27  | 
tar xzf $ORIGTAR  | 
| alpar@2270 | 28  | 
cd glpk-${VERSION}
 | 
| alpar@2270 | 29  | 
mkdir autopackage  | 
| alpar@2270 | 30  | 
|
| alpar@2270 | 31  | 
echo '# -*-shell-script-*-  | 
| alpar@2270 | 32  | 
|
| alpar@2270 | 33  | 
[Meta]  | 
| alpar@2270 | 34  | 
RootName: @lemon.cs.elte.hu/lemon:$SOFTWAREVERSION  | 
| alpar@2270 | 35  | 
DisplayName: GLPK  | 
| alpar@2270 | 36  | 
ShortName: glpk  | 
| alpar@2270 | 37  | 
Maintainer: The LEMON Developers - http://lemon.cs.elte.hu/  | 
| alpar@2270 | 38  | 
Packager: Alpar Juttner <alpar@cs.elte.hu>  | 
| alpar@2270 | 39  | 
Summary: GLPK LP/MIP solver  | 
| alpar@2270 | 40  | 
|
| alpar@2270 | 41  | 
SoftwareVersion: '${VERSION}'
 | 
| alpar@2270 | 42  | 
AutopackageTarget: 1.2  | 
| alpar@2270 | 43  | 
|
| alpar@2270 | 44  | 
# Only uncomment InterfaceVersion if your package exposes interfaces to other software,  | 
| alpar@2270 | 45  | 
# for instance if it includes DSOs or python/perl modules. See the developer guide for more info,  | 
| alpar@2270 | 46  | 
# or ask on autopackage-dev if you dont understand interface versioning in autopackage.  | 
| alpar@2270 | 47  | 
#  | 
| alpar@2270 | 48  | 
InterfaceVersion: '${VERSION}'
 | 
| alpar@2270 | 49  | 
|
| alpar@2270 | 50  | 
PackageVersion: 1  | 
| alpar@2270 | 51  | 
|
| alpar@2270 | 52  | 
[Description]  | 
| alpar@2270 | 53  | 
The GLPK package is a set of routines written in ANSI C and organized  | 
| alpar@2270 | 54  | 
in the form of a callable library. This package is intended for solving  | 
| alpar@2270 | 55  | 
large-scale linear programming (LP), mixed integer linear programming  | 
| alpar@2270 | 56  | 
(MIP), and other related problems.  | 
| alpar@2270 | 57  | 
|
| alpar@2270 | 58  | 
The GLPK package includes the following main components:  | 
| alpar@2270 | 59  | 
|
| alpar@2270 | 60  | 
* implementation of the simplex method;  | 
| alpar@2270 | 61  | 
* implementation of the primal-dual interior-point method;  | 
| alpar@2270 | 62  | 
* implementation of the branch-and-bound method;  | 
| alpar@2270 | 63  | 
* application program interface (API);  | 
| alpar@2270 | 64  | 
* GNU MathProg modeling language (a subset of AMPL);  | 
| alpar@2270 | 65  | 
* GLPSOL, a stand-alone LP/MIP solver.  | 
| alpar@2270 | 66  | 
|
| alpar@2270 | 67  | 
See GLPK webpage <http://www.gnu.org/software/glpk/glpk.html>.  | 
| alpar@2270 | 68  | 
|
| alpar@2270 | 69  | 
[BuildPrepare]  | 
| alpar@2270 | 70  | 
prepareBuild  | 
| alpar@2270 | 71  | 
|
| alpar@2270 | 72  | 
[BuildUnprepare]  | 
| alpar@2270 | 73  | 
unprepareBuild  | 
| alpar@2270 | 74  | 
|
| alpar@2270 | 75  | 
[Imports]  | 
| alpar@2270 | 76  | 
echo '*' | import  | 
| alpar@2270 | 77  | 
|
| alpar@2270 | 78  | 
[Prepare]  | 
| alpar@2270 | 79  | 
# Dependency checking  | 
| alpar@2270 | 80  | 
#require @whatever.you/need 1.0  | 
| alpar@2270 | 81  | 
|
| alpar@2270 | 82  | 
[Install]  | 
| alpar@2270 | 83  | 
# Put your installation script here  | 
| alpar@2270 | 84  | 
#installExe bin/*  | 
| alpar@2270 | 85  | 
copyFiles * $PREFIX  | 
| alpar@2270 | 86  | 
|
| alpar@2270 | 87  | 
[Uninstall]  | 
| alpar@2270 | 88  | 
# Usually just the following line is enough to uninstall everything  | 
| alpar@2270 | 89  | 
uninstallFromLog  | 
| alpar@2270 | 90  | 
'>autopackage/default.apspec  | 
| alpar@2270 | 91  | 
|
| alpar@2270 | 92  | 
makeinstaller  | 
| alpar@2270 | 93  | 
|
| alpar@2270 | 94  | 
cp *.package *.meta ..  | 
| alpar@2270 | 95  | 
cd ..  | 
| alpar@2270 | 96  | 
|
| alpar@2270 | 97  | 
rm -rf glpk-${VERSION}
 |