%global vendor {os_name} %global rpmvdir /usr/lib/rpm/%{vendor} Name: %{vendor}-rpm-config Version: 300 Release: 25 License: GPL+ Summary: specific rpm configuration files URL: https://gitee.com/openeuler/openEuler-rpm-config Source0: https://gitee.com/openeuler/openEuler-rpm-config/repository/archive/%{version}.tar.gz Patch0: fix-error-message-for-kmodtool.patch Patch1: Fix-a-typo-in-brp-digest-list.patch Patch2: change-the-openEuler-to-generic-for-common-use.patch Patch3: exclude-kernel-source-and-EFI-files-in-digest-list-building.patch Patch4: check-if-the-file-is-a-symbolic-link-in-brp-digest-list.patch Patch9000: openEuler-remove-fexceptions.patch Patch9001: fix-the-ELF-file-cannot-be-found-due-to-escape-of.patch Patch9002: add-brp-scripts-to-delete-rpath.patch Patch9003: Delete-the-commented-code.patch Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: python3-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: python-srpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: fpc-srpm-macros = 1.1-6 Provides: ghc-srpm-macros = 1.4.2-8 Provides: gnat-srpm-macros = 4-6 Provides: nim-srpm-macros = 1-3 Provides: ocaml-srpm-macros = 5-4 Provides: openblas-srpm-macros = 2-4 Provides: perl-srpm-macros = 1-28 Provides: rust-srpm-macros = 10-1 Provides: go-srpm-macros = 2-18 Provides: perl-macros = 4:5.32.0-1 Obsoletes: perl-macros <= 4:5.32.0-1 Obsoletes: python-rpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: python2-rpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: python3-rpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: python-srpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: fpc-srpm-macros <= 1.1-6 Obsoletes: ghc-srpm-macros <= 1.4.2-8 Obsoletes: gnat-srpm-macros <= 4-6 Obsoletes: nim-srpm-macros <= 1-3 Obsoletes: ocaml-srpm-macros <= 5-4 Obsoletes: openblas-srpm-macros <= 2-4 Obsoletes: perl-srpm-macros <= 1-28 Obsoletes: rust-srpm-macros <= 10-1 Obsoletes: go-srpm-macros <= 2-18 %if "%{vendor}" != "openEuler" Provides: openEuler-rpm-config = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: openEuler-rpm-config <= %{?epoch:%{epoch}:}%{version}-%{release} %endif Requires: efi-srpm-macros Requires: qt5-srpm-macros Requires: rpm >= 4.11.0 Requires: zip #Requires: (annobin if gcc) # for brp-mangle-shebangs Requires: %{_bindir}/find Requires: %{_bindir}/file Requires: %{_bindir}/grep Requires: %{_bindir}/sed Requires: %{_bindir}/xargs # -fstack-clash-protection and -fcf-protection require GCC 8. Conflicts: gcc < 7 Provides: system-rpm-config = %{version}-%{release} %description specific rpm configuration files for %{vendor}. %package -n kernel-rpm-macros Summary: Macros and scripts for building kernel module packages %description -n kernel-rpm-macros Macros and scripts for building kernel module packages. %prep %autosetup -n openEuler-rpm-config -p1 %install mkdir -p %{buildroot}%{rpmvdir} install -p -m 644 -t %{buildroot}%{rpmvdir} macros rpmrc install -p -m 755 -t %{buildroot}%{rpmvdir} config.* install -p -m 755 -t %{buildroot}%{_rpmconfigdir} brp-* install -p -m 644 -t %{buildroot}%{_rpmconfigdir} generic-* install -p -m 755 -t %{buildroot}%{rpmvdir} kmodtool.py mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d/ macros.perl macros.python macros.go macros.forge macros.kmp mkdir -p %{buildroot}%{_fileattrsdir} # Adaptive according to vendor sed -i "s/__vendor/%{vendor}/g" `grep "__vendor" -rl %{buildroot}%{_rpmconfigdir}` %files %dir %{rpmvdir} %{rpmvdir}/macros %{rpmvdir}/rpmrc %{_rpmconfigdir}/brp-* %{rpmvdir}/config.* %{_rpmconfigdir}/generic-* %{_fileattrsdir}/ %{_rpmconfigdir}/macros.d/ %exclude %{_rpmconfigdir}/macros.d/macros.kmp %files -n kernel-rpm-macros %exclude %{_prefix}/lib/rpm/*/__pycache__/* %{rpmvdir}/kmodtool.py %{_rpmconfigdir}/macros.d/macros.kmp %changelog * Mon Apr 29 2024 xujing - 30-25 - don't delete the commented code in macros * Tue Mar 5 2024 hongjinghao - 30-24 - Delete the commented code * Tue Nov 21 2023 xujing - 30-23 - excute brp_chrpath before arch_install_post * Mon Nov 20 2023 xujing - 30-22 - add the scanning path of the rpath use vendor name to determine whether to delete rpath * Fri Nov 17 2023 xujing - 30-21 - add brp script to delete rpath fix the ELF file cannot be found due to escape of '\' * Fri Nov 03 2023 fuanan - 30-20 - check if the file is a symbolic link in brp-digest-list * Mon Oct 16 2023 xiasenlin - 30-19 - fix build failed, bare words are no longer supported * Mon Oct 11 2021 zhangtianxing - 30-18 - exclude kernel source and EFI files in digest list building * Fri Mar 26 2021 shenyangyang - 30-17 - Bump release for bigger than LTS SP1 * Thu Mar 25 2021 shenyangyang - 30-16 - Modify support for change vendor with better method * Fri Mar 19 2021 shenyangyang - 30-15 - Change the name of spec to openEuler-rpm-spec and fix few bugs * Wed Mar 17 2021 shenyangyang - 30-14 - Add for support for change vendor * Wed Sep 30 2020 shenyangyang - 30-13 - Add provides of perl-macros and change the source code to tar * Fri Aug 21 2020 Wang Shuo - 30-12 - fix error message for kmodtool * Wed Jun 19 2020 zhangliuyan - 30-11 - add kmodtool.py macros.kmp * Wed May 6 2020 openEuler Buildteam - 30-10 - Type:enhancement - ID:NA - SUG:NA - DESC: disable buildid link macro * Tue Feb 11 2020 openEuler Buildteam - 30-9 - Type:enhancement - ID:NA - SUG:NA - DESC:modify python_provide macro from python2 to python3 * Sun Jan 19 2020 openEuler Buildteam - 30-8 - Type:enhancement - ID:NA - SUG:NA - DESC:revise vendor in macro * Sun Jan 19 2020 openEuler Buildteam - 30-7 - Type:enhancement - ID:NA - SUG:NA - DESC:revise macro file * Tue Jan 14 2020 openEuler Buildteam - 30-6 - Type:enhancement - ID:NA - SUG:NA - DESC:update macros file * Tue Jan 14 2020 openEuler Buildteam - 30-5 - Type:enhancement - ID:NA - SUG:NA - DESC:add macros to macros.python * Mon Jan 13 2020 openEuler Buildteam - 30-4 - Type:enhancement - ID:NA - SUG:NA - DESC:update macros.python * Mon Jan 13 2020 openEuler Buildteam - 30-3 - Type:enhancement - ID:NA - SUG:NA - DESC:change type of files * Mon Jan 13 2020 openEuler Buildteam - 30-2 - Type:enhancement - ID:NA - SUG:NA - DESC:add source10 to package * Mon Jan 13 2020 openEuler Buildteam - 30-1 - Type:enhancement - ID:NA - SUG:NA - DESC:rebuild * Thu Dec 26 2019 openEuler Buildteam - 29-20 - Type:enhancement - ID:NA - SUG:NA - DESC:delete unneeded provides * Wed Nov 27 2019 fanghuiyu - 29-19 - Type:enhancement - ID:NA - SUG:NA - DESC:change to generic-rpm-config * Fri Nov 15 2019 jiangchuangang - 29-18 - Type:enhancement - ID:NA - SUG:NA - DESC: remove fcf-protection for x86_64 from rpmrc * Wed Oct 30 2019 hexiaowen - 29-17 - add custom macros * Wed Sep 25 2019 hexiaowen - 29-16 - add rust-srpm-macros and go-srpm-macros * Fri Sep 20 2019 hexiaowen - 29-15 - add version-release for python-rpm-macros * Fri Sep 20 2019 hexiaowen - 29-14 - add python-rpm-macros fpc-srpm-macros ghc-srpm-macros gnat-srpm-macros - nim-srpm-macros ocaml-srpm-macros openblas-srpm-macros perl-srpm-macros * Thu Aug 29 2019 hexiaowen - 29-13 - fix typo * Tue Aug 27 2019 hexiaowen - 29-2 - delete annobin * Wed Jul 18 2018 openEuler Buildteam - 29-1 - Package init