[metis] Initial import (#920518)
Antonio Trande
sagitter at fedoraproject.org
Sun Mar 24 15:30:10 UTC 2013
commit 33efe13f008a1808094fce524ef51a5a3ab33eac
Author: sagitter <anto.trande at gmail.com>
Date: Sun Mar 24 16:29:50 2013 +0100
Initial import (#920518)
metis.spec | 73 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 59 insertions(+), 14 deletions(-)
---
diff --git a/metis.spec b/metis.spec
index 4a642c5..ad746a4 100644
--- a/metis.spec
+++ b/metis.spec
@@ -1,6 +1,6 @@
Name: metis
Version: 5.0.3
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering
License: ASL 2.0 and BSD and LGPLv2+
Group: Development/Libraries
@@ -24,7 +24,13 @@ Patch2: %{name}-width-datatype.patch
## This patch sets up GKREGEX, GKRAND, libsuffix options to the Makefiles
Patch4: %{name}-GKREGEX-GKRAND-LIBSUFFIX-fix.patch
+%if 0%{?rhel}
+BuildRequires: cmake28
+Conflicts: cmake < 2.8
+%else
BuildRequires: cmake >= 2.8
+%endif
+
BuildRequires: openmpi-devel
BuildRequires: pcre-devel
BuildRequires: help2man
@@ -60,7 +66,13 @@ fi
# Build metis
cd build
-%cmake -DCMAKE_C_COMPILER=%{_bindir}/gcc \
+
+%if 0%{?rhel}
+%cmake28 \
+%else
+%cmake \
+%endif
+ -DCMAKE_C_COMPILER=%{_bindir}/gcc \
-DCMAKE_CXX_COMPILER=%{_bindir}/g++ \
-DGKLIB_PATH=../GKlib \
-DSHARED=1 \
@@ -68,8 +80,7 @@ cd build
-DPCRE=%{_includedir} \
-DCMAKE_CXX_FLAGS="%{optflags} -fopenmp -pthread" -DCMAKE_C_FLAGS="%{optflags} -fopenmp -pthread" \
-DCMAKE_VERBOSE_MAKEFILE=1 \
- -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-..
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} ..
make %{?_smp_mflags}
cd ../
@@ -87,28 +98,58 @@ popd
%install
pushd build
%make_install
-popd
-pushd %{buildroot}%{_bindir}
## Generate manpages from binaries
+%if 0%{?rhel}
+LD_PRELOAD=%{buildroot}%{_libdir}/lib%{name}.so.0 \
+help2man --version-option="%{version}" -n "Partitions a graph into a specified number of parts." \
+ -N --output="gpmetis.1" -h -help %{buildroot}%{_bindir}/gpmetis
+
+##This command seems not acceptable for ndmetis
+#LD_PRELOAD=%{buildroot}%{_libdir}/lib%{name}.so.0 \
+#help2man --version-option="%{version}" \
+# -n "Computes a fill-reducing ordering of the vertices of the graph using multilevel nested dissection." \
+# -N --output="ndmetis.1" -h -help %{buildroot}%{_bindir}/ndmetis
+
+LD_PRELOAD=%{buildroot}%{_libdir}/lib%{name}.so.0 \
+help2man --version-option="%{version}" -n "Partitions a mesh into a specified number of parts." \
+ -N --output="mpmetis.1" -h -help %{buildroot}%{_bindir}/mpmetis
+
+LD_PRELOAD=%{buildroot}%{_libdir}/lib%{name}.so.0 \
+help2man --version-option="%{version}" -n "Converts a mesh into a graph that is compatible with METIS." \
+ -N --output="m2gmetis.1" -h -help %{buildroot}%{_bindir}/m2gmetis
+
+##There is no help page for graphchk
+#LD_PRELOAD=%{buildroot}%{_libdir}/lib%{name}.so.0 \
+#help2man --version-option="%{version}" -n "Checks the graph for format correctness and consistency." \
+# -N --output="graphchk.1" -h -help %{buildroot}%{_bindir}/graphchk
+
+LD_PRELOAD=%{buildroot}%{_libdir}/lib%{name}.so.0 \
+help2man -n "cmpfillin" \
+ --version-option="%{version}" -N --output=cmpfillin.1 -h -help %{buildroot}%{_bindir}/cmpfillin
+
+%else
+
help2man --version-string="%{version}" -n "Partitions a graph into a specified number of parts." \
- --no-info --output="gpmetis.1" --no-discard-stderr --help-option="-help" ./gpmetis
+ -N --output="gpmetis.1" --no-discard-stderr --help-option="-help" %{buildroot}%{_bindir}/gpmetis
help2man --version-string="%{version}" \
-n "Computes a fill-reducing ordering of the vertices of the graph using multilevel nested dissection." \
- --no-info --output="ndmetis.1" --no-discard-stderr --help-option="-help" ./ndmetis
+ -N --output="ndmetis.1" --no-discard-stderr --help-option="-help" %{buildroot}%{_bindir}/ndmetis
help2man --version-string="%{version}" -n "Partitions a mesh into a specified number of parts." \
- --no-info --output="mpmetis.1" --no-discard-stderr --help-option="-help" ./mpmetis
+ -N --output="mpmetis.1" --no-discard-stderr --help-option="-help" %{buildroot}%{_bindir}/mpmetis
help2man --version-string="%{version}" -n "Converts a mesh into a graph that is compatible with METIS." \
- --no-info --output="m2gmetis.1" --no-discard-stderr --help-option="-help" ./m2gmetis
+ -N --output="m2gmetis.1" --no-discard-stderr -h "-help" %{buildroot}%{_bindir}/m2gmetis
-help2man --version-string="%{version}" -n "Checks the graph for format correctness and consistency." \
- --no-info --output="graphchk.1" --no-discard-stderr --help-option="-help" ./graphchk
+##There is no help page for graphchk
+#help2man --version-string="%{version}" -n "Checks the graph for format correctness and consistency." \
+# -N --output="graphchk.1" --no-discard-stderr --help-option="-help" %{buildroot}%{_bindir}/graphchk
-help2man --version-string="%{version}" --no-info --output=cmpfillin.1 --no-discard-stderr \
- --help-option="-help" ./cmpfillin
+help2man -n "cmpfillin" --version-string="%{version}" -N --output=cmpfillin.1 --no-discard-stderr \
+ --help-option="-help" %{buildroot}%{_bindir}/cmpfillin
+%endif
mkdir -p %{buildroot}%{_mandir}/man1
mv *.1 %{buildroot}%{_mandir}/man1
@@ -130,6 +171,10 @@ popd
%{_libdir}/lib%{name}.so
%changelog
+* Wed Mar 20 2013 Antonio Trande <sagitter at fedoraproject.org> - 5.0.3-8
+- Added BR cmake28 for EPEL6 building
+- Set up of manpages creation in EPEL6
+
* Wed Mar 20 2013 Antonio Trande <sagitter at fedoraproject.org> - 5.0.3-7
- Removed explicit manpages compression
- License tag changed to 'ASL 2.0 and BSD and LGPLv2+'
More information about the scm-commits
mailing list