Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 5983347c94c1fce4b82dbd1f51ccc4c5 > files > 3

glpk-4.4-2mdk.src.rpm

%define	name	glpk
%define	version	4.4
%define	release	2mdk

%define lib_name_orig libglpk
%define lib_major 4.4
%define lib_name              %mklibname glpk %{lib_major}
%define lib_name_devel        %mklibname glpk %{lib_major} -d
%define lib_name_static_devel %mklibname glpk %{lib_major} -s -d

Summary:	GNU Linear Programming Kit
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPL
Group:		Sciences/Mathematics
URL:		http://www.gnu.org/software/glpk/glpk.html
Packager:	Yoshinori Okuji <yo@nexedi.com>
Source0:	%{name}-%{version}.tar.bz2
Patch1:		glpk-4.4_shared_lib.patch.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root

%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.

%package -n %{lib_name}
Summary:	Shared library and utility for LP and MIP
Group:		Sciences/Mathematics
Obsoletes:	%{name}
Provides: %{lib_name_orig} = %{version}-%{release} %{name} = %{version}-%{release}

%description -n %{lib_name}
This package contains the library needed to run programs dynamically
linked with GLPK and the utilitity glpsol.

%package -n %{lib_name_devel}
Summary:	Header files for development with GLPK
Group:		Development/C
Requires:	%{lib_name} = %{version}
Obsoletes:	%{name}-devel
Provides: %{lib_name_orig}-devel = %{version}-%{release} %{name}-devel = %{version}-%{release}

%description -n %{lib_name_devel}
This package contains the headers needed to develop applications using
GLPK.

%package -n %{lib_name_static_devel}
Summary: Static libraries for GLPK
Group: Development/C
Requires: %{lib_name_devel} = %{version}

%description -n %{lib_name_static_devel}
This package contains the static libraries necessary for developing
programs which use GLPK. Install this package if you need to statically
link your program or library.

%prep

%setup -q
%patch1 -p1

%build

# Trust Knuth to produce a single-pass compiler for a multiple-pass language.
cd doc
pdflatex -interaction=nonstopmode -file-line-error-style lang.latex && \
pdflatex -interaction=nonstopmode -file-line-error-style lang.latex && \
pdflatex -interaction=nonstopmode -file-line-error-style lang.latex
pdflatex -interaction=nonstopmode -file-line-error-style refman.latex && \
pdflatex -interaction=nonstopmode -file-line-error-style refman.latex && \
pdflatex -interaction=nonstopmode -file-line-error-style refman.latex
cd ..

%configure
%make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
# Clean out the examples directory so we can include it wholesale in %doc.
make -C examples distclean
rm -rf examples/Makefile*

%clean
rm -rf %{buildroot}

%post -n %{lib_name} -p /sbin/ldconfig
%postun -n %{lib_name} -p /sbin/ldconfig

%files -n %{lib_name}
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README
%{_libdir}/*.so.*
%attr(0755,root,root) %{_bindir}/glpsol

%files -n %{lib_name_static_devel}
%defattr(-, root, root)
%{_libdir}/*.a

%files -n %{lib_name_devel}
%defattr(-, root, root)
%doc examples doc/bench.txt doc/GLPK_FAQ.txt AUTHORS COPYING ChangeLog INSTALL NEWS README
%{_includedir}/*.h
%{_libdir}/*.la
%{_libdir}/*.so

%changelog
* Fri Feb 27 2004 Yoshinori Okuji <yo@nexedi.com> 4.4-2mdk
- Split the package into 3 packages
- Add support for making a shared library

* Mon Jan 26 2004 Lenny Cartier <lenny@mandrakesoft.com> 4.4-1mdk
- from Omer Shenker <glpk@omershenker.net> :
        - Specfile for Mandrake
        - gz to bz2 compression