glpk/glpk.spec

131 lines
3.6 KiB
RPMSpec

#
# spec file for package glpk
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: glpk
Version: 4.47
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: GNU Linear Programming Kit
License: GPL-3.0
Group: Development/Libraries/C and C++
Url: http://www.gnu.org/software/glpk/glpk.html
Source: %{name}-%{version}.tar.bz2
Requires: libglpk0 >= %{version}
BuildRequires: ghostscript
BuildRequires: texlive
%description
The GLPK package is intended for solving large-scale linear
programming, mixed integer programming, and other related problems. It
is a set of routines written in ANSI C and organized in the form of a
callable library.
%package devel
Summary: GNU Linear Programming Kit
Group: Development/Libraries/C and C++
Requires: libglpk0 = %{version}
%description devel
The GLPK package is intended for solving large-scale linear
programming, mixed integer programming, and other related problems. It
is a set of routines written in ANSI C and organized in the form of a
callable library.
%package -n libglpk0
Summary: GNU Linear Programming Kit
Group: Development/Libraries/C and C++
%description -n libglpk0
The GLPK package is intended for solving large-scale linear
programming, mixed integer programming, and other related problems. It
is a set of routines written in ANSI C and organized in the form of a
callable library.
%package doc
Summary: GNU Linear Programming Kit
Group: Development/Libraries/C and C++
Requires: libglpk0 = %{version}
%description doc
The GLPK package is intended for solving large-scale linear
programming, mixed integer programming, and other related problems. It
is a set of routines written in ANSI C and organized in the form of a
callable library.
%prep
%setup -q
%build
%configure --enable-static=no
make %{?jobs:-j%jobs}
%install
%makeinstall
rm $RPM_BUILD_ROOT%{_libdir}/*.la
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/examples
cp examples/*.{mod,c,dat,mps,lp} $RPM_BUILD_ROOT%{_docdir}/%{name}/examples
mkdir $RPM_BUILD_ROOT%{_docdir}/%{name}/doc
dvipdf doc/glpk.dvi doc/glpk.pdf
dvipdf doc/gmpl.dvi doc/gmpl.pdf
cp doc/{*.txt,*.pdf} $RPM_BUILD_ROOT%{_docdir}/%{name}/doc
cp {AUTHORS,ChangeLog,COPYING,NEWS,README} $RPM_BUILD_ROOT%{_docdir}/%{name}
%clean
rm -rf "$RPM_BUILD_ROOT"
%post -n libglpk0 -p /sbin/ldconfig
%postun -n libglpk0 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%dir %{_docdir}/%{name}
%{_docdir}/%{name}/AUTHORS
%{_docdir}/%{name}/ChangeLog
%{_docdir}/%{name}/COPYING
%{_docdir}/%{name}/NEWS
%{_docdir}/%{name}/README
%{_bindir}/glpsol
%files -n libglpk0
%defattr(-,root,root)
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%files doc
%defattr(-,root,root)
%dir %{_docdir}/%{name}
%dir %{_docdir}/%{name}/doc
%doc %{_docdir}/%{name}/doc/*
%dir %{_docdir}/%{name}/examples
%doc %{_docdir}/%{name}/examples/*
%changelog