1 Star 0 Fork 6

chxssg / glpk

forked from src-openEuler / glpk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
glpk.spec 3.09 KB
一键复制 编辑 原始数据 按行查看 历史
chxssg 提交于 2020-07-28 11:28 . init glpk
Name: glpk
Version: 4.65
Release: 1
Summary: GNU Linear Programming Kit
License: GPLv3+
URL: http://www.gnu.org/software/glpk/glpk.html
Source0: ftp://ftp.gnu.org/gnu/glpk/glpk-%{version}.tar.gz
# Un-bundle zlib (#1102855). Upstream won't accept; they want to be
# ANSI-compatible, and zlib makes POSIX assumptions.
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: gmp-devel
BuildRequires: pkgconfig(libiodbc)
BuildRequires: pkgconfig(mariadb)
BuildRequires: pkgconfig(zlib)
BuildRequires: suitesparse-devel
Provides: bundled(minisat) = 1.14.1
%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.
%package doc
Summary: Documentation for %{name}
%description doc
Documentation subpackage for %{name}.
%package devel
Summary: Development headers and files for GLPK
Requires: %{name}%{_isa} = %{version}-%{release}
%description devel
The glpk-devel package contains libraries and headers for developing
applications which use GLPK (GNU Linear Programming Kit).
%package utils
Summary: GLPK-related utilities and examples
Requires: %{name}%{_isa} = %{version}-%{release}
%description utils
The glpk-utils package contains the standalone solver program glpsol
that uses GLPK (GNU Linear Programming Kit).
%prep
%setup -q
%build
export LIBS=-ldl
# Need to rebuild src/Makefile.in from src/Makefile.am
autoreconf -ifs
%configure --disable-static --with-gmp \
--enable-dl=dlfcn --enable-odbc --enable-mysql
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
# -Wl,--as-needed after all the libraries.
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
-e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
-i libtool
make %{?_smp_mflags}
%install
make install prefix=$RPM_BUILD_ROOT%{_prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} libdir=$RPM_BUILD_ROOT%{_libdir} \
includedir=$RPM_BUILD_ROOT%{_includedir}
%check
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$RPM_BUILD_ROOT%{_libdir}"
make check
## Clean up directories that are included in docs
rm -Rf examples/{.deps,.libs,Makefile*,glpsol,glpsol.o} doc/*.tex
%ldconfig_scriptlets
%files
%doc README
%license COPYING
%{_libdir}/*.so.*
%exclude %{_libdir}/*.la
%files devel
%doc ChangeLog AUTHORS NEWS
%{_includedir}/glpk.h
%{_libdir}/*.so
%files utils
%{_bindir}/*
%files doc
%doc doc examples
%changelog
* Tue Jul 28 2020 chxssg <chxssg@qq.com> - 4.65-1
- init glpk
1
https://gitee.com/chxssg/glpk.git
git@gitee.com:chxssg/glpk.git
chxssg
glpk
glpk
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891