summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-09-24 13:52:26 +0000
committerCoprDistGit <infra@openeuler.org>2024-09-24 13:52:26 +0000
commit9679917a175091b0d437429157313f0ae5901c97 (patch)
tree8fe907a0ffcb4dd106de0374c859180be653a400 /macros
parentd68770f6939ab160ff27ec4e65ccc88cd3677bd0 (diff)
automatic import of openEuler-rpm-config
Diffstat (limited to 'macros')
-rw-r--r--macros8
1 files changed, 5 insertions, 3 deletions
diff --git a/macros b/macros
index c44e1fe..899d6b5 100644
--- a/macros
+++ b/macros
@@ -172,9 +172,12 @@
diff -u $file.backup $file && mv $file.backup $file \
done
+%__fix_libtool_from_moving_options_after_libs /usr/lib/rpm/fix-libtool-from-moving-options-after-libs $(dirname %{_configure})
+
%configure \
%{set_build_flags}; \
[ "%{_lto_cflags}"x != x ] && %{_fix_broken_configure_for_lto}; \
+ [ "%{_ld_as_needed_flags}"x !=x ] && %{__fix_libtool_from_moving_options_after_libs} ; \
[ "%_configure_gnuconfig_hack" = 1 ] && for i in $(find $(dirname %{_configure}) -name config.guess -o -name config.sub) ; do \
[ -f /usr/lib/rpm/%{_vendor}/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/%{_vendor}/$(basename $i) $i ; \
done ; \
@@ -422,8 +425,8 @@ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%delete_la_and_a \
-find $RPM_BUILD_ROOT -type f -name "*.la" -delete \
-find $RPM_BUILD_ROOT -type f -name "*.a" -delete
+find "$RPM_BUILD_ROOT" -type f,l -name '*.la' 2>/dev/null -print0 | xargs -0 grep --fixed-strings '.la - a libtool library file' --files-with-matches --null | xargs -0 rm --force \
+find "$RPM_BUILD_ROOT" -type f,l -name "*.a" -delete
%delete_la %{nil}
@@ -433,7 +436,6 @@ find $RPM_BUILD_ROOT -type f -name "*.a" -delete
%package help \
Summary: Documents for %{name} \
Buildarch: noarch \
-Requires: man info \
\
%description help \
Man pages and other related documents for %{name}.