COIN-OR::LEMON - Graph Library

source: lemon-0.x/scripts/rpmbuild-glpk @ 2237:5674a5983e1e

Last change on this file since 2237:5674a5983e1e was 2237:5674a5983e1e, checked in by Alpar Juttner, 18 years ago

Improve the configuration environment / repository layout:

  • Update README
  • svn-head -> svnhead version tag change (in favor of rpm build)
  • rpmbuild-glpk: a script to build glpk rpm.
  • Property exe set to *
File size: 1.8 KB
RevLine 
[2237]1#!/bin/bash
2
3case $# in
4    1)
5        RELEASE=1
6        ;;
7    2)
8        RELEASE=$2
9        ;;
10    *)
11        echo "Usage: rpmbuild-glpk tarfile [release]"
12        ;;     
13esac
14
15
16ORIGTAR=$1
17VERSION=`echo ${ORIGTAR/.tar.gz}|tr - ' '|awk '{print $(NF)}'`
18
19echo "GLPK VERSION: $VERSION"
20echo "     RELEASE: $RELEASE"
21
22
23set -e
24
25function make-dir () {
26    if [ ! -d $1 ]; then
27        mkdir $1
28    fi
29}
30
31rm -rf glpk-tmp
32make-dir glpk-tmp
33
34cd glpk-tmp
35
36tar xzf $ORIGTAR
37
38echo 'Summary: GNU Linear Programming toolKit
39Name: glpk
40Version: '${VERSION}'
41Release: '${RELEASE}'
42License: GPL
43URL: http://www.gnu.org/software/glpk/glpk.html
44Source0: %{name}-%{version}.tar.gz
45Group: Development/Libraries
46BuildRoot: %{_tmppath}/%{name}-root
47Provides: glpk = '${VERSION}-${RELEASE}'
48Provides: glpk-devel = '${VERSION}-${RELEASE}'
49
50%description
51The GLPK package is a set of routines written in ANSI C and organized
52in the form of a callable library. This package is intended for solving
53large-scale linear programming (LP), mixed integer linear programming
54(MIP), and other related problems.
55
56The GLPK package includes the following main components:
57
58* implementation of the simplex method;
59* implementation of the primal-dual interior-point method;
60* implementation of the branch-and-bound method;
61* application program interface (API);
62* GNU MathProg modeling language (a subset of AMPL);
63* GLPSOL, a stand-alone LP/MIP solver.
64
65See GLPK webpage <http://www.gnu.org/software/glpk/glpk.html>.
66
67%prep
68%setup -q
69
70%build
71%configure
72make
73
74%install
75rm -rf $RPM_BUILD_ROOT
76make DESTDIR=$RPM_BUILD_ROOT install
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%post -p /sbin/ldconfig
82
83%postun -p /sbin/ldconfig
84
85%files
86%defattr(-,root,root)
87%{_bindir}/glpsol
88%{_bindir}/tspsol
89%{_includedir}
90%{_libdir}/lib*
91%doc AUTHORS COPYING NEWS README
92'>glpk-${VERSION}/glpk.spec
93
94tar czf glpk-${VERSION}.tar.gz glpk-${VERSION}
95rpmbuild -ta glpk-${VERSION}.tar.gz
96
97cd ..
98rm -rf glpk-tmp
Note: See TracBrowser for help on using the repository browser.