- Add an autopackage generator script for glpk
authoralpar
Mon, 30 Oct 2006 12:25:43 +0000
changeset 2270ac729a29120e
parent 2269 fb1c634fff29
child 2271 a2ab63454152
- Add an autopackage generator script for glpk
- update autopackage specfile
autopackage/default.apspec.in
scripts/autopackage-glpk
     1.1 --- a/autopackage/default.apspec.in	Mon Oct 30 12:07:52 2006 +0000
     1.2 +++ b/autopackage/default.apspec.in	Mon Oct 30 12:25:43 2006 +0000
     1.3 @@ -8,13 +8,13 @@
     1.4  Packager: Alpar Juttner <alpar@cs.elte.hu>
     1.5  Summary: LEMON library
     1.6  SoftwareVersion: @VERSION@
     1.7 -AutopackageTarget: 0.7
     1.8 +AutopackageTarget: 1.2
     1.9  
    1.10  # Only uncomment InterfaceVersion if your package exposes interfaces to other software,
    1.11  # for instance if it includes DSOs or python/perl modules. See the developer guide for more info,
    1.12  # or ask on autopackage-dev if you don't understand interface versioning in autopackage.
    1.13  #
    1.14 -# InterfaceVersion: 0.0
    1.15 +InterfaceVersion: 1.0
    1.16  
    1.17  PackageVersion: 1
    1.18  
    1.19 @@ -34,7 +34,7 @@
    1.20  
    1.21  [Prepare]
    1.22  # Dependency checking
    1.23 -#require @whatever.you/need 1.0
    1.24 +require @lemon.cs.elte.hu/GLPK:4.11
    1.25  
    1.26  [Install]
    1.27  # Put your installation script here
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/scripts/autopackage-glpk	Mon Oct 30 12:25:43 2006 +0000
     2.3 @@ -0,0 +1,97 @@
     2.4 +#!/bin/bash
     2.5 +
     2.6 +case $# in
     2.7 +    1)
     2.8 +	;;
     2.9 +    *)
    2.10 +	echo "Usage: autopackage-glpk tarfile"
    2.11 +	;;	
    2.12 +esac
    2.13 +
    2.14 +
    2.15 +ORIGTAR=$1
    2.16 +VERSION=`echo ${ORIGTAR/.tar.gz}|tr - ' '|awk '{print $(NF)}'`
    2.17 +
    2.18 +echo "GLPK VERSION: $VERSION"
    2.19 +echo "     RELEASE: $RELEASE"
    2.20 +
    2.21 +
    2.22 +set -e
    2.23 +
    2.24 +function make-dir () {
    2.25 +    if [ ! -d $1 ]; then
    2.26 +	mkdir $1
    2.27 +    fi
    2.28 +}
    2.29 +
    2.30 +tar xzf $ORIGTAR
    2.31 +cd glpk-${VERSION}
    2.32 +mkdir autopackage
    2.33 +
    2.34 +echo '# -*-shell-script-*-
    2.35 +
    2.36 +[Meta]
    2.37 +RootName: @lemon.cs.elte.hu/lemon:$SOFTWAREVERSION
    2.38 +DisplayName: GLPK
    2.39 +ShortName: glpk
    2.40 +Maintainer: The LEMON Developers - http://lemon.cs.elte.hu/
    2.41 +Packager: Alpar Juttner <alpar@cs.elte.hu>
    2.42 +Summary: GLPK LP/MIP solver
    2.43 +
    2.44 +SoftwareVersion: '${VERSION}'
    2.45 +AutopackageTarget: 1.2
    2.46 +
    2.47 +# Only uncomment InterfaceVersion if your package exposes interfaces to other software,
    2.48 +# for instance if it includes DSOs or python/perl modules. See the developer guide for more info,
    2.49 +# or ask on autopackage-dev if you dont understand interface versioning in autopackage.
    2.50 +#
    2.51 +InterfaceVersion: '${VERSION}'
    2.52 +
    2.53 +PackageVersion: 1
    2.54 +
    2.55 +[Description]
    2.56 +The GLPK package is a set of routines written in ANSI C and organized
    2.57 +in the form of a callable library. This package is intended for solving
    2.58 +large-scale linear programming (LP), mixed integer linear programming
    2.59 +(MIP), and other related problems.
    2.60 +
    2.61 +The GLPK package includes the following main components:
    2.62 +
    2.63 +* implementation of the simplex method;
    2.64 +* implementation of the primal-dual interior-point method;
    2.65 +* implementation of the branch-and-bound method;
    2.66 +* application program interface (API);
    2.67 +* GNU MathProg modeling language (a subset of AMPL);
    2.68 +* GLPSOL, a stand-alone LP/MIP solver.
    2.69 +
    2.70 +See GLPK webpage <http://www.gnu.org/software/glpk/glpk.html>.
    2.71 +
    2.72 +[BuildPrepare]
    2.73 +prepareBuild
    2.74 +
    2.75 +[BuildUnprepare]
    2.76 +unprepareBuild
    2.77 +
    2.78 +[Imports]
    2.79 +echo '*' | import
    2.80 +
    2.81 +[Prepare]
    2.82 +# Dependency checking
    2.83 +#require @whatever.you/need 1.0
    2.84 +
    2.85 +[Install]
    2.86 +# Put your installation script here
    2.87 +#installExe bin/*
    2.88 +copyFiles * $PREFIX
    2.89 +
    2.90 +[Uninstall]
    2.91 +# Usually just the following line is enough to uninstall everything
    2.92 +uninstallFromLog
    2.93 +'>autopackage/default.apspec
    2.94 +
    2.95 +makeinstaller
    2.96 +
    2.97 +cp *.package *.meta ..
    2.98 +cd ..
    2.99 +
   2.100 +rm -rf glpk-${VERSION}