alpar@2270: #!/bin/bash alpar@2270: alpar@2270: case $# in alpar@2270: 1) alpar@2270: ;; alpar@2270: *) alpar@2270: echo "Usage: autopackage-glpk tarfile" alpar@2270: ;; alpar@2270: esac alpar@2270: alpar@2270: alpar@2270: ORIGTAR=$1 alpar@2270: VERSION=`echo ${ORIGTAR/.tar.gz}|tr - ' '|awk '{print $(NF)}'` alpar@2270: alpar@2270: echo "GLPK VERSION: $VERSION" alpar@2270: echo " RELEASE: $RELEASE" alpar@2270: alpar@2270: alpar@2270: set -e alpar@2270: alpar@2270: function make-dir () { alpar@2270: if [ ! -d $1 ]; then alpar@2270: mkdir $1 alpar@2270: fi alpar@2270: } alpar@2270: alpar@2270: tar xzf $ORIGTAR alpar@2270: cd glpk-${VERSION} alpar@2270: mkdir autopackage alpar@2270: alpar@2270: echo '# -*-shell-script-*- alpar@2270: alpar@2270: [Meta] alpar@2270: RootName: @lemon.cs.elte.hu/lemon:$SOFTWAREVERSION alpar@2270: DisplayName: GLPK alpar@2270: ShortName: glpk alpar@2270: Maintainer: The LEMON Developers - http://lemon.cs.elte.hu/ alpar@2270: Packager: Alpar Juttner alpar@2270: Summary: GLPK LP/MIP solver alpar@2270: alpar@2270: SoftwareVersion: '${VERSION}' alpar@2270: AutopackageTarget: 1.2 alpar@2270: alpar@2270: # Only uncomment InterfaceVersion if your package exposes interfaces to other software, alpar@2270: # for instance if it includes DSOs or python/perl modules. See the developer guide for more info, alpar@2270: # or ask on autopackage-dev if you dont understand interface versioning in autopackage. alpar@2270: # alpar@2270: InterfaceVersion: '${VERSION}' alpar@2270: alpar@2270: PackageVersion: 1 alpar@2270: alpar@2270: [Description] alpar@2270: The GLPK package is a set of routines written in ANSI C and organized alpar@2270: in the form of a callable library. This package is intended for solving alpar@2270: large-scale linear programming (LP), mixed integer linear programming alpar@2270: (MIP), and other related problems. alpar@2270: alpar@2270: The GLPK package includes the following main components: alpar@2270: alpar@2270: * implementation of the simplex method; alpar@2270: * implementation of the primal-dual interior-point method; alpar@2270: * implementation of the branch-and-bound method; alpar@2270: * application program interface (API); alpar@2270: * GNU MathProg modeling language (a subset of AMPL); alpar@2270: * GLPSOL, a stand-alone LP/MIP solver. alpar@2270: alpar@2270: See GLPK webpage . alpar@2270: alpar@2270: [BuildPrepare] alpar@2270: prepareBuild alpar@2270: alpar@2270: [BuildUnprepare] alpar@2270: unprepareBuild alpar@2270: alpar@2270: [Imports] alpar@2270: echo '*' | import alpar@2270: alpar@2270: [Prepare] alpar@2270: # Dependency checking alpar@2270: #require @whatever.you/need 1.0 alpar@2270: alpar@2270: [Install] alpar@2270: # Put your installation script here alpar@2270: #installExe bin/* alpar@2270: copyFiles * $PREFIX alpar@2270: alpar@2270: [Uninstall] alpar@2270: # Usually just the following line is enough to uninstall everything alpar@2270: uninstallFromLog alpar@2270: '>autopackage/default.apspec alpar@2270: alpar@2270: makeinstaller alpar@2270: alpar@2270: cp *.package *.meta .. alpar@2270: cd .. alpar@2270: alpar@2270: rm -rf glpk-${VERSION}