scotch/scotch.spec

168 lines
5.4 KiB
RPMSpec
Raw Normal View History

2009-11-06 23:19:41 +00:00
Summary: Graph, mesh and hypergraph partitioning library
Name: scotch
2012-11-17 14:07:40 +00:00
Version: 5.1.12
Release: 2.b%{?dist}
2009-11-06 23:19:41 +00:00
License: CeCILL-C
Group: Development/Libraries
URL: http://www.labri.fr/perso/pelegrin/scotch/
2012-11-17 14:07:40 +00:00
Source0: http://gforge.inria.fr/frs/download.php/26854/%{name}_%{version}b.tar.gz
2009-11-06 23:19:41 +00:00
Source1: scotch-Makefile.inc.in
2010-04-29 17:46:28 +00:00
BuildRequires: flex bison mpich2-devel zlib-devel bzip2-devel lzma-devel
2009-11-06 23:19:41 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Scotch is a software package for graph and mesh/hypergraph partitioning and
sparse matrix ordering.
%package devel
Summary: Development libraries for scotch
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
This package contains development libraries for scotch.
%prep
2010-04-29 17:46:28 +00:00
%setup -q -n scotch_%{version}
2009-11-06 23:19:41 +00:00
sed s/@RPMFLAGS@/'%{optflags} -fPIC'/ < %SOURCE1 > src/Makefile.inc
%build
cd src/
make %{?_smp_mflags}
gcc -shared -Wl,-soname=libscotcherr.so.0 -o ../lib/libscotcherr.so.0.0 \
libscotch/library_error.o
gcc -shared -Wl,-soname=libscotcherrexit.so.0 -o \
../lib/libscotcherrexit.so.0.0 libscotch/library_error_exit.o
rm -f libscotch/library_error*.o
gcc -shared -Wl,-soname=libscotch.so.0 -o ../lib/libscotch.so.0.0 \
2010-04-29 17:46:28 +00:00
libscotch/*.o ../lib/libscotcherr.so.0.0 -lpthread -lgfortran -lz -lbz2 -llzmadec -lrt
2009-11-06 23:19:41 +00:00
gcc -shared -Wl,-soname=libscotchmetis.so.0 -o ../lib/libscotchmetis.so.0.0\
2010-04-29 17:46:28 +00:00
libscotchmetis/*.o ../lib/libscotch.so.0.0 ../lib/libscotcherr.so.0.0
2009-11-06 23:19:41 +00:00
2010-04-29 17:46:28 +00:00
%{_mpich2_load}
2009-11-06 23:19:41 +00:00
make %{?_smp_mflags} ptscotch
mpicc -shared -Wl,-soname=libptscotcherr.so.0 -o ../lib/libptscotcherr.so.0.0\
libscotch/library_error.o
mpicc -shared -Wl,-soname=libptscotcherrexit.so.0 -o \
../lib/libptscotcherrexit.so.0.0 libscotch/library_error_exit.o
rm -f libscotch/library_error*.o
mpicc -shared -Wl,-soname=libptscotch.so.0 -o ../lib/libptscotch.so.0.0 \
2010-04-29 17:46:28 +00:00
libscotch/*.o ../lib/libptscotcherr.so.0.0 -lgfortran -lz -lbz2 -llzmadec
2009-11-06 23:19:41 +00:00
mpicc -shared -Wl,-soname=libptscotchparmetis.so.0 -o \
../lib/libptscotchparmetis.so.0.0 libscotchmetis/*.o \
2010-04-29 17:46:28 +00:00
../lib/libptscotch.so.0.0 ../lib/libptscotcherr.so.0.0
%{_mpich2_unload}
2009-11-06 23:19:41 +00:00
%install
rm -rf %{buildroot}
pushd src/
make install prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir}
popd
2010-10-19 16:18:50 +00:00
cp -r include/*metis.h %{buildroot}%{_includedir}/
2009-11-06 23:19:41 +00:00
pushd lib
for static_libs in lib*scotch*.a ; do
libs=`basename $static_libs .a`
ln -s $libs.so.0.0 $libs.so.0
ln -s $libs.so.0.0 $libs.so
2010-10-19 16:18:50 +00:00
rm -f $static_libs
2009-11-06 23:19:41 +00:00
done
cp -dp lib*scotch*.so* %{buildroot}%{_libdir}/
popd
2010-10-19 16:18:50 +00:00
rm -f %{buildroot}%{_libdir}/*.a
2009-11-06 23:19:41 +00:00
rm -f %{buildroot}%{_bindir}/*
rm -f %{buildroot}%{_mandir}/man1/*
pushd man/man1
for progs in *.1 ; do
prog=`basename $progs .1`
cp -dp ../../bin/$prog %{buildroot}%{_bindir}/scotch_$prog
cp -dp $progs %{buildroot}%{_mandir}/man1/scotch_$progs
done
popd
pushd %{buildroot}%{_bindir}
rm -f scotch_dgpart && ln -s ./scotch_dgmap scotch_dgpart
rm -f scotch_gpart && ln -s ./scotch_gmap scotch_gpart
popd
# Convert the license files to utf8
pushd doc
iconv -f iso8859-1 -t utf-8 < CeCILL-C_V1-en.txt > CeCILL-C_V1-en.txt.conv
iconv -f iso8859-1 -t utf-8 < CeCILL-C_V1-fr.txt > CeCILL-C_V1-fr.txt.conv
mv -f CeCILL-C_V1-en.txt.conv CeCILL-C_V1-en.txt
mv -f CeCILL-C_V1-fr.txt.conv CeCILL-C_V1-fr.txt
popd
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc README.txt doc/*
%{_bindir}/*
%{_libdir}/lib*scotch*.so.*
%{_mandir}/man1/*
%files devel
%defattr(-,root,root,-)
%{_libdir}/lib*scotch*.so
%{_includedir}/*scotch*.h
2010-10-19 16:18:50 +00:00
%{_includedir}/*metis.h
2009-11-06 23:19:41 +00:00
%changelog
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.12-2.b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2012-11-17 14:07:40 +00:00
* Sat Nov 17 2012 Deji Akingunola <dakingun@gmail.com> - 5.1.12-1.b
2012-11-17 13:30:25 +00:00
- Update to 5.1.12b
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
2011-03-29 15:34:01 +00:00
* Tue Mar 29 2011 Deji Akingunola <dakingun@gmail.com> - 5.1.11-1
- Update to 5.1.11
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.10b-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2011-03-29 15:34:01 +00:00
* Tue Oct 19 2010 Deji Akingunola <dakingun@gmail.com> - 5.1.10b-1
2010-10-19 16:18:50 +00:00
- Update to 5.1.10b
* Thu Aug 12 2010 Deji Akingunola <dakingun@gmail.com> - 5.1.9-1
- Update to 5.1.9
- No more static builds
2010-04-29 17:46:28 +00:00
* Tue Apr 27 2010 Deji Akingunola <dakingun@gmail.com> - 5.1.8-1
- Update to 5.1.8
2009-11-06 23:19:41 +00:00
* Wed Nov 04 2009 Deji Akingunola <dakingun@gmail.com> - 5.1.7-2
- Fix the Source url
* Sun Sep 20 2009 Deji Akingunola <dakingun@gmail.com> - 5.1.7-1
- Update to 5.1.7
- Put the library under libdir
* Thu Jun 11 2009 Deji Akingunola <dakingun@gmail.com> - 5.1.6-3
- Further spec fixes from package review (convert license files to utf8)
- Prefix binaries and their corresponding manpages with scotch_ .
- Link in appropriates libraries when creating shared libs
* Thu Jun 04 2009 Deji Akingunola <dakingun@gmail.com> - 5.1.6-2
- Add zlib-devel as BR
* Wed May 13 2009 Deji Akingunola <dakingun@gmail.com> - 5.1.6-1
- Update to 5.1.6
* Sat Nov 21 2008 Deji Akingunola <dakingun@gmail.com> - 5.1.2-1
- Update to 5.1.2
* Tue Sep 19 2008 Deji Akingunola <dakingun@gmail.com> - 5.1.1-1
- initial package creation