Name: symmetrica Version: 2.0 Release: 2%{?dist} Summary: A Collection of Routines for Solving Symmetric Groups Group: Applications/Engineering # Note: they claim it's 'public domain' but then provide this: # http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/copyright_engl.html License: MIT URL: http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/ Source0: http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/SYM2_0_tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description Symmetrica is a collection of routines, written in the programming language C, through which the user can readily write his/her own programs. Routines which manipulate many types of mathematical objects are available. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package static Summary: Static libraries for %{name} Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} %description static The %{name}-static package contains static libraries for developing applications that use %{name}. %prep %setup -q -c %build for file in *.c; do if [ $file != "test.c" ] ; then gcc %{optflags} -c ${file} -I. -DFFTRUE -DMONOPOLYTRUE -DFAST fi done ar rcs lib%{name}.a *.o rm -f *.o for file in *.c; do if [ $file != "test.c" ] ; then gcc %{optflags} -fPIC -c ${file} -I. -DFFTRUE -DMONOPOLYTRUE -DFAST fi done gcc %{optflags} -shared -Xlinker -hlib%{name}.so.0 -o lib%{name}.so.0.0.0 *.o %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_libdir} install -m 644 lib%{name}.a $RPM_BUILD_ROOT%{_libdir}/ install -m 755 lib%{name}.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/ ln -s lib%{name}.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.0 ln -s lib%{name}.so.0 $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name} install -m 644 *.h $RPM_BUILD_ROOT%{_includedir}/%{name}/ %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc *.doc %{_libdir}/lib%{name}.so.0.0.0 %{_libdir}/lib%{name}.so.0 %files devel %defattr(-,root,root,-) %doc test.c %{_includedir}/%{name} %{_libdir}/lib%{name}.so %files static %defattr(-,root,root,-) %{_libdir}/lib%{name}.a %changelog * Mon Dec 15 2008 Conrad Meyer - 2.0-2 - Generate shared library as well as static library. * Wed Oct 15 2008 Conrad Meyer - 2.0-1 - Initial package.