From e180f8193ffbdaac1797831ed03621ac5984babd Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Tue, 31 Dec 2024 13:08:25 +0100 Subject: [PATCH] macros: integrate definitions from /etc/rpm/macros.openmamba (removed from rpm 1:4.20.0-2mamba) --- openmamba/macros | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/openmamba/macros b/openmamba/macros index 8e655fe..e4cf808 100644 --- a/openmamba/macros +++ b/openmamba/macros @@ -1,3 +1,21 @@ +# Per-platform rpm configuration file for openmamba. + +#============================================================================== +# ---- openmamba specific macros + +%_dist mamba +%_docdir %_defaultdocdir +%_topdir %{_usr}/src/RPM + +%majorminor %(echo %version | cut -d. -f 1-2) +%MAJver %(echo %version | cut -d. -f 1) +%majver %majorminor +%maj3ver %(echo %version | cut -d. -f 1-3) + +#============================================================================== +# ---- configure macros. note that most of these are inherited +# from the defaults. + # GCC toolchain %__cc_gcc gcc %__cxx_gcc g++ @@ -108,6 +126,53 @@ %__build_flags_lang_c() %{expand:%define __build_for_lang_cxx 0}%{expand:%define __build_for_lang_any 0}%{__build_flags_no_macro_warning}%{optflags} %__build_flags_lang_cxx() %{expand:%define __build_for_lang_c 0}%{expand:%define __build_for_lang_any 0}%{__build_flags_no_macro_warning}%{optflags} +#------------------------------------------------------------------------ +# Macros for building and installing + +%make_jobs %{__make} %{?_smp_mflags} + +%make \ + CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ + CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \ + FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \ + %{make_jobs} + +%makeinstall \ + make DESTDIR=%{buildroot} install + +%makeoldinstall \ + make \\\ + prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\ + exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\ + bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\ + sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\ + sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\ + datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\ + includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\ + libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\ + libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\ + localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\ + sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\ + mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\ + infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\ + install + +%makeinstall_perl make pure_install DESTDIR=%{buildroot} + +#------------------------------------------------------------------------ +# Macros for installing and uninstalling info pages + +%__install_info /usr/sbin/install-info + +%install_info() \ + %{__install_info} %{_infodir}/%{1}.gz %{_infodir}/dir ||:\; + +%uninstall_info() \ +if [ "$1" = "0" ]; then \ + %{__install_info} --delete %{_infodir}/%{1}.gz %{_infodir}/dir \ +fi \ +%{nil} + #--------------------------------------------------------------------- # Expanded at end of %install scriptlet. #