Use sed to modify generated Makefile
Custom patch application is not recognized by checking tools. Use more readable and understandable way.
This commit is contained in:
parent
328fbf43a1
commit
cc69cd1e32
@ -1,35 +0,0 @@
|
|||||||
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
|
|
17
bind.spec
17
bind.spec
@ -124,9 +124,6 @@ Patch159:bind-9.11-rt46047.patch
|
|||||||
Patch11: bind-9.3.2b2-sdbsrc.patch
|
Patch11: bind-9.3.2b2-sdbsrc.patch
|
||||||
Patch12: bind-9.10-sdb.patch
|
Patch12: bind-9.10-sdb.patch
|
||||||
|
|
||||||
# export lib patches
|
|
||||||
Patch135:bind-9.11-export-isc-config.patch
|
|
||||||
|
|
||||||
# needs inpection
|
# needs inpection
|
||||||
Patch17: bind-9.3.2b1-fix_sdb_ldap.patch
|
Patch17: bind-9.3.2b1-fix_sdb_ldap.patch
|
||||||
|
|
||||||
@ -637,6 +634,8 @@ popd # build
|
|||||||
%systemtest_prepare_build build
|
%systemtest_prepare_build build
|
||||||
|
|
||||||
%if %{with EXPORT_LIBS}
|
%if %{with EXPORT_LIBS}
|
||||||
|
cp isc-config.sh.1 isc-export-config.sh.1
|
||||||
|
|
||||||
## Create export libs ##
|
## Create export libs ##
|
||||||
mkdir -p export-libs
|
mkdir -p export-libs
|
||||||
pushd export-libs
|
pushd export-libs
|
||||||
@ -673,8 +672,12 @@ export LIBDIR_SUFFIX
|
|||||||
## FIXME this should be in patch instead of SED'ing
|
## FIXME this should be in patch instead of SED'ing
|
||||||
## but do we really like/want to patch generated files?
|
## but do we really like/want to patch generated files?
|
||||||
|
|
||||||
sed -i -e \
|
mv isc-config.sh isc-export-config.sh
|
||||||
'/^SUBDIRS =/s/.*/SUBDIRS = make lib/i' \
|
|
||||||
|
sed -i \
|
||||||
|
-e '/^SUBDIRS =/s/.*/SUBDIRS = make lib/i' \
|
||||||
|
-e 's/isc-config.sh/isc-export-config.sh/g' \
|
||||||
|
-e 's/bind9-config/bind9-export-config/g' \
|
||||||
Makefile
|
Makefile
|
||||||
|
|
||||||
sed -i -e \
|
sed -i -e \
|
||||||
@ -690,9 +693,9 @@ do
|
|||||||
find . -name Makefile -exec sed "s/lib${lib}\./lib${lib}-export\./g" -i {} \;
|
find . -name Makefile -exec sed "s/lib${lib}\./lib${lib}-export\./g" -i {} \;
|
||||||
sed -e "s/-l${lib}\([^[:alpha:]]\)/-l${lib}-export\1/g" \
|
sed -e "s/-l${lib}\([^[:alpha:]]\)/-l${lib}-export\1/g" \
|
||||||
-e "s/lib${lib}\./lib${lib}-export\./g" \
|
-e "s/lib${lib}\./lib${lib}-export\./g" \
|
||||||
-i isc-config.sh
|
-i isc-export-config.sh
|
||||||
done;
|
done;
|
||||||
%{__patch} -p2 -b --suffix .export-isc-config < %{PATCH135}
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user