initial commit (#608206)
This commit is contained in:
parent
4bd6053e5f
commit
abc660313b
2 changed files with 118 additions and 0 deletions
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
0eeaae2524addf558de94bfbc914d22e zn_poly-0.9.tar.gz
|
||||
117
zn_poly.spec
Normal file
117
zn_poly.spec
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
Name: zn_poly
|
||||
Version: 0.9
|
||||
Release: 4%{?dist}
|
||||
Summary: C library for polynomial arithmetic
|
||||
|
||||
Group: Development/Libraries
|
||||
# see COPYING to see, which file has which license
|
||||
License: (GPLv2 or GPLv3) and GPLv2+ and LGPLv2+
|
||||
URL: http://cims.nyu.edu/~harvey/code/zn_poly/
|
||||
Source0: http://cims.nyu.edu/~harvey/code/zn_poly/releases/zn_poly-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: python
|
||||
BuildRequires: gmp-devel
|
||||
|
||||
%description
|
||||
zn_poly is a C library for polynomial arithmetic in Z/nZ[x], where n is
|
||||
any modulus that fits into an unsigned long.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%description devel
|
||||
zn_poly is a C library for polynomial arithmetic in Z/nZ[x], where n is
|
||||
any modulus that fits into an unsigned long.
|
||||
|
||||
This package contains the development files.
|
||||
|
||||
|
||||
%package static
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-devel = %{version}-%{release}
|
||||
%description static
|
||||
zn_poly is a C library for polynomial arithmetic in Z/nZ[x], where n is
|
||||
any modulus that fits into an unsigned long.
|
||||
|
||||
This package contains the static library.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
sed -i "s|typedef unsigned long ulong;|\/\/typedef unsigned long ulong;|g" include/zn_poly.h
|
||||
|
||||
|
||||
%build
|
||||
python makemakefile.py --cflags="%{optflags} -fPIC" --prefix=%{_prefix} \
|
||||
--gmp-prefix=%{_prefix} \
|
||||
--ntl-prefix=%{_prefix} \
|
||||
--flint-prefix=%{_prefix} \
|
||||
> makefile
|
||||
|
||||
make all libzn_poly.so libzn_poly-%{version}.so %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
# install manually, because makefile does not honor DESTDIR
|
||||
mkdir -p %{buildroot}%{_includedir}/zn_poly/
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
cp -pv include/*.h %{buildroot}%{_includedir}/zn_poly/
|
||||
cp -pv libzn_poly* %{buildroot}%{_libdir}
|
||||
|
||||
# make libzn_poly.so a symlink
|
||||
pushd %{buildroot}%{_libdir}
|
||||
rm libzn_poly.so
|
||||
ln -s libzn_poly-%{version}.so libzn_poly.so
|
||||
popd
|
||||
|
||||
%check
|
||||
make test
|
||||
./test/test all
|
||||
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING gpl-?.0.txt
|
||||
%doc demo/bernoulli/bernoulli.c doc/REFERENCES
|
||||
%{_libdir}/libzn_poly-%{version}.so
|
||||
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libzn_poly.so
|
||||
%{_includedir}/zn_poly/
|
||||
|
||||
|
||||
%files static
|
||||
%defattr(-,root,root,-)
|
||||
%{_libdir}/libzn_poly.a
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Jun 27 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.9-4
|
||||
- revert last change (fix flint instead)
|
||||
|
||||
* Sun Jun 27 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.9-3
|
||||
- flint wants to have headers in %%{_includedir}/zn_poly/src/
|
||||
|
||||
* Sun Jun 27 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.9-2
|
||||
- make libzn_poly.so a symlink to libzn_poly-%%{version}.so
|
||||
- use directly makemakefile.py instead of configure
|
||||
- preserve timestamps
|
||||
|
||||
* Sat Jun 26 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.9-1
|
||||
- initial package
|
||||
Reference in a new issue