2024-01-05 17:29:03 +01:00
|
|
|
%_dist mamba
|
2024-01-05 17:29:06 +01:00
|
|
|
%_docdir %_defaultdocdir
|
|
|
|
%_topdir %{_usr}/src/RPM
|
|
|
|
%_buildrootdir %{_topdir}/BUILD
|
2024-01-05 17:29:03 +01:00
|
|
|
%_check_dirname_deps 0
|
|
|
|
%_check_symlink_deps 0
|
|
|
|
|
2024-01-05 17:29:06 +01:00
|
|
|
%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)
|
2024-01-05 17:29:03 +01:00
|
|
|
|
|
|
|
# obsoleted macro (for compatibility with QiLinux packages)
|
|
|
|
# do not use it; use %python_version instead
|
|
|
|
%pyver %(python -V 2>&1 | cut -f2 -d" " | cut -f1,2 -d".")
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
# 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 /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}
|
|
|
|
|
|
|
|
#==============================================================================
|
|
|
|
# ---- configure macros.
|
|
|
|
#
|
|
|
|
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
|
|
|
|
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
|
|
|
|
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------
|
|
|
|
# Multilibs
|
|
|
|
%_multilibno 1
|
|
|
|
%_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
|
|
|
|
|
|
|
|
#==============================================================================
|
|
|
|
# ---- Build policy macros.
|
|
|
|
#
|
|
|
|
#---------------------------------------------------------------------
|
|
|
|
# Expanded at end of %install scriptlet.
|
|
|
|
#
|
|
|
|
|
|
|
|
%__arch_install_post %{nil}
|
|
|
|
|
2024-01-05 17:29:06 +01:00
|
|
|
#%__os_install_post \
|
|
|
|
## /usr/lib/rpm/brp-infodir \
|
|
|
|
## /usr/lib/rpm/brp-strip-builddirs \
|
|
|
|
# /usr/lib/rpm/brp-compress \
|
|
|
|
# /usr/lib/rpm/brp-strip \
|
|
|
|
# /usr/lib/rpm/brp-strip-shared \
|
|
|
|
# /usr/lib/rpm/brp-strip-static-archive \
|
|
|
|
# /usr/lib/rpm/brp-strip-comment-note \
|
|
|
|
# /usr/lib/rpm/brp-nobuildrootpath \
|
|
|
|
#%{nil}
|
2024-01-05 17:29:03 +01:00
|
|
|
|
|
|
|
%__spec_install_post\
|
|
|
|
%{?__debug_package:%{__debug_install_post}}\
|
|
|
|
%{__arch_install_post}\
|
|
|
|
%{__os_install_post}\
|
|
|
|
%{nil}
|