Use make macros

Reduce number of variables, use prepared %make_build and %make_install
where possible.

Manual merge of MR #7.
This commit is contained in:
Petr Menšík 2021-01-06 14:41:24 +01:00
parent 5c10c94304
commit 177a98f40b

View File

@ -67,7 +67,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: MPLv2.0
Version: 9.11.26
Release: 1%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
Release: 2%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
Epoch: 32
Url: https://www.isc.org/downloads/bind/
#
@ -746,7 +746,7 @@ export LIBDIR_SUFFIX
%endif
popd
%endif
make %{?_smp_mflags}
%make_build
### FIXME hack!!!
### xsltproc doesn't find properly configured files
@ -858,7 +858,7 @@ do
-i isc-export-config.sh
done;
make %{?_smp_mflags}
%make_build
popd
# export library unit tests
@ -981,12 +981,12 @@ touch ${RPM_BUILD_ROOT}/%{chroot_sdb_prefix}%{_sysconfdir}/named.conf
#end sdb-chroot
pushd build
make DESTDIR=${RPM_BUILD_ROOT} install
%make_install
popd
%if %{with EXPORT_LIBS}
pushd export-libs
make DESTDIR=${RPM_BUILD_ROOT} install
%make_install
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/%{_export_dir}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-export-%{_arch}.conf
cp -fp config.h ${RPM_BUILD_ROOT}/%{_includedir}%{_export_dir}
@ -1038,16 +1038,16 @@ install -m 644 %{SOURCE12} contrib/sdb/pgsql/
pushd contrib/dlz
pushd modules
for DIR in filesystem ldap mysql mysqldyn sqlite3; do
make -C $DIR DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir}/bind install
%make_install -C $DIR libdir=%{_libdir}/bind
done
mv mysqldyn/testing/README mysqldyn/testing/README.testing
%if %{with BDB}
make -C bdbhpt DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir}/bind install
%make_install -C bdbhpt libdir=%{_libdir}/bind
%endif
popd
%if %{with BDB}
pushd bin/dlzbdb
make DESTDIR=${RPM_BUILD_ROOT} install
%make_install
popd
%endif
popd
@ -1628,6 +1628,10 @@ fi;
%endif
%changelog
* Wed Jan 06 2021 Petr Menšík <pemensik@redhat.com> - 32:9.11.26-2
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Mon Jan 04 2021 Petr Menšík <pemensik@redhat.com> - 32:9.11.26-1
- Update to 9.11.26