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