Factor out fipshmac as a macro
This commit is contained in:
parent
e0682aa6e2
commit
825ca61332
12
nettle.spec
12
nettle.spec
@ -55,14 +55,18 @@ autoreconf -ifv
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if %{with fips}
|
||||
%define fipshmac() \
|
||||
fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/%1.* \
|
||||
file=`basename $RPM_BUILD_ROOT%{_libdir}/%1.*.hmac` && \
|
||||
mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && \
|
||||
ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.%1.hmac
|
||||
|
||||
%define __spec_install_post \
|
||||
%{?__debug_package:%{__debug_install_post}} \
|
||||
%{__arch_install_post} \
|
||||
%{__os_install_post} \
|
||||
fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libnettle.so.%{nettle_so_ver}.* \
|
||||
fipshmac -d $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.%{hogweed_so_ver}.* \
|
||||
file=`basename $RPM_BUILD_ROOT%{_libdir}/libnettle.so.%{nettle_so_ver}.*.hmac` && mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libnettle.so.%{nettle_so_ver}.hmac \
|
||||
file=`basename $RPM_BUILD_ROOT%{_libdir}/libhogweed.so.%{hogweed_so_ver}.*.hmac` && mv $RPM_BUILD_ROOT%{_libdir}/$file $RPM_BUILD_ROOT%{_libdir}/.$file && ln -s .$file $RPM_BUILD_ROOT%{_libdir}/.libhogweed.so.%{hogweed_so_ver}.hmac \
|
||||
%fipshmac libnettle.so.%{nettle_so_ver} \
|
||||
%fipshmac libhogweed.so.%{hogweed_so_ver} \
|
||||
%{nil}
|
||||
%endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user