[packages/google-talkplugin] verify that len is correct

glen glen at pld-linux.org
Wed Mar 6 10:54:57 CET 2013


commit 421a52fceb3a1a7b1579cb5400d46dadb23a0701
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Mar 6 11:54:42 2013 +0200

    verify that len is correct

 google-talkplugin.spec | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/google-talkplugin.spec b/google-talkplugin.spec
index ded73b5..23973aa 100644
--- a/google-talkplugin.spec
+++ b/google-talkplugin.spec
@@ -47,13 +47,16 @@ mv ./opt/google/talkplugin/* .
 # must be shorter than: RPATH=/opt/google/talkplugin/lib
 chrpath -r %{_libdir}/gtalk libnpgtpo3dautoplugin.so
 
-# hack: replace $org with target path
+# hack: replace $org with target path in binaries
+org=/opt/google/talkplugin/
 %if "%{_lib}" == "lib64"
 dst=///////usr/lib64/gtalk/
 %else
 dst=/////////usr/lib/gtalk/
 %endif
-sed -i -e "s#/opt/google/talkplugin/#$dst#g" *.so GoogleTalkPlugin
+# length must be identical!
+test $(echo -n "$org" | wc -c) = $(echo -n "$dst" | wc -c)
+%{__sed} -i~ -e "s,$org,$dst,g" *.so GoogleTalkPlugin
 
 %install
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/google-talkplugin.git/commitdiff/421a52fceb3a1a7b1579cb5400d46dadb23a0701



More information about the pld-cvs-commit mailing list