rpm/rpm4-macros_openmamba

101 lines
3.3 KiB
Plaintext
Raw Normal View History

%_dist mamba
%_docdir %_defaultdocdir
%_topdir %{_usr}/src/RPM
%_buildrootdir %{_topdir}/BUILD
%_check_dirname_deps 0
%_check_symlink_deps 0
%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)
# 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}
#%__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}
%__spec_install_post\
%{?__debug_package:%{__debug_install_post}}\
%{__arch_install_post}\
%{__os_install_post}\
%{nil}