Группа :: Науки/Математика
Пакет: metis
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%define sover 0
Name: metis
Version: 4.0.1
Release: alt4
Summary: Family of Multilevel Partitioning Algorithms
License: GPL
Group: Sciences/Mathematics
Url: http://glaros.dtc.umn.edu/gkhome/views/metis
Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org>
Source: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-4.0.tar.gz
Source1: %name.pc
Conflicts: parmetis
BuildRequires(pre): rpm-build-compat
%description
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
%package -n lib%name
Summary: Shared library of METIS
Group: System/Libraries
Conflicts: libparmetis
%description -n lib%name
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
This package contains shared library of METIS.
%package -n lib%name-devel
Summary: Development files of METIS
Group: Development/C
Requires: lib%name = %version-%release
Conflicts: lib%name-devel < %version-%release
Obsoletes: lib%name-devel < %version-%release
Conflicts: libparmetis-devel
Conflicts: libparmetis-devel-static
%description -n lib%name-devel
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
This package contains development files of METIS.
%package -n lib%name-devel-static
Summary: Static library of METIS
Group: Development/C
Requires: lib%name-devel = %version-%release
Conflicts: lib%name-devel < %version-%release
Conflicts: libparmetis-devel
Conflicts: libparmetis-devel-static
%description -n lib%name-devel-static
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
This package contains static library of METIS.
%package -n lib%name-devel-doc
Summary: Development documentation of METIS
Group: Development/Documentation
BuildArch: noarch
%description -n lib%name-devel-doc
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
This package contains development documentation of METIS.
%package examples
Summary: Example graphs for METIS
Group: Development/Documentation
BuildArch: noarch
%description examples
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
METIS is written in ANSI C and should compile on Unix systems that have
a ANSI C compiler.
This package contains example graphs for METIS.
%prep
%setup
install -m644 %SOURCE1 .
%build
%make_build
sed -i 's| at VERSION at |%version|' %name.pc
%install
install -d %buildroot%_bindir
install -d %buildroot%_libdir
install -d %buildroot%_includedir/%name
install -d %buildroot%_docdir/%name
install -d %buildroot%_datadir/%name
install -d %buildroot%_pkgconfigdir
for i in graphchk kmetis mesh2dual mesh2nodal oemetis onmetis partdmesh \
partnmesh pmetis
do
install -m755 $i %buildroot%_bindir
done
mv Graphs/mtest Graphs/metis_test
install -m755 Graphs/metis_test %buildroot%_bindir
rm -f Graphs/metis_test
install -m644 libmetis.a %buildroot%_libdir
install -m644 Doc/manual.ps %buildroot%_docdir/%name
install -m644 Graphs/* %buildroot%_datadir/%name
install -m644 Lib/*.h %buildroot%_includedir/%name
install -m644 %name.pc %buildroot%_pkgconfigdir
# shared library
pushd %buildroot%_libdir
ar x lib%name.a
gcc -shared *.o -lm \
-Wl,-soname,lib%name.so.%sover -o lib%name.so.%sover
ln -s lib%name.so.%sover lib%name.so
rm -f *.o
popd
%files
%doc CHANGES
%_bindir/*
%files -n lib%name
%_libdir/*.so.*
%files -n lib%name-devel
%_libdir/*.so
%_includedir/*
%_pkgconfigdir/*
%files -n lib%name-devel-static
%_libdir/*.a
%files -n lib%name-devel-doc
%_docdir/%name
%files examples
%_datadir/%name
%changelog
…
Полный changelog можно просмотреть здесь
Name: metis
Version: 4.0.1
Release: alt4
Summary: Family of Multilevel Partitioning Algorithms
License: GPL
Group: Sciences/Mathematics
Url: http://glaros.dtc.umn.edu/gkhome/views/metis
Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org>
Source: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-4.0.tar.gz
Source1: %name.pc
Conflicts: parmetis
BuildRequires(pre): rpm-build-compat
%description
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
%package -n lib%name
Summary: Shared library of METIS
Group: System/Libraries
Conflicts: libparmetis
%description -n lib%name
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
This package contains shared library of METIS.
%package -n lib%name-devel
Summary: Development files of METIS
Group: Development/C
Requires: lib%name = %version-%release
Conflicts: lib%name-devel < %version-%release
Obsoletes: lib%name-devel < %version-%release
Conflicts: libparmetis-devel
Conflicts: libparmetis-devel-static
%description -n lib%name-devel
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
This package contains development files of METIS.
%package -n lib%name-devel-static
Summary: Static library of METIS
Group: Development/C
Requires: lib%name-devel = %version-%release
Conflicts: lib%name-devel < %version-%release
Conflicts: libparmetis-devel
Conflicts: libparmetis-devel-static
%description -n lib%name-devel-static
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
This package contains static library of METIS.
%package -n lib%name-devel-doc
Summary: Development documentation of METIS
Group: Development/Documentation
BuildArch: noarch
%description -n lib%name-devel-doc
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
This package contains development documentation of METIS.
%package examples
Summary: Example graphs for METIS
Group: Development/Documentation
BuildArch: noarch
%description examples
METIS is a software package for partitioning unstructured graphs, partitioning
meshes, and computing fill-reducing orderings of sparse matrices.
METIS is written in ANSI C and should compile on Unix systems that have
a ANSI C compiler.
This package contains example graphs for METIS.
%prep
%setup
install -m644 %SOURCE1 .
%build
%make_build
sed -i 's| at VERSION at |%version|' %name.pc
%install
install -d %buildroot%_bindir
install -d %buildroot%_libdir
install -d %buildroot%_includedir/%name
install -d %buildroot%_docdir/%name
install -d %buildroot%_datadir/%name
install -d %buildroot%_pkgconfigdir
for i in graphchk kmetis mesh2dual mesh2nodal oemetis onmetis partdmesh \
partnmesh pmetis
do
install -m755 $i %buildroot%_bindir
done
mv Graphs/mtest Graphs/metis_test
install -m755 Graphs/metis_test %buildroot%_bindir
rm -f Graphs/metis_test
install -m644 libmetis.a %buildroot%_libdir
install -m644 Doc/manual.ps %buildroot%_docdir/%name
install -m644 Graphs/* %buildroot%_datadir/%name
install -m644 Lib/*.h %buildroot%_includedir/%name
install -m644 %name.pc %buildroot%_pkgconfigdir
# shared library
pushd %buildroot%_libdir
ar x lib%name.a
gcc -shared *.o -lm \
-Wl,-soname,lib%name.so.%sover -o lib%name.so.%sover
ln -s lib%name.so.%sover lib%name.so
rm -f *.o
popd
%files
%doc CHANGES
%_bindir/*
%files -n lib%name
%_libdir/*.so.*
%files -n lib%name-devel
%_libdir/*.so
%_includedir/*
%_pkgconfigdir/*
%files -n lib%name-devel-static
%_libdir/*.a
%files -n lib%name-devel-doc
%_docdir/%name
%files examples
%_datadir/%name
%changelog
…
Полный changelog можно просмотреть здесь