scripts/autopackage-glpk
changeset 2270 ac729a29120e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/autopackage-glpk	Mon Oct 30 12:25:43 2006 +0000
     1.3 @@ -0,0 +1,97 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +case $# in
     1.7 +    1)
     1.8 +	;;
     1.9 +    *)
    1.10 +	echo "Usage: autopackage-glpk tarfile"
    1.11 +	;;	
    1.12 +esac
    1.13 +
    1.14 +
    1.15 +ORIGTAR=$1
    1.16 +VERSION=`echo ${ORIGTAR/.tar.gz}|tr - ' '|awk '{print $(NF)}'`
    1.17 +
    1.18 +echo "GLPK VERSION: $VERSION"
    1.19 +echo "     RELEASE: $RELEASE"
    1.20 +
    1.21 +
    1.22 +set -e
    1.23 +
    1.24 +function make-dir () {
    1.25 +    if [ ! -d $1 ]; then
    1.26 +	mkdir $1
    1.27 +    fi
    1.28 +}
    1.29 +
    1.30 +tar xzf $ORIGTAR
    1.31 +cd glpk-${VERSION}
    1.32 +mkdir autopackage
    1.33 +
    1.34 +echo '# -*-shell-script-*-
    1.35 +
    1.36 +[Meta]
    1.37 +RootName: @lemon.cs.elte.hu/lemon:$SOFTWAREVERSION
    1.38 +DisplayName: GLPK
    1.39 +ShortName: glpk
    1.40 +Maintainer: The LEMON Developers - http://lemon.cs.elte.hu/
    1.41 +Packager: Alpar Juttner <alpar@cs.elte.hu>
    1.42 +Summary: GLPK LP/MIP solver
    1.43 +
    1.44 +SoftwareVersion: '${VERSION}'
    1.45 +AutopackageTarget: 1.2
    1.46 +
    1.47 +# Only uncomment InterfaceVersion if your package exposes interfaces to other software,
    1.48 +# for instance if it includes DSOs or python/perl modules. See the developer guide for more info,
    1.49 +# or ask on autopackage-dev if you dont understand interface versioning in autopackage.
    1.50 +#
    1.51 +InterfaceVersion: '${VERSION}'
    1.52 +
    1.53 +PackageVersion: 1
    1.54 +
    1.55 +[Description]
    1.56 +The GLPK package is a set of routines written in ANSI C and organized
    1.57 +in the form of a callable library. This package is intended for solving
    1.58 +large-scale linear programming (LP), mixed integer linear programming
    1.59 +(MIP), and other related problems.
    1.60 +
    1.61 +The GLPK package includes the following main components:
    1.62 +
    1.63 +* implementation of the simplex method;
    1.64 +* implementation of the primal-dual interior-point method;
    1.65 +* implementation of the branch-and-bound method;
    1.66 +* application program interface (API);
    1.67 +* GNU MathProg modeling language (a subset of AMPL);
    1.68 +* GLPSOL, a stand-alone LP/MIP solver.
    1.69 +
    1.70 +See GLPK webpage <http://www.gnu.org/software/glpk/glpk.html>.
    1.71 +
    1.72 +[BuildPrepare]
    1.73 +prepareBuild
    1.74 +
    1.75 +[BuildUnprepare]
    1.76 +unprepareBuild
    1.77 +
    1.78 +[Imports]
    1.79 +echo '*' | import
    1.80 +
    1.81 +[Prepare]
    1.82 +# Dependency checking
    1.83 +#require @whatever.you/need 1.0
    1.84 +
    1.85 +[Install]
    1.86 +# Put your installation script here
    1.87 +#installExe bin/*
    1.88 +copyFiles * $PREFIX
    1.89 +
    1.90 +[Uninstall]
    1.91 +# Usually just the following line is enough to uninstall everything
    1.92 +uninstallFromLog
    1.93 +'>autopackage/default.apspec
    1.94 +
    1.95 +makeinstaller
    1.96 +
    1.97 +cp *.package *.meta ..
    1.98 +cd ..
    1.99 +
   1.100 +rm -rf glpk-${VERSION}