diff --git a/macros b/macros index 2a6c4f52363719d10647bf1a521f236b6c02e563..888d97eafb4adaf3da20c085273054f47673b2c4 100644 --- a/macros +++ b/macros @@ -249,6 +249,8 @@ print(result) %__brp_llvm_compile_lto_elf /usr/lib/rpm/anolis/brp-llvm-compile-lto-elf %{build_cflags} %{build_ldflags} +%__brp_remove_info_dir /usr/lib/rpm/anolis/remove-info-dir + # note: %%__os_install_post_python is defined in python-srpm-macros and contains several policies # don't remove it from %%__os_install_post unless coordinating the change with Python maintainers # packagers, don't undefine the entire macro, see the individual macros in /usr/lib/rpm/macros.d/macros.python-srpm @@ -265,6 +267,7 @@ print(result) %{?__brp_check_rpaths} \ %{?__brp_mangle_shebangs} \ %{?__brp_remove_la_files} \ + %{?__brp_remove_info_dir} \ %{__os_install_post_python} \ %{nil} diff --git a/remove-info-dir b/remove-info-dir new file mode 100644 index 0000000000000000000000000000000000000000..a79cd4aaa766bffcad5d1bacf7b3ef89eebc96a6 --- /dev/null +++ b/remove-info-dir @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ -z "$RPM_BUILD_ROOT" ]; then + echo "No build root defined" >&2 + exit 1 +fi + +if [ ! -d "$RPM_BUILD_ROOT" ]; then + echo "Invalid build root" >&2 + exit 1 +fi + +INFODIR=`rpm --eval %{_infodir}/dir` + +dir="$RPM_BUILD_ROOT/$INFODIR" + +if [ -f $dir -a ! -L $dir ]; then + rm -f $dir +fi + diff --git a/system-rpm-config.spec b/system-rpm-config.spec index abfbb14662b04ace3e2282eb7fd24de62294462d..e82bf8267826657a79fd544412d3a74edf5370e8 100644 --- a/system-rpm-config.spec +++ b/system-rpm-config.spec @@ -1,4 +1,4 @@ -%define anolis_release 6 +%define anolis_release 7 Summary: Anolis OS specific rpm configuration files Name: system-rpm-config Version: 23 @@ -51,6 +51,7 @@ Source301: find-requires # Misc helper scripts Source400: dist.sh Source401: gpgverify +Source402: remove-info-dir # 2022-05-25 Snapshots from http://git.savannah.gnu.org/gitweb/?p=config.git Source500: config.guess @@ -121,6 +122,7 @@ install -p -m 755 -t %{buildroot}%{rrcdir} config.* install -p -m 755 -t %{buildroot}%{rrcdir} dist.sh install -p -m 755 -t %{buildroot}%{rrcdir} gpgverify install -p -m 755 -t %{buildroot}%{rrcdir} brp-* +install -p -m 755 -t %{buildroot}%{rrcdir} remove-info-dir install -p -m 755 -t %{buildroot}%{rrcdir} find-* mkdir -p %{buildroot}%{rrcdir}/find-provides.d @@ -132,7 +134,6 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} compatibiliy-deps.sh mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d macros.* - mkdir -p %{buildroot}%{_fileattrsdir} install -p -m 644 -t %{buildroot}%{_fileattrsdir} *.attr @@ -153,6 +154,7 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/anolis/srpm forge.lua %{rrcdir}/find-provides %{rrcdir}/find-requires %{rrcdir}/brp-ldconfig +%{rrcdir}/remove-info-dir %{_fileattrsdir}/*.attr %{_rpmconfigdir}/compatibiliy-deps.sh %{_rpmconfigdir}/macros.d/macros.*-srpm @@ -170,6 +172,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/anolis/srpm forge.lua %license MulanPSL %changelog +* Sun Oct 09 2022 Funda Wang - 23.7 +- add remove-info-dir script from mandriva/mageia for automatically removal of unwanted /usr/share/info/dir + * Fri Sep 30 2022 Chunmei Xu - 23.6 - add abi and api fileattr to provides abi/api