[gf2x] Initial import.
Jerry James
jjames at fedoraproject.org
Tue Aug 14 14:26:13 UTC 2012
commit e828dc064a20447747a5a8bdc02fb0a0e50d32de
Author: Jerry James <loganjerry at gmail.com>
Date: Tue Aug 14 08:26:02 2012 -0600
Initial import.
.gitignore | 1 +
gf2x.spec | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 99 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..19aca42 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/gf2x-1.1.tar.gz
diff --git a/gf2x.spec b/gf2x.spec
new file mode 100644
index 0000000..5fb1a18
--- /dev/null
+++ b/gf2x.spec
@@ -0,0 +1,97 @@
+Name: gf2x
+Version: 1.1
+Release: 1%{?dist}
+Summary: Polynomial multiplication over the binary field
+
+License: GPLv2+
+URL: http://gf2x.gforge.inria.fr/
+Source0: https://gforge.inria.fr/frs/download.php/30873/%{name}-%{version}.tar.gz
+
+%description
+Gf2x is a C/C++ software package containing routines for fast arithmetic
+in GF(2)[x] (multiplication, squaring, GCD) and searching for
+irreducible/primitive trinomials.
+
+%package devel
+Summary: Headers and library files for %{name}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+Headers and library files for developing applications that use %{name}.
+
+%prep
+%setup -q
+
+# Fix the FSF's address
+for badfile in `grep -FRl 'Fifth Floor' .`; do
+ sed -e 's/Fifth Floor/Suite 500/' -e 's/02111-1307/02110-1335/' \
+ -i.orig $badfile
+ touch -r $badfile.orig $badfile
+ rm -f $badfile.orig
+done
+
+%build
+# Build an SSE2-enabled version for 32-bit x86
+%ifarch %{ix86}
+%configure --disable-static --enable-sse2 --disable-pclmul \
+ CFLAGS="$RPM_OPT_FLAGS -march=pentium4 -msse2"
+
+# Eliminate hardcoded rpaths
+sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ -i libtool
+make %{?_smp_mflags}
+
+# Stash the results away and prepare to build again
+mv .libs sse2
+make distclean
+%endif
+
+# Build the native version for all CPUs (SSE2 for x86_64).
+# Support for pclmul would be nice, but not all x86_64s support it.
+%ifarch x86_64
+%configure --disable-static --enable-sse2 --disable-pclmul
+%else
+%configure --disable-static --disable-sse2 --disable-pclmul
+%endif
+
+# Eliminate hardcoded rpaths
+sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ -i libtool
+make %{?_smp_mflags} --eval='.SECONDARY:'
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+
+%ifarch %{ix86}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/sse2
+install -m 755 sse2/lib%{name}.so.*.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
+%endif
+
+%check
+LD_LIBRARY_PATH=`pwd`/.libs make check
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%doc AUTHORS BUGS COPYING README TODO
+%{_libdir}/lib%{name}.so.*
+%ifarch %{ix86}
+%{_libdir}/sse2/lib%{name}.so.*
+%endif
+
+%files devel
+%{_includedir}/%{name}/
+%{_includedir}/%{name}.h
+%{_libdir}/lib%{name}.so
+
+%changelog
+* Fri Aug 3 2012 Jerry James <loganjerry at gmail.com> - 1.1-1
+- New upstream release
+
+* Fri May 4 2012 Jerry James <loganjerry at gmail.com> - 1.0-1
+- Initial RPM
diff --git a/sources b/sources
index e69de29..f7aeb87 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d9ce3a0d8cb6be50e3a1ff6d90be669f gf2x-1.1.tar.gz
More information about the scm-commits
mailing list