From 7d67be00606a37c5a2e38607f639f5fdb02cb0a5 Mon Sep 17 00:00:00 2001 From: Petr Menšík Date: Feb 17 2018 08:28:36 +0000 Subject: Install export isc-config.sh Use bind9-export includes. Fix patching isc-export-config.sh --- diff --git a/bind-9.11-export-isc-config.patch b/bind-9.11-export-isc-config.patch new file mode 100644 index 0000000..fd5622c --- /dev/null +++ b/bind-9.11-export-isc-config.patch @@ -0,0 +1,35 @@ +diff --git a/export-libs/Makefile b/export-libs/Makefile +index df15ea8..13f416b 100644 +--- a/export-libs/Makefile ++++ b/export-libs/Makefile +@@ -404,20 +404,18 @@ installdirs: + $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1 + + install:: isc-config.sh installdirs +- ${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir} +- rm -f ${DESTDIR}${bindir}/bind9-config +- ln ${DESTDIR}${bindir}/isc-config.sh ${DESTDIR}${bindir}/bind9-config +- ${INSTALL_DATA} ${top_srcdir}/isc-config.sh.1 ${DESTDIR}${mandir}/man1 +- rm -f ${DESTDIR}${mandir}/man1/bind9-config.1 +- ln ${DESTDIR}${mandir}/man1/isc-config.sh.1 ${DESTDIR}${mandir}/man1/bind9-config.1 +- ${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir} ++ ${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir}/isc-export-config.sh ++ rm -f ${DESTDIR}${bindir}/bind9-export-config ++ ln ${DESTDIR}${bindir}/isc-export-config.sh ${DESTDIR}${bindir}/bind9-export-config ++ ${INSTALL_DATA} ${top_srcdir}/isc-config.sh.1 ${DESTDIR}${mandir}/man1/isc-export-config.sh.1 ++ rm -f ${DESTDIR}${mandir}/man1/bind9-export-config.1 ++ ln ${DESTDIR}${mandir}/man1/isc-export-config.sh.1 ${DESTDIR}${mandir}/man1/bind9-export-config.1 + + uninstall:: +- rm -f ${DESTDIR}${sysconfdir}/bind.keys +- rm -f ${DESTDIR}${mandir}/man1/bind9-config.1 +- rm -f ${DESTDIR}${mandir}/man1/isc-config.sh.1 +- rm -f ${DESTDIR}${bindir}/bind9-config +- rm -f ${DESTDIR}${bindir}/isc-config.sh ++ rm -f ${DESTDIR}${mandir}/man1/bind9-export-config.1 ++ rm -f ${DESTDIR}${mandir}/man1/isc-export-config.sh.1 ++ rm -f ${DESTDIR}${bindir}/bind9-export-config ++ rm -f ${DESTDIR}${bindir}/isc-export-config.sh + + tags: + rm -f TAGS diff --git a/bind.spec b/bind.spec index edd879f..1f1375b 100644 --- a/bind.spec +++ b/bind.spec @@ -11,6 +11,7 @@ ## The order of libs is important. See lib/Makefile.in for details %define bind_export_libs isc dns isccfg irs %{!?_export_dir:%global _export_dir /bind9-export/} +%{!?_export_includedir:%global _export_includedir %{_includedir}/bind9-export} %{?!SDB: %global SDB 1} %{?!unittest: %global unittest 1} @@ -112,6 +113,9 @@ Patch151:bind-9.11-kyua-ht_test.patch Patch11: bind-9.3.2b2-sdbsrc.patch Patch12: bind-9.10-sdb.patch +# export lib patches +Patch135:bind-9.11-export-isc-config.patch + # needs inpection Patch17: bind-9.3.2b1-fix_sdb_ldap.patch @@ -628,6 +632,7 @@ for lib in %{bind_export_libs} do find . -name Makefile -exec sed "s/lib${lib}\./lib${lib}-export\./g" -i {} \; done; +%{__patch} -p2 -b --suffix .export-isc-config < %{PATCH135} make %{?_smp_mflags} popd ## End of export libs @@ -734,6 +739,7 @@ pushd export-libs make DESTDIR=${RPM_BUILD_ROOT} 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}/%{_export_includedir} popd %endif @@ -1316,6 +1322,7 @@ rm -rf ${RPM_BUILD_ROOT} %if %{with_export_libs} %files export-libs +%defattr(-,root,root,-) %dir %{_libdir}/%{_export_dir} %{_libdir}/%{_export_dir}/libdns-export.so.169* %{_libdir}/%{_export_dir}/libirs-export.so.160* @@ -1324,6 +1331,7 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-export-%{_arch}.conf %files export-libs-devel +%defattr(-,root,root,-) %{_libdir}/%{_export_dir}/libdns-export.so %{_libdir}/%{_export_dir}/libirs-export.so %{_libdir}/%{_export_dir}/libisc-export.so @@ -1339,7 +1347,7 @@ rm -rf ${RPM_BUILD_ROOT} %{_includedir}/%{_export_dir}/config.h %{_mandir}/man1/isc-export-config.sh.1* %{_mandir}/man1/bind9-export-config.1* -%{_bindir}/isc-export-config.sh +%attr(0755,root,root) %{_bindir}/isc-export-config.sh %{_bindir}/bind9-export-config %endif