diff --git a/.cvsignore b/.cvsignore index e69de29..d3065d4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +scotch_5.1.7.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..598a43f --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +scotch-5_1_7-2_fc11:HEAD:scotch-5.1.7-2.fc11.src.rpm:1257549517 diff --git a/scotch-Makefile.inc.in b/scotch-Makefile.inc.in new file mode 100644 index 0000000..b896f63 --- /dev/null +++ b/scotch-Makefile.inc.in @@ -0,0 +1,20 @@ +EXE = +LIB = .a +OBJ = .o + +MAKE = make +AR = ar +ARFLAGS = -ruv +CAT = cat +CCS = gcc +CCP = mpicc +CCD = mpicc +CFLAGS = @RPMFLAGS@ -O3 -Drestrict=__restrict -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_PTHREAD -DSCOTCH_RENAME +LDFLAGS = -lz -lm -lrt +CP = cp -a +LEX = flex +LN = ln +MKDIR = mkdir -p +MV = mv +RANLIB = ranlib +YACC = bison -y diff --git a/scotch.spec b/scotch.spec new file mode 100644 index 0000000..97d977b --- /dev/null +++ b/scotch.spec @@ -0,0 +1,144 @@ +Summary: Graph, mesh and hypergraph partitioning library +Name: scotch +Version: 5.1.7 +Release: 2%{?dist} +License: CeCILL-C +Group: Development/Libraries +URL: http://www.labri.fr/perso/pelegrin/scotch/ +Source0: http://gforge.inria.fr/frs/download.php/23390/%{name}_%{version}.tar.gz +Source1: scotch-Makefile.inc.in +BuildRequires: flex bison mpich2-devel zlib-devel +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. + +%package static +Summary: Development libraries for scotch +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +This package contains libscotch static libraries. + +%prep +%setup -q -n scotch_5.1 +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 \ + libscotch/*.o ../lib/libscotcherr.so.0.0 -lpthread -lgfortran -lz -lrt +gcc -shared -Wl,-soname=libscotchmetis.so.0 -o ../lib/libscotchmetis.so.0.0\ + libscotchmetis/*.o ../lib/libscotch.so.0.0 ../lib/libscotcherr.so.0.0 -lz -lm -lrt + +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 \ + libscotch/*.o ../lib/libptscotcherr.so.0.0 -lgfortran -lz +mpicc -shared -Wl,-soname=libptscotchparmetis.so.0 -o \ + ../lib/libptscotchparmetis.so.0.0 libscotchmetis/*.o \ + ../lib/libptscotch.so.0.0 ../lib/libptscotcherr.so.0.0 -lz -lm -lrt + +%install +rm -rf %{buildroot} +pushd src/ +make install prefix=%{buildroot}%{_prefix} libdir=%{buildroot}%{_libdir} +popd +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 + done + cp -dp lib*scotch*.so* %{buildroot}%{_libdir}/ +popd + +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 + +%files static +%defattr(-,root,root,-) +%{_libdir}/lib*scotch*.a + +%changelog +* Wed Nov 04 2009 Deji Akingunola - 5.1.7-2 +- Fix the Source url + +* Sun Sep 20 2009 Deji Akingunola - 5.1.7-1 +- Update to 5.1.7 +- Put the library under libdir + +* Thu Jun 11 2009 Deji Akingunola - 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 - 5.1.6-2 +- Add zlib-devel as BR + +* Wed May 13 2009 Deji Akingunola - 5.1.6-1 +- Update to 5.1.6 + +* Sat Nov 21 2008 Deji Akingunola - 5.1.2-1 +- Update to 5.1.2 + +* Tue Sep 19 2008 Deji Akingunola - 5.1.1-1 +- initial package creation diff --git a/sources b/sources index e69de29..bc34fe1 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +a3d82ea9ad83ec8d26994fb36ebdc713 scotch_5.1.7.tar.gz