%__spec_install_post_chrpath {%{!?debug: \
%{!?no_install_post_chrpath: __spec_install_post_chrpath() { \
if [ -d "$RPM_BUILD_ROOT" ]; then \
- files=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" ! -regex ".*/usr/lib[0-9]*/debug/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautochrpath:! -regex "%{_noautochrpath}"}`; \
+ files=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" ! -regex ".*/usr/lib[0-9]*/debug/.*" ! -regex ".*/lib/modules/.*" ! -regex ".*%{_docdir}/.*" ! -regex ".*%{_includedir}/.*" %{?_noautochrpath:! -regex "%{_noautochrpath}"}`; \
if [ -n "$files" ]; then \
objs=`echo "$files" | xargs -r -d'\\n' file | awk -F: '/ELF.*(executable.*dynamically linked|shared object)/ {print $1}'`; \
- fi
- #"
+ fi; \
if [ -n "$objs" ]; then \
printf "Remove RPATH from %d executable binaries and shared object files.\n" $(echo -n "$objs" | wc -l); \
echo "$objs" | \
%__spec_install_post_compress_modules { \
%{!?no_install_post_compress_modules: __spec_install_post_compress_modules() { \
if [ -d $RPM_BUILD_ROOT/lib/modules ]; then \
- echo "Compress kernel modules"; \
q=$(find $RPM_BUILD_ROOT/lib/modules -name '*o' -type f -print); \
+ printf "Compress %d kernel modules..." $(echo -n "$q" | wc -l); \
echo "$q" | xargs -r %{__gzip} -9nf; \
- printf "%d modules compressed\n" $(echo -n "$q" | wc -l); \
+ echo "DONE"; \
find $RPM_BUILD_ROOT/lib/modules -name '*o' -type l -printf "%p %l\n" | \
while read a b; do ln -sf $b.gz $a.gz; rm -f $a; done; \
fi; \