Use make_build macro instead of make

Manual merge of request PR #2. Modified macros to just bare %make_build.
Added also %make_install usage.
This commit is contained in:
Petr Menšík 2021-01-04 16:11:54 +01:00
parent ec2408a47a
commit 7a65ca8b2d

View File

@ -39,7 +39,7 @@
Summary: Low-level DNS(SEC) library with API
Name: ldns
Version: 1.7.1
Release: 1%{?dist}
Release: 2%{?dist}
License: BSD
Url: https://www.nlnetlabs.nl/%{name}/
@ -231,15 +231,15 @@ pushd %{pkgname}
--with-pyldns PYTHON=%{__python3}
%endif
make %{?_smp_mflags}
make %{?_smp_mflags} doc
%make_build
%make_build doc
# We cannot use the built-in --with-p5-dns-ldns
%if %{with perl}
pushd contrib/DNS-LDNS
LD_LIBRARY_PATH="../../lib:$LD_LIBRARY_PATH" perl \
Makefile.PL INSTALLDIRS=vendor INC="-I. -I../.." LIBS="-L../../lib"
make
%make_build -j1
popd
%endif
@ -253,7 +253,7 @@ popd
%{common_args} \
--with-pyldns PYTHON=%{__python2}
make %{?_smp_mflags}
%make_build
popd
%endif
@ -268,8 +268,9 @@ pushd %{pkgname}_python3
pushd %{pkgname}
%endif
make DESTDIR=%{buildroot} INSTALL="%{__install} -pD" install
make DESTDIR=%{buildroot} INSTALL="%{__install} -pD" install-doc
mkdir -p %{buildroot}%{_libdir}/pkgconfig
%make_install install
%make_install install-doc
# remove .la files
rm -rf %{buildroot}%{_libdir}/*.la
@ -278,15 +279,16 @@ rm -rf %{buildroot}%{python3_sitearch}/*.la
%endif
%if %{with perl}
make -C contrib/DNS-LDNS DESTDIR=%{buildroot} pure_install
%make_install -j1 -C contrib/DNS-LDNS pure_install
chmod 755 %{buildroot}%{perl_vendorarch}/auto/DNS/LDNS/LDNS.so
rm -f %{buildroot}%{perl_vendorarch}/auto/DNS/LDNS/{.packlist,LDNS.bs}
rm -f %{buildroot}%{perl_archlib}/perllocal.pod
%endif
popd
%if %{with python2}
pushd %{pkgname}_python2
make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install-pyldns install-pyldnsx
%make_install install-pyldns install-pyldnsx
rm -rf %{buildroot}%{_libdir}/*.la %{buildroot}%{python2_sitearch}/*.la
popd
%endif
@ -347,6 +349,10 @@ rm -rf doc/man
%doc doc
%changelog
* Mon Jan 04 2021 Petr Menšík <pemensik@redhat.com> - 1.7.1-2
- Use make_build and make_install macro instead of make
- https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make
* Thu Oct 08 2020 Petr Menšík <pemensik@redhat.com> - 1.7.1-1
- Update to 1.7.1