Blob Blame History Raw
#==============================================================================
# ---- Midipix distribution base vendor macros
#
#
#---------------------------------------------------------------------

# Base distribution settings, this is what you change for your own branding
%distribution		Midipix
%vendor			Midipix
#bugurl			https://dev.midipix.org/
%disturl		https://midipix.org/
%_vendor		midipix

#==============================================================================
# ---- per-platform macros.
#
%_os			midipix
%_host_ntbits		nt%{__isa_bits}
%_build_ntbits		%{_host_ntbits}
%_target_ntbits		%{_host_ntbits}
%_target_platform	%{_target_cpu}-%{_target_ntbits}-%{_vendor}-%{_target_os}%{?_gnu}

#==============================================================================
# ---- configure macros.  note that most of these are inherited
#      from the defaults.
#
# Set /var correctly
%_localstatedir		/var
%_sharedstatedir	%{_localstatedir}/lib

# Set /etc correctly
%_sysconfdir		/etc

# Set prefix correctly
%_prefix		/usr

# Set docdirs correctly
%_pkgdocdir             %{_docdir}/%{name}
%_docdir_fmt            %%{NAME}

# Set Fortran modules directory
%_fmoddir		%{_libdir}/gfortran/modules

# Extra useful paths
%_iconsdir		%{_datadir}/icons
%_localedir		%{_datadir}/locale
%_logdir		%{_localstatedir}/log
%_metainfodir		%{_datadir}/metainfo

#==============================================================================
# ---- Build policy macros.
#
#
#---------------------------------------------------------------------
#	Expanded at beginning of %install scriptlet.
#
%__spec_install_pre %{___build_pre}\
    [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\
    mkdir -p `dirname "$RPM_BUILD_ROOT"`\
    mkdir "$RPM_BUILD_ROOT"\
%{nil}


#---------------------------------------------------------------------
#	RPM package build settings
#

# Ensure SOURCE_DATE_EPOCH is set based on changelog for reproducible builds
%source_date_epoch_from_changelog	1

# Automatically trim changelog entries after 2 years
%_changelog_trimtime	%{lua:print(os.time() - 2 * 365 * 86400)}

# Use SHA-256 for FILEDIGESTS instead of default MD5
%_source_filedigest_algorithm	8
%_binary_filedigest_algorithm	8

# We want to use zstd payloads by default
%_source_payload	w9.zstdio
%_binary_payload	w9.zstdio