Name: HElib Version: 2.2.1 Release: 9%{?dist} Summary: Homomorphic Encryption Library License: Apache License 2.0 URL: https://github.com/homenc/HElib/releases Source0: %{name}-%{version}.tar.gz Source1: HElib.pc.in #Source2: HElib-config.in BuildRequires: m4 >= 1.4.16 BuildRequires: patchelf >= 0.9 BuildRequires: cmake >= 3.19 BuildRequires: gcc-c++ >= 8.5.0 BuildRequires: make >= 4.2 BuildRequires: perl BuildRequires: glibc-devel BuildRequires: git # get the header files... Requires: ntl-devel Requires: gmp-devel # HElib is a static library, so don't build a debug package %global debug_package %{nil} %description HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations. %prep %setup -q %build mkdir build pushd build cmake -DPACKAGE_BUILD=ON -DCMAKE_INSTALL_PREFIX=${RPM_BULD_ROOT} -DENABLE_TEST=ON .. cmake -DPACKAGE_BUILD=ON -DCMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT .. make %{?_smp_mflags} popd mkdir -p ./dist/pkgconfig cat %{SOURCE1} | sed -e "s,%%libdir%%,%{_libdir},g" \ -e "s,%%prefix%%,%{_prefix},g" \ -e "s,%%exec_prefix%%,%{_prefix},g" \ -e "s,%%includedir%%,%{_includedir}/nss3,g" \ -e "s,%%VERSION%%,%{version},g" \ > ./dist/pkgconfig/HElib.pc #cat %{SOURCE2} | sed -e "s,@libdir@,%{_libdir},g" \ # -e "s,@prefix@,%{_prefix},g" \ # -e "s,@exec_prefix@,%{_prefix},g" \ # -e "s,@includedir@,%{_includedir}/nss3,g" \ # -e "s,@version@,%{version},g" \ # > ./dist/pkgconfig/HElib-config %install pushd build make install cd $RPM_BUILD_ROOT/helib_pack rm lib # already supplied by the system gmp package rm -f include/gmp.h rm -f lib64/libgmp.la rm -f lib64/libgmp.so.10.4.1 rm -f lib64/libgmp.so.10 rm -f lib64/libgmp.so rm -f lib64/pkgconfig/gmp.pc rm -f lib64/libntl.so rm -f lib64/libntl.so.44 rm -f lib64/libntl.so.44.0.1 rm -r include/NTL rm -rf share/info rm -rf share/doc mkdir -p $RPM_BUILD_ROOT/usr mv share $RPM_BUILD_ROOT/%{_datadir} mv include $RPM_BUILD_ROOT/%{_includedir} mv lib64 $RPM_BUILD_ROOT/%{_libdir} cd .. rm -rf $RPM_BUILD_ROOT/helib_pack pwd popd install -p -m 644 ./dist/pkgconfig/HElib.pc $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/HElib.pc pushd $RPM_BUILD_ROOT ls -lR . popd #install -p -m 644 ./dist/pkgconfig/HElib-config $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/HElib-config #chmod 755 ./dist/pkgconfig/HElib-config %check pushd build ctest %files %{_libdir}/libhelib.a %{_libdir}/pkgconfig/HElib.pc %{_includedir}/helib %{_datadir}/cmake/helib %changelog * Thu Nov 4 2021 Bob Relyea - 2.2.1-9 - remove ntl so we don't conflit with the system verion - add runtime dependency on ntl * Sat Oct 30 2021 Bob Relyea - 2.2.1-7 - fixup files section so we don't try to own system directories - remove more gmp so we don't conflict with the system version * Sat Oct 30 2021 Bob Relyea - 2.2.1-2 - remove pthread requires - turn on testing * Fri Oct 29 2021 Bob Relyea - 2.2.1-1 - initial import