# $Project: polymake $$Id: polymake.spec 10528 2011-12-28 00:15:48Z gawrilow $ Summary: Algorithms around polytopes and polyhedra Name: polymake Version: 2.11 Release: 1 License: GPL Group: Applications/Sciences/Mathematics URL: http://www.polymake.org/ Vendor: TU Darmstadt, Algorithmic Discrete Mathematics Packager: Ewgenij Gawrilow Icon: as3.gif %define topname %{name}-%{version} %define build_perl_version %(eval "perl_`/usr/bin/perl -V:version`"; echo $perl_version) Source: http://www.polymake.org/lib/exe/fetch.php/download/%{topname}.tar.bz2 Requires: gcc46-c++ Requires: gmp gmp-devel >= 4 Requires: mpfr-devel >= 3.0.0 Requires: java >= 1.5 Requires: perl = %{build_perl_version} Requires: perl(XML::LibXML) perl(XML::SAX::Base) perl(XML::Writer) perl(XML::LibXSLT) Requires: perl(Term::ReadLine::Gnu) BuildRequires: gcc46-c++ BuildRequires: gmp gmp-devel >= 4 BuildRequires: mpfr-devel >= 3.0.0 BuildRequires: boost-devel BuildRequires: libxml2-devel BuildRequires: java-devel >= 1.5 BuildRequires: ant >= 1.7.1 BuildRequires: perl >= 5.8.1 BuildRequires: xhtml-dtd BuildRequires: perl(XML::LibXML) perl(XML::SAX::Base) perl(XML::Writer) perl(ExtUtils::MakeMaker) Prefix: /usr %description Polymake is a versatile tool for the algorithmic treatment of polytopes and polyhedra. It offers an unified interface to a wide variety of algorithms and free software packages from the computational geometry field, such as convex hull computation or visualization tools. %files %attr(-, bin, bin) /usr/bin/polymake %attr(-, bin, bin) /usr/bin/polymake-config %attr(-, bin, bin) /usr/include/polymake %attr(-, bin, bin) /usr/share/polymake %attr(-, bin, bin) %dir /usr/%{_lib}/polymake %attr(-, bin, bin) /usr/%{_lib}/polymake/lib %attr(-, bin, bin) /usr/%{_lib}/polymake/perlx %attr(-, bin, bin) /usr/%{_lib}/libpolymake.so %attr(-, bin, bin) %config /usr/%{_lib}/polymake/conf.make %attr(-, bin, bin) %doc /usr/share/doc/packages/polymake %define guess_prefix : ${RPM_INSTALL_PREFIX:=%{_prefix}} ${RPM_INSTALL_PREFIX:=$RPM_INSTALL_PREFIX0} ${RPM_INSTALL_PREFIX:=/usr} %post %{guess_prefix} if [ "$RPM_INSTALL_PREFIX" != /usr ]; then /usr/bin/perl -i -p -e 's|(PREFIX=).*|$1'$RPM_INSTALL_PREFIX'|' $RPM_INSTALL_PREFIX/%{_lib}/polymake/conf.make fi %prep %setup -q -n %{topname} %define ProjectTop %{_builddir}/%{topname} %build Cflags="$(perl -e '$_=q{'"$RPM_OPT_FLAGS"'}; s/(?:^|\s)-(?:g|O\d)(?=\s|$)//g; print;')" if [ "%{_host_cpu}" = x86_64 -a "%{_target_cpu}" != x86_64 ]; then LDflags="LDFLAGS=-m32" fi ./configure --prefix=/usr --libdir=/usr/%{_lib} --libexecdir=/usr/%{_lib}/polymake --docdir=/usr/share/doc/packages/%{name} \ --build=%{_target_cpu} --without-prereq \ CC=gcc CXX=g++ CFLAGS="$Cflags" CXXFLAGS="$Cflags" $LDflags make Arch=%{_target_cpu} %{?_smp_mflags}%{?!_smp_mflags:%(NCPUS=`grep -c '^processor' /proc/cpuinfo`; [ -n "$NCPUS" -a "$NCPUS" -gt 1 ] && echo -j$NCPUS )} ProcessDep=n %install make Arch=%{_target_cpu} PREFIX=/usr ${RPM_BUILD_ROOT:+DESTDIR=$RPM_BUILD_ROOT} install release-docs rm -rf $RPM_BUILD_ROOT/usr/share/doc/packages/%{name}/inc %define __find_provides %{ProjectTop}/support/find-provides %define __find_requires %{ProjectTop}/support/find-requires