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