Name: glpk Version: 4.39 Release: 1 Summary: GNU Linear Programming Kit Group: System Environment/Libraries License: GPLv3 URL: http://www.gnu.org/software/%{name}/%{name}.html Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz Source1: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz.sig BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: gmp %description The GLPK (GNU Linear Programming Kit) package is intended for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems. It is a set of routines written in ANSI C and organized in the form of a callable library. GLPK supports the GNU MathProg language, which is a subset of the AMPL language. The GLPK package includes the following main components: * Revised simplex method. * Primal-dual interior point method. * Branch-and-bound method. * Translator for GNU MathProg. * Application program interface (API). * Stand-alone LP/MIP solver. The library is available as 32-bit and 64-bit. %package devel Summary: Development headers and files for GLPK Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: gmp-devel %description devel The glpk-devel package contains libraries and headers for developing applications which use GLPK (GNU Linear Programming Kit). If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %package utils Summary: GLPK-related utilities and examples Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description utils The glpk-utils package contains the standalone solver programs glpksol and tspsol that use GLPK (GNU Linear Programming Kit). %prep %setup -q %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="cc -q64" ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static make %{?_smp_mflags} cp src/.libs/libglpk.so.0 . make distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q src/.libs/libglpk.a ./libglpk.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make install prefix=${RPM_BUILD_ROOT}%{_prefix} \ bindir=${RPM_BUILD_ROOT}%{_bindir} libdir=${RPM_BUILD_ROOT}%{_libdir} \ includedir=${RPM_BUILD_ROOT}%{_includedir}/%name /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # clean up directories that are included in docs make clean rm -Rf examples/.deps examples/Makefile* doc/*.dvi doc/*.latex ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc AUTHORS ChangeLog COPYING NEWS README doc %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system) %doc AUTHORS ChangeLog COPYING NEWS README doc %{_includedir}/* %{_libdir}/*.la /usr/include/* /usr/lib/*.la %files utils %defattr(-,root,system) %doc COPYING examples %{_bindir}/* /usr/bin/* %changelog * Mon Sep 07 2009 Michael Perzl - 4.39-1 - updated to version 4.39 * Tue Jun 16 2009 Michael Perzl - 4.38-1 - updated to version 4.38 * Tue Apr 07 2009 Michael Perzl - 4.37-1 - updated to version 4.37 * Wed Mar 11 2009 Michael Perzl - 4.36-1 - updated to version 4.36 * Tue Dec 30 2008 Michael Perzl - 4.34-1 - updated to version 4.34 * Thu Nov 06 2008 Michael Perzl - 4.33-1 - updated to version 4.33 * Thu Aug 14 2008 Michael Perzl - 4.30-1 - updated to version 4.30 * Fri Jul 11 2008 Michael Perzl - 4.29-1 - updated to version 4.29 * Thu May 15 2008 Michael Perzl - 4.28-1 - updated to version 4.28 * Tue Mar 04 2008 Michael Perzl - 4.27-1 - updated to v4.27 * Fri Feb 22 2008 Michael Perzl - 4.26-1 - first version for AIX V5.1 and higher