rpm-build/platform.in

690 lines
28 KiB
Plaintext
Raw Normal View History

2002-09-27 17:42:00 +04:00
# $Id$
2002-03-25 23:16:26 +03:00
# Per-platform rpm configuration file.
#==============================================================================
# ---- per-platform macros.
#
%_arch @RPMRC_ARCH@
%_vendor @RPMCANONVENDOR@
%_os @RPMCANONOS@
2002-03-26 01:30:19 +03:00
%_gnu -gnu
2002-03-25 23:16:26 +03:00
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
%optflags @RPMRC_OPTFLAGS@
#==============================================================================
# ---- configure macros.
#
%_prefix @prefix@
%_exec_prefix @exec_prefix@
%_bindir @bindir@
%_sbindir @sbindir@
%_libexecdir @libexecdir@
%_datadir @datadir@
%_sysconfdir @sysconfdir@
%_sharedstatedir @sharedstatedir@
%_localstatedir @localstatedir@
%_lib @LIB@
%_libdir @prefix@/@LIB@
2002-03-25 23:16:26 +03:00
%_includedir @includedir@
%_oldincludedir @oldincludedir@
%_infodir @infodir@
%_mandir @mandir@
%_initrddir %{_sysconfdir}/rc.d/init.d
%_defaultdocdir @DEFAULTDOCDIR@
#==============================================================================
# ---- configure and makeinstall.
#
2002-03-26 01:30:19 +03:00
%_configure_script ./configure
2002-11-10 18:55:42 +03:00
%_configure_target --build=%{_target_platform} --host=%{_target_platform}
2002-03-26 01:30:19 +03:00
%_configure_gettext --without-included-gettext
2002-03-25 23:16:26 +03:00
%configure \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
%{?_disable_static:export lt_cv_prog_cc_static_works=no ;} \
%{?_enable_static:export lt_cv_prog_cc_static_works=yes ;} \
%{?__libtoolize:[ -f configure.ac -o -f configure.in ] && %{__libtoolize} --copy --force ;} \
2002-03-26 01:30:19 +03:00
%{_configure_script} %{?_configure_target:%{_configure_target}} \\\
2002-03-25 23:16:26 +03:00
--prefix=%{_prefix} \\\
--exec-prefix=%{_exec_prefix} \\\
--bindir=%{_bindir} \\\
--sbindir=%{_sbindir} \\\
--sysconfdir=%{_sysconfdir} \\\
--datadir=%{_datadir} \\\
--includedir=%{_includedir} \\\
--libdir=%{_libdir} \\\
--libexecdir=%{_libexecdir} \\\
--localstatedir=%{_localstatedir} \\\
--sharedstatedir=%{_sharedstatedir} \\\
--mandir=%{_mandir} \\\
2002-03-26 01:30:19 +03:00
--infodir=%{_infodir} \\\
--disable-dependency-tracking \\\
2002-03-26 01:30:19 +03:00
%{?_configure_gettext:%{_configure_gettext}}
2002-03-25 23:16:26 +03:00
2002-03-26 01:30:19 +03:00
%_makeinstall_target install
2002-03-25 23:16:26 +03:00
%makeinstall \
2002-03-26 01:30:19 +03:00
%__make INSTALL="%__install -p" \\\
2002-03-25 23:16:26 +03:00
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} \\\
2002-03-26 01:30:19 +03:00
%{?_makeinstall_target:%{_makeinstall_target}}
2002-03-25 23:16:26 +03:00
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
@MULTILIBSTART@
#---------------------------------------------------------------------
# Multilibs
%_multilibno @MULTILIBNO@
%_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
@MULTILIBEND@
#==============================================================================
# ---- Build policy macros.
#
#---------------------------------------------------------------------
# Expanded at end of %install scriptlet.
#
%__arch_install_post @ARCH_INSTALL_POST@
%__os_install_post\
@RPMCONFIGDIR@/brp-%{_vendor}\
2002-03-25 23:16:26 +03:00
%{nil}
@redhat@#---------------------------------------------------------------------
@redhat@# Expanded at end of %prep
@redhat@#
@redhat@%__id_u @__ID_U@
@redhat@%__chown_Rhf @__CHOWN_RHF@
@redhat@%__chgrp_Rhf @__CHGRP_RHF@
@redhat@%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
@redhat@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@
@redhat@%_fixperms %{__chmod} -Rf @FIXPERMS@
@redhat@#---------------------------------------------------------------------
@redhat@# Always use %defattr(-,root,root) in %files (added in rpm-4.0.4)
@redhat@#
@redhat@#%files(n:f:) %%files%{?-f: -f %{-f*}}%{?-n: -n %{-n*}} %{?1}\
@redhat@#%defattr(-,root,root,-)\
@redhat@#%{nil}
@mandrake@#---------------------------------------------------------------------
@mandrake@# Mandrake vendor specific macros
@mandrake@# XXX Add a support e-mail address here, please.
@mandrake@#
@mandrake@#
@mandrake@# XXX These values, particularly vendor, need to be regularized, please.
@mandrake@%_vendor MandrakeSoft
@mandrake@%_real_vendor mandrake
@mandrake@%_target_platform %{_target_cpu}-%{_real_vendor}-%{_target_os}
@mandrake@
@mandrake@# XXX I'll make these the default linux values soon as I can.
@mandrake@%_libexecdir %{_libdir}
@mandrake@%_localstatedir %{_var}/lib
@mandrake@
@mandrake@# XXX A copy of brp-mandrake, please. I'd suggest break down by
@mandrake@# functionality rather than vendor <shrug>.
@mandrake@%__os_install_post \
@mandrake@ /usr/lib/rpm/brp-mandrake \
@mandrake@%{nil}
@mandrake@
@mandrake@# make
@mandrake@%_make_bin make
@mandrake@%make if [ -z "$NPROCS" -a -f /proc/stat ]; then NPROCS=`egrep -c ^cpu[0-9]+ /proc/stat || :`; fi \
@mandrake@if [ -z "$NPROCS" -o "$NPROCS" -le "0" ]; then \
@mandrake@ NPROCS=1 \
@mandrake@fi \
@mandrake@%{_make_bin} -j$NPROCS
@mandrake@
@mandrake@# Menu directories
@mandrake@%_menudir %{_libdir}/menu
@mandrake@%_iconsdir %{_datadir}/icons
@mandrake@%_miconsdir %{_datadir}/icons/mini
@mandrake@%_liconsdir %{_datadir}/icons/large
@mandrake@
@mandrake@# Update Menu
@mandrake@%_update_menus_bin %{_bindir}/update-menus
@mandrake@%update_menus if [ -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
@mandrake@
@mandrake@# Clean Menu
@mandrake@%clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
@mandrake@
@mandrake@# Update Window Managers session.
@mandrake@%_fndsession_bin %{_sbindir}/fndSession
@mandrake@%make_session if [ -x %{_fndsession_bin} ]; then %{_fndsession_bin} || true ; fi
@mandrake@
@mandrake@# Where install-info is located
@mandrake@%__install_info /sbin/install-info
@mandrake@
@mandrake@# Macros to install info-files.
@mandrake@%_install_info() %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir\;
@mandrake@
@mandrake@# Macros to remove info-files. (keep the "alone on its line ';'")
@mandrake@%_remove_install_info() if [ "$1" = "0" ]; then %{__install_info} \\\
@mandrake@ %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir --remove ; fi\
@mandrake@%{nil}
@mandrake@
@mandrake@# Games macros
@mandrake@%_gamesdir games
@mandrake@%_gamesbindir %{_prefix}/%{_gamesdir}
@mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir}
2002-03-26 01:30:19 +03:00
@alt@#---------------------------------------------------------------------
@alt@# ALT Linux vendor specific macros.
2002-12-08 01:32:14 +03:00
@alt@# Contact rpm@packages.altlinux.org for details.
2002-03-26 01:30:19 +03:00
@alt@#
@alt@%distribution ALT Linux
@alt@%vendor ALT Linux Team
@alt@
@alt@%___build_pre \
@alt@ export RPM_SOURCE_DIR=\"%{u2p:%_sourcedir}\"\
@alt@ export RPM_BUILD_DIR=\"%{u2p:%_builddir}\"\
@alt@ export RPM_OPT_FLAGS=\"%optflags\"\
@alt@ export RPM_ARCH=\"%_arch\"\
@alt@ export RPM_OS=\"%_os\"\
@alt@ export RPM_DOC_DIR=\"%_docdir\"\
@alt@ export RPM_PACKAGE_NAME=\"%name\"\
@alt@ export RPM_PACKAGE_VERSION=\"%version\"\
@alt@ export RPM_PACKAGE_RELEASE=\"%release\"\
2003-06-11 05:57:27 +04:00
@alt@ export RPM_BUILD_ROOT=\"%{u2p:%buildroot}\"\
@alt@ %{?_cleanup_method:export RPM_CLEANUP_METHOD=\"%_cleanup_method\"}\
@alt@ %{?_compress_method:export RPM_COMPRESS_METHOD=\"%_compress_method\"}\
@alt@ %{?_fixup_method:export RPM_FIXUP_METHOD=\"%_fixup_method\"}\
@alt@ %{?_strip_method:export RPM_STRIP_METHOD=\"%_strip_method\"}\
@alt@ %{?_verify_elf_method:export RPM_VERIFY_ELF_METHOD=\"%_verify_elf_method\"}\
@alt@ %{?_findreq_method:export RPM_FINDREQ_METHOD=\"%_findreq_method\"}\
@alt@ %{?_findprov_method:export RPM_FINDPROV_METHOD=\"%_findprov_method\"}\
@alt@ %{?_findreq_default_method:export RPM_FINDREQ_DEFAULT_METHOD=\"%_findreq_default_method\"}\
@alt@ %{?_findprov_default_method:export RPM_FINDPROV_DEFAULT_METHOD=\"%_findprov_default_method\"}\
@alt@ %{?_cleanup_topdir:export RPM_CLEANUP_TOPDIR=\"%_cleanup_topdir\"}\
@alt@ %{?_compress_topdir:export RPM_COMPRESS_TOPDIR=\"%_compress_topdir\"}\
@alt@ %{?_fixup_topdir:export RPM_FIXUP_TOPDIR=\"%_fixup_topdir\"}\
@alt@ %{?_strip_topdir:export RPM_STRIP_TOPDIR=\"%_strip_topdir\"}\
@alt@ %{?_verify_elf_topdir:export RPM_VERIFY_ELF_TOPDIR=\"%_verify_elf_topdir\"}\
@alt@ %{?_findreq_topdir:export RPM_FINDREQ_TOPDIR=\"%_findreq_topdir\"}\
@alt@ %{?_findprov_topdir:export RPM_FINDPROV_TOPDIR=\"%_findprov_topdir\"}\
@alt@ %{?_cleanup_skiplist:export RPM_CLEANUP_SKIPLIST=\"%_cleanup_skiplist\"}\
@alt@ %{?_compress_skiplist:export RPM_COMPRESS_SKIPLIST=\"%_compress_skiplist\"}\
@alt@ %{?_fixup_skiplist:export RPM_FIXUP_SKIPLIST=\"%_fixup_skiplist\"}\
@alt@ %{?_strip_skiplist:export RPM_STRIP_SKIPLIST=\"%_strip_skiplist\"}\
@alt@ %{?_verify_elf_skiplist:export RPM_VERIFY_ELF_SKIPLIST=\"%_verify_elf_skiplist\"}\
@alt@ %{?_findreq_skiplist:export RPM_FINDREQ_SKIPLIST=\"%_findreq_skiplist\"}\
@alt@ %{?_findprov_skiplist:export RPM_FINDPROV_SKIPLIST=\"%_findprov_skiplist\"}\
@alt@ %{?_findprov_lib_path:export RPM_FINDPROV_LIB_PATH=\"%_findprov_lib_path\"}\
@alt@ %{?_perl_lib_path:export RPM_PERL_LIB_PATH=\"%_perl_lib_path\"}\
@alt@ %{?_perl_req_method:export RPM_PERL_REQ_METHOD=\"%_perl_req_method\"}\
2004-04-28 21:03:24 +04:00
@alt@ %{?_python_lib_path:export RPM_PYTHON_LIB_PATH=\"%_python_lib_path\"}\
2004-10-31 15:00:56 +03:00
@alt@ %{?_python_module_declared:export RPM_PYTHON_MODULE_DECLARED=\"%_python_module_declared\"}\
@alt@ %{?_python_req_hier:export RPM_PYTHON_REQ_HIER=\"%_python_req_hier\"}\
2004-04-28 21:03:24 +04:00
@alt@ %{?_python_req_method:export RPM_PYTHON_REQ_METHOD=\"%_python_req_method\"}\
@alt@ %{?_python_req_skip:export RPM_PYTHON_REQ_SKIP=\"%_python_req_skip\"}\
@alt@ %{?_python_compile_method:export RPM_PYTHON_COMPILE_METHOD=\"%_python_compile_method\"}\
@alt@ %{?_python_compile_exclude:export RPM_PYTHON_COMPILE_EXCLUDE=\"%_python_compile_exclude\"}\
@alt@ %{?_python_compile_include:export RPM_PYTHON_COMPILE_INCLUDE=\"%_python_compile_include\"}\
@alt@ %{?_python_compile_deep:export RPM_PYTHON_COMPILE_DEEP=\"%_python_compile_deep\"}\
@alt@ %{?_python_compile_skip_x:export RPM_PYTHON_COMPILE_SKIP_X=\"%_python_compile_skip_x\"}\
@alt@ %{?_python_compile_clean:export RPM_PYTHON_COMPILE_CLEAN=\"%_python_compile_clean\"}\
@alt@ %{?_tcl_lib_path:export RPM_TCL_LIB_PATH=\"%_tcl_lib_path\"}\
@alt@ %{?_tcl_req_method:export RPM_TCL_REQ_METHOD=\"%_tcl_req_method\"}\
@alt@ %{?_tcl_req_skip:export RPM_TCL_REQ_SKIP=\"%_tcl_req_skip\"}\
2003-04-22 19:11:52 +04:00
@alt@ %{?_pkg_contents_index_all:export RPM_PKG_CONTENTS_INDEX_ALL=\"%_pkg_contents_index_all\"}\
@alt@ %{?_pkg_contents_index_bin:export RPM_PKG_CONTENTS_INDEX_BIN=\"%_pkg_contents_index_bin\"}\
2003-07-21 22:03:05 +04:00
@alt@ %{?_scripts_debug:export RPM_SCRIPTS_DEBUG=\"%_scripts_debug\"}\
@alt@ %{?_keep_libtool_files:export RPM_KEEP_LIBTOOL_FILES=\"%_keep_libtool_files\"}\
@alt@ %{?__python:export RPM_PYTHON=\"%__python\"}\
@alt@ %{?__tclsh:export RPM_TCLSH=\"%__tclsh\"}\
@alt@ \
@alt@ unset LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL ||:\
@alt@ %{?_build_lang:export LANG=\"%_build_lang\"\
@alt@ export LANGUAGE=\"%_build_lang\"\
@alt@ export LC_ALL=\"%_build_lang\"}\
@alt@ \
@alt@ unset DISPLAY XAUTHORITY ||:\
@alt@ %{?_build_display:export DISPLAY=\"%_build_display\"}\
@alt@ %{?_build_xauthority:export XAUTHORITY=\"%_build_xauthority\"}\
@alt@ \
2002-12-08 01:04:51 +03:00
@alt@ unset CCACHE_CC CCACHE_CXX CCACHE_DIR ||:\
@alt@ %{?__ccache_cc:export CCACHE_CC=\"%__ccache_cc\"}\
2002-12-08 01:04:51 +03:00
@alt@ %{?__ccache_cxx:export CCACHE_CXX=\"%__ccache_cxx\"}\
@alt@ %{?__ccache_dir:export CCACHE_DIR=\"%__ccache_dir\"}\
@alt@ \
@alt@ export RPM_LIB=\"%_lib\"\
@alt@ export RPM_LIBDIR=\"%_libdir\"\
@alt@ \
2002-12-19 16:33:19 +03:00
@alt@ unset AUTOCONF_VERSION AUTOMAKE_VERSION LIBTOOL_VERSION GCC_VERSION ||:\
@alt@ %{?_autoconf_version:export AUTOCONF_VERSION=\"%_autoconf_version\"}\
@alt@ %{?_automake_version:export AUTOMAKE_VERSION=\"%_automake_version\"}\
@alt@ %{?_libtool_version:export LIBTOOL_VERSION=\"%_libtool_version\"}\
2002-12-19 16:33:19 +03:00
@alt@ %{?_gcc_version:export GCC_VERSION=\"%_gcc_version\"}\
@alt@ \
@alt@ export PAM_SO_SUFFIX=\"%{?_pam_so_suffix}\"\
@alt@ export PAM_NAME_SUFFIX=\"%{?_pam_name_suffix}\"\
2003-06-11 05:57:27 +04:00
@alt@ \
@alt@ export MAKEFLAGS=\"-w PAM_SO_SUFFIX=%{?_pam_so_suffix}\"\
@alt@ \
@alt@ %{verbose:set -x}%{!verbose:exec > /dev/null}\
@alt@ umask 022\
@alt@ %__mkdir_p %{u2p:%_builddir}\
@alt@ cd %{u2p:%_builddir}\
@alt@%nil
@alt@
@alt@%__spec_install_pre\
@alt@%{___build_pre}\
@alt@%clean_buildroot\
@alt@%{__spec_install_custom_pre}\
2002-03-26 01:30:19 +03:00
@alt@%nil
@alt@
@alt@%__spec_clean_post\
@alt@%clean_buildroot\
@alt@%{___build_post}\
@alt@%{__spec_clean_custom_post}\
2002-03-26 01:30:19 +03:00
@alt@%nil
@alt@
@alt@%_fixperms %{__chmod} -Rf u+rwX,go-w
@alt@
@alt@%_internal_gpg_path /usr/lib/alt-gpgkeys
2002-03-26 01:30:19 +03:00
@alt@
@alt@%prefix %_prefix
@alt@
2002-12-10 02:22:52 +03:00
@alt@%clean_buildroot %{?buildroot:%([ -n "$(echo %buildroot |tr -d /.)" ] && echo "%__chmod -Rf u+rwX -- %buildroot 2>/dev/null ||:; %__rm -rf -- %buildroot")}
2002-03-26 01:30:19 +03:00
@alt@
@alt@%remove_optflags(a:f:t:p:w:W:d:g:O:A:C:D:E:H:i:M:n:P:U:u:l:s:X:B:I:L:b:V:m:x:c:S:E:o:v:) \
@alt@%global optflags %(opt="%optflags"; for f in %{**}; do opt="$(echo "$opt"|sed -e "s/ $f//g;s/$f //g")"; done; echo "$opt")
@alt@
@alt@%add_optflags(a:f:t:p:w:W:d:g:O:A:C:D:E:H:i:M:n:P:U:u:l:s:X:B:I:L:b:V:m:x:c:S:E:o:v:) \
@alt@%global optflags %{optflags} %{**}
@alt@
@alt@# Make
@alt@%_make_bin make
@alt@
@alt@%__nprocs %(N=`egrep -cs ^cpu[0-9]+ /proc/stat`; [ "$N" -gt 0 ] 2>/dev/null && echo "$N" || echo 1)
@alt@
@alt@%make_build [ -n "$NPROCS" ] || NPROCS=%__nprocs; %_make_bin -j$NPROCS
@alt@
@alt@%make_install %_make_bin INSTALL="%__install -p"
@alt@
@alt@# Compatibility.
2002-03-26 01:30:19 +03:00
@alt@%make_compile %make_build
@alt@%make %_make_bin
@alt@
2005-11-30 20:26:33 +03:00
@alt@# Autotools.
@alt@%__autoreconf autoreconf -fisv
@alt@
2002-06-16 01:31:10 +04:00
@alt@# Library cache update (ldconfig) macros.
@alt@%post_ldconfig_lib /sbin/ldconfig
@alt@%post_ldconfig_sys /sbin/post_ldconfig
@alt@%post_ldconfig %post_ldconfig_lib
@alt@%postun_ldconfig /sbin/postun_ldconfig
@alt@
@alt@# Macros used for install/uninstall info files.
2002-03-26 01:30:19 +03:00
@alt@
@alt@# in %%post section.
@alt@%install_info /usr/sbin/install_info
2002-03-26 01:30:19 +03:00
@alt@
@alt@# in %%preun section.
@alt@%uninstall_info /usr/sbin/uninstall_info
@alt@
@alt@# Macros used for service install/uninstall.
@alt@%post_service /usr/sbin/post_service
@alt@%preun_service /usr/sbin/preun_service
2002-03-26 01:30:19 +03:00
@alt@
@alt@# Manpage directories.
2002-03-26 01:30:19 +03:00
@alt@%_man1dir %_mandir/man1
@alt@%_man2dir %_mandir/man2
@alt@%_man3dir %_mandir/man3
@alt@%_man4dir %_mandir/man4
@alt@%_man5dir %_mandir/man5
@alt@%_man6dir %_mandir/man6
@alt@%_man7dir %_mandir/man7
@alt@%_man8dir %_mandir/man8
@alt@%_man9dir %_mandir/man9
@alt@
2006-01-10 00:00:23 +03:00
@alt@# Desktop-related directories.
2005-06-16 20:18:15 +04:00
@alt@%_menudir %_prefix/lib/menu
2002-03-26 01:30:19 +03:00
@alt@%_iconsdir %_datadir/icons
@alt@%_miconsdir %_iconsdir/mini
@alt@%_liconsdir %_iconsdir/large
2006-01-10 00:00:23 +03:00
@alt@%_desktopdir %_datadir/applications
@alt@%_pixmapsdir %_datadir/pixmaps
2002-03-26 01:30:19 +03:00
@alt@
@alt@# Games directories.
2002-03-26 01:30:19 +03:00
@alt@%_gamesdir games
@alt@%_gamesbindir %{_prefix}/%{_gamesdir}
@alt@%_gamesdatadir %{_datadir}/%{_gamesdir}
@alt@
@alt@# X11 directories.
2002-03-26 01:30:19 +03:00
@alt@%_x11dir %{_prefix}/X11R6
@alt@%_x11bindir %{_x11dir}/bin
@alt@%_x11libdir %{_x11dir}/%_lib
@alt@%_x11x11dir %{_x11dir}/lib/X11
2002-03-26 01:30:19 +03:00
@alt@%_x11includedir %{_x11dir}/include
@alt@%_x11mandir %{_x11dir}/man
@alt@%_x11datadir %{_x11dir}/share
@alt@%_x11fontsdir %{_x11x11dir}/fonts
2002-03-26 01:30:19 +03:00
@alt@
@alt@# Initscripts.
2002-03-26 01:30:19 +03:00
@alt@%_initdir %{_sysconfdir}/rc.d/init.d
@alt@
@alt@# Licenses.
2002-03-26 01:30:19 +03:00
@alt@%_licensedir %{_datadir}/license
@alt@
@alt@# Common lock directory.
2002-03-26 01:30:19 +03:00
@alt@%_lockdir %{_var}/lock
@alt@
@alt@# Common log directory.
2002-03-26 01:30:19 +03:00
@alt@%_logdir %{_var}/log
@alt@
@alt@# Application cache data directory.
2002-03-26 01:30:19 +03:00
@alt@%_cachedir %{_var}/cache
@alt@
@alt@# Application spool data directory.
2002-03-26 01:30:19 +03:00
@alt@%_spooldir %{_var}/spool
@alt@
@alt@# pkg-config directory.
@alt@%_pkgconfigdir %{_libdir}/pkgconfig
@alt@
@alt@# Directory for emacs lisp modules.
2002-03-26 01:30:19 +03:00
@alt@%_emacslispdir %{_datadir}/emacs/site-lisp
@alt@
@alt@# TCL directories.
@alt@%_tcllibdir %_libdir/tcl
@alt@%_tcldatadir %_datadir/tcl
@alt@
2005-06-15 20:06:07 +04:00
@alt@# RPM directory.
@alt@%_rpmlibdir %_prefix/lib/rpm
@alt@
2002-03-26 01:30:19 +03:00
@alt@# Update Menus.
@alt@%_update_menus_bin %_bindir/update-menus
@alt@%update_menus [ -x %_update_menus_bin ] && %_update_menus_bin ||:
@alt@%clean_menus [ "$1" = 0 -a -x %_update_menus_bin ] && %_update_menus_bin ||:
@alt@
@alt@# Update Window Managers sessions.
@alt@%_update_wms_bin %_sbindir/update_wms
@alt@%update_wms [ -x %_update_wms_bin ] && %_update_wms_bin ||:
@alt@%clean_wms [ "$1" = 0 -a -x %_update_wms_bin ] && %_update_wms_bin ||:
@alt@
@alt@# Synchronize the scrollkeeper database.
2002-09-27 17:41:26 +04:00
@alt@%_update_scrollkeeper_bin %_bindir/scrollkeeper-update
@alt@%update_scrollkeeper [ -x %_update_scrollkeeper_bin ] && %_update_scrollkeeper_bin -q ||:
@alt@%clean_scrollkeeper [ "$1" = 0 -a -x %_update_scrollkeeper_bin ] && %_update_scrollkeeper_bin -q ||:
2002-03-26 01:30:19 +03:00
@alt@
@alt@%_defattr %%defattr(-,root,root,755)
@alt@
2002-07-23 00:41:01 +04:00
@alt@%_cleanup_method auto
2002-03-26 01:30:19 +03:00
@alt@%_compress_method auto
2002-09-09 16:35:53 +04:00
@alt@%_verify_elf_method normal
@alt@%_perl_req_method normal
2004-04-28 21:03:24 +04:00
@alt@%_python_lib_path ""
@alt@%_python_req_method slight
@alt@%_python_req_skip ""
@alt@%_python_compile_method ALL
@alt@%_python_compile_exclude /usr/share/doc
2005-06-16 20:18:15 +04:00
@alt@%_python_compile_include /usr/%_lib
2004-04-28 21:03:24 +04:00
@alt@%_python_compile_deep 20
@alt@%_python_compile_skip_x 1
@alt@%_python_compile_clean 1
@alt@%_tcl_lib_path ""
@alt@%_tcl_req_method normal
@alt@%_tcl_req_skip ""
@alt@%_fixup_method binconfig pkgconfig libtool
@alt@%_strip_method %{?_enable_debug:none}%{!?_enable_debug:executable shared}
@alt@%_findreq_default_method files lib pam perl python tcl shell
@alt@%_findprov_default_method lib pam perl python tcl shell
2002-03-26 01:30:19 +03:00
@alt@
2002-09-27 17:41:26 +04:00
@alt@%_cleanup_topdir %nil
@alt@%_compress_topdir %_usr
@alt@%_fixup_topdir %nil
2002-09-27 17:41:26 +04:00
@alt@%_strip_topdir %nil
@alt@%_verify_elf_topdir %nil
@alt@%_findreq_topdir %nil
@alt@%_findprov_topdir %nil
@alt@
@alt@%_cleanup_skiplist %nil
@alt@%_compress_skiplist %nil
@alt@%_fixup_skiplist %nil
2002-09-27 17:41:26 +04:00
@alt@%_strip_skiplist */debug/*
@alt@%_verify_elf_skiplist %nil
@alt@%_findreq_skiplist %_docdir/*
@alt@%_findprov_skiplist %_docdir/*
@alt@
@alt@%_findprov_lib_path %nil
@alt@
2002-09-27 17:41:26 +04:00
@alt@%set_cleanup_method() %global _cleanup_method %*
2002-03-26 01:30:19 +03:00
@alt@%set_compress_method() %global _compress_method %*
@alt@%set_fixup_method() %global _fixup_method %*
2002-03-26 01:30:19 +03:00
@alt@%set_strip_method() %global _strip_method %*
2002-09-09 16:35:53 +04:00
@alt@%set_verify_elf_method() %global _verify_elf_method %*
@alt@%set_perl_req_method() %global _perl_req_method %*
2004-04-28 21:03:24 +04:00
@alt@%set_python_req_method() %global _python_req_method %1
@alt@%set_python_compile_method() %global _python_compile_method %1
@alt@%set_tcl_req_method() %global _tcl_req_method %1
2002-03-26 01:30:19 +03:00
@alt@
2002-09-27 17:41:26 +04:00
@alt@%set_cleanup_topdir() %global _cleanup_topdir %*
@alt@%set_compress_topdir() %global _compress_topdir %*
@alt@%set_fixup_topdir() %global _fixup_topdir %*
2002-09-27 17:41:26 +04:00
@alt@%set_strip_topdir() %global _strip_topdir %*
@alt@%set_verify_elf_topdir() %global _verify_elf_topdir %*
@alt@%set_findreq_topdir() %global _findreq_topdir %*
@alt@%set_findprov_topdir() %global _findprov_topdir %*
@alt@
@alt@%set_cleanup_skiplist() %global _cleanup_skiplist %*
@alt@%set_compress_skiplist() %global _compress_skiplist %*
@alt@%set_fixup_skiplist() %global _fixup_skiplist %*
2002-09-27 17:41:26 +04:00
@alt@%set_strip_skiplist() %global _strip_skiplist %*
@alt@%set_verify_elf_skiplist() %global _verify_elf_skiplist %*
@alt@%set_findreq_skiplist() %global _findreq_skiplist %*
@alt@%set_findprov_skiplist() %global _findprov_skiplist %*
@alt@
@alt@%set_findprov_lib_path() %global _findprov_lib_path %*
@alt@
2002-09-27 17:41:26 +04:00
@alt@%add_cleanup_skiplist() %global _cleanup_skiplist %_cleanup_skiplist %*
@alt@%add_compress_skiplist() %global _compress_skiplist %_compress_skiplist %*
@alt@%add_fixup_skiplist() %global _fixup_skiplist %_fixup_skiplist %*
2002-09-27 17:41:26 +04:00
@alt@%add_strip_skiplist() %global _strip_skiplist %_strip_skiplist %*
@alt@%add_verify_elf_skiplist() %global _verify_elf_skiplist %_verify_elf_skiplist %*
@alt@%add_findreq_skiplist() %global _findreq_skiplist %_findreq_skiplist %*
@alt@%add_findprov_skiplist() %global _findprov_skiplist %_findprov_skiplist %*
2004-06-27 20:39:26 +04:00
@alt@
2004-04-28 21:03:24 +04:00
@alt@%add_python_req_skip() %global _python_req_skip %_python_req_skip %*
2004-06-27 20:39:26 +04:00
@alt@%add_python_lib_path() %global _python_lib_path %_python_lib_path %*
2004-04-28 21:03:24 +04:00
@alt@%add_python_compile_exclude() %global _python_compile_exclude %_python_compile_exclude %*
@alt@%add_python_compile_include() %global _python_compile_include %_python_compile_include %*
@alt@%add_tcl_req_skip() %global _tcl_req_skip %_tcl_req_skip %*
@alt@%add_tcl_lib_path() %global _tcl_lib_path %_tcl_lib_path %*
2002-09-27 17:41:26 +04:00
@alt@
@alt@%add_findprov_lib_path() %global _findprov_lib_path %_findprov_lib_path %*
@alt@
@alt@%_buildrequires_build %nil
@alt@
@alt@%set_autoconf_version() \
@alt@%global _autoconf_version %* \
@alt@%global _buildrequires_build %_buildrequires_build autoconf_%_autoconf_version \
@alt@%nil
@alt@
@alt@%set_automake_version() \
@alt@%global _automake_version %* \
@alt@%global _buildrequires_build %_buildrequires_build automake_%_automake_version \
@alt@%nil
@alt@
@alt@%set_libtool_version() \
@alt@%global _libtool_version %* \
@alt@%global _buildrequires_build %_buildrequires_build libtool_%_libtool_version \
@alt@%nil
@alt@
@alt@%set_gcc_version() \
@alt@%global _gcc_version %* \
@alt@%global _buildrequires_build %_buildrequires_build gcc%_gcc_version \
@alt@%nil
@alt@
2002-03-26 01:30:19 +03:00
@alt@%strip_executable RPM_STRIP_METHOD=executable @RPMCONFIGDIR@/brp-strip
@alt@%strip_relocatable RPM_STRIP_METHOD=relocatable @RPMCONFIGDIR@/brp-strip
@alt@%strip_shared RPM_STRIP_METHOD=shared @RPMCONFIGDIR@/brp-strip
@alt@%strip_static RPM_STRIP_METHOD=static @RPMCONFIGDIR@/brp-strip
@alt@
@alt@%cleanup_build @RPMCONFIGDIR@/brp-cleanup
@alt@
@alt@%compress_docs @RPMCONFIGDIR@/brp-compress
@alt@
@alt@%strip_binaries @RPMCONFIGDIR@/brp-strip
@alt@
@alt@# Alternate build section header for "multi-build" packages.
@alt@%buildmulti \
@alt@%global __spec_install_pre %{___build_pre}\
@alt@%build\
@alt@%clean_buildroot\
@alt@%{__spec_install_custom_pre}\
2002-03-26 01:30:19 +03:00
@alt@%nil
@alt@
@alt@# MDK backwards compatibility.
@alt@%_install_info %install_info
@alt@%_remove_install_info %uninstall_info
@alt@
2002-03-26 01:30:19 +03:00
@alt@%_initrddir %_initdir
@alt@%make_session %update_wms
@alt@
2002-10-04 01:26:22 +04:00
@alt@# GCC versioning.
@alt@%__gcc_version %(gcc -dumpversion)
@alt@%__gcc_version_major %(gcc -dumpversion |cut -d. -f1)
@alt@%__gcc_version_minor %(gcc -dumpversion |cut -d. -f2)
@alt@%__gcc_version_patch %(gcc -dumpversion |cut -d. -f3)
@alt@%__gcc_version_base %(gcc -dumpversion |cut -d. -f-2)
@alt@
2002-03-26 01:30:19 +03:00
@alt@# <BEGIN GLIBC TRICKS
@alt@%__glibc_version %(rpmquery --qf '%%{VERSION}' glibc)
2002-03-26 01:30:19 +03:00
@alt@%__glibc_version_major %(echo %__glibc_version |cut -d. -f1)
@alt@%__glibc_version_minor %( \
@alt@ maj=`echo %__glibc_version_major`; \
@alt@ min=`echo %__glibc_version|cut -d. -f2`; \
@alt@ rel=`echo %__glibc_version|cut -d. -f3`; \
@alt@ [ -n "$rel" ] || rel=0; \
@alt@ if [ "$maj" -eq 2 -a "$min" -eq 1 -a "$rel" -gt 90 ]; then \
@alt@ min=2 \
@alt@ fi \
@alt@ echo -n "$min" \
@alt@)
@alt@# END GLIBC TRICKS>
@alt@
@alt@%__python_version %(%__python -c 'import sys; print "%%u.%%u" %% sys.version_info[0:2]' 2>/dev/null || echo unknown)
2002-03-26 01:30:19 +03:00
@alt@
@alt@# Access components of packager macro.
@alt@%packagerName %(echo -E '%packager' |sed -e 's/[[:space:]]*<.*//')
@alt@%packagerAddress %(echo -E '%packager' |sed -e 's/.*<\\\([^<>]\\+@[^<>]\\+\\\)>.*/\\1/')
@alt@
@alt@#
@alt@# With/without/enable/disable logic.
@alt@#
@alt@
@alt@# Set with/without default value.
@alt@%def_with() %{expand:%%{!?_with_%{1}: %%{!?_without_%{1}: %%global _with_%{1} --with-%{1}}}}
@alt@%def_without() %{expand:%%{!?_with_%{1}: %%{!?_without_%{1}: %%global _without_%{1} --without-%{1}}}}
@alt@
@alt@# Set enable/disable default value.
@alt@%def_enable() %{expand:%%{!?_enable_%{1}: %%{!?_disable_%{1}: %%global _enable_%{1} --enable-%{1}}}}
@alt@%def_disable() %{expand:%%{!?_enable_%{1}: %%{!?_disable_%{1}: %%global _disable_%{1} --disable-%{1}}}}
@alt@
2004-02-22 21:17:44 +03:00
@alt@# Set with/without value.
@alt@%force_with() %{expand:%%global _with_%{1} --with-%{1}}
@alt@%force_without() %{expand:%%global _without_%{1} --without-%{1}}
@alt@
@alt@# Set enable/disable value.
@alt@%force_enable() %{expand:%%global _enable_%{1} --enable-%{1}}
@alt@%force_disable() %{expand:%%global _disable_%{1} --disable-%{1}}
@alt@
@alt@# Check whether both _with_%{1} and _without_%{1} are defined.
@alt@%check_def() %{expand:%%{?_with_%{1}: %%{?_without_%{1}: %%{error: both _with_%{1} and _without_%{1} are defined}}}} \
@alt@ %{expand:%%{?_enable_%{1}: %%{?_disable_%{1}: %%{error: both _enable_%{1} and _disable_%{1} are defined}}}}
@alt@
@alt@# Check for defined/undefined.
@alt@%defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
@alt@%undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
@alt@
@alt@# ifdef/ifndef.
@alt@%ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
@alt@%ifndef() %if %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
@alt@
@alt@# Check for with/without.
@alt@%with() %{expand:%%{?_with_%{1}:1}%%{!?_with_%{1}:0}}
@alt@%without() %{expand:%%{?_without_%{1}:1}%%{!?_without_%{1}:0}}
@alt@
@alt@# if_with/if_without.
@alt@%if_with() %if %{expand:%%{?_with_%{1}:1}%%{!?_with_%{1}:0}}
@alt@%if_without() %if %{expand:%%{?_without_%{1}:1}%%{!?_without_%{1}:0}}
@alt@
@alt@# Check for enabled/disabled.
@alt@%enabled() %{expand:%%{?_enable_%{1}:1}%%{!?_enable_%{1}:0}}
@alt@%disabled() %{expand:%%{?_disable_%{1}:1}%%{!?_disable_%{1}:0}}
@alt@
@alt@# if_enabled/if_disabled.
@alt@%if_enabled() %if %{expand:%%{?_enable_%{1}:1}%%{!?_enable_%{1}:0}}
@alt@%if_disabled() %if %{expand:%%{?_disable_%{1}:1}%%{!?_disable_%{1}:0}}
@alt@
@alt@# substitute with/without/enable/disable macros.
@alt@%subst_with() %{expand:%%{?_with_%{1}:%%{_with_%{1}}}} %{expand:%%{?_without_%{1}:%%{_without_%{1}}}}
@alt@%subst_enable() %{expand:%%{?_enable_%{1}:%%{_enable_%{1}}}} %{expand:%%{?_disable_%{1}:%%{_disable_%{1}}}}
@alt@
2002-03-26 01:30:19 +03:00
@alt@# Fetch name/serial/version/release fields.
@alt@%get_version() %(rpmquery --qf '%%{VERSION}' %1 2>/dev/null)
@alt@%get_release() %(rpmquery --qf '%%{RELEASE}' %1 2>/dev/null)
@alt@%get_serial() %(rpmquery --qf '%%{SERIAL}' %1 2>/dev/null)
@alt@%add_serial() %(rpmquery --qf '%%|SERIAL?{Serial: %%{SERIAL}}|' %1 2>/dev/null)
@alt@%get_SVR() %(rpmquery --qf '%%|SERIAL?{%%{SERIAL}:}|%%{VERSION}-%%{RELEASE}' %1 2>/dev/null)
@alt@%get_NSVR() %(rpmquery --qf '%%{NAME}-%%|SERIAL?{%%{SERIAL}:}|%%{VERSION}-%%{RELEASE}' %1 2>/dev/null)
@alt@%get_dep() %(rpmquery --qf '%%{NAME} >= %%|SERIAL?{%%{SERIAL}:}|%%{VERSION}-%%{RELEASE}' %1 2>/dev/null || echo '%1 >= unknown')
@alt@%rpm_check_field(p:) %(foo=`rpmquery --qf '%%{%1}' %{-p:%{-p*}} 2>/dev/null`; [ "`expr '$foo' '>' '%2'`" -eq 1 ] && echo -n "$foo" || echo -n "%2")
@alt@
@alt@# Define php_version and php_release to version and release no less than specified one via -n option
@alt@%php_version(n:) %rpm_check_field -p php VERSION %{-n:%{-n*}}
@alt@%php_release(n:) %rpm_check_field -p php RELEASE %{-n:%{-n*}}
@alt@
2002-03-26 01:30:19 +03:00
@alt@## compiler optflags defaults
@alt@
@alt@# core flags
@alt@%optflags_core -pipe
@alt@
@alt@# default optimization level
@alt@%_optlevel 2
@alt@
@alt@# general optimization flags
@alt@%optflags_optimization -O%{_optlevel}
2002-03-26 01:30:19 +03:00
@alt@
@alt@# warning flags
@alt@%optflags_warnings -Wall%{?_enable_Werror: -Werror}
2002-03-26 01:30:19 +03:00
@alt@
@alt@# debug flags
@alt@%optflags_debug -g
@alt@
@alt@# shared libraries flags
@alt@%optflags_shared -fPIC -DPIC
@alt@
@alt@# break c++ programs which use exceptions
@alt@%optflags_nocpp -fno-exceptions -fno-rtti
@alt@
@alt@# disables traceback, making debugging impossible
@alt@%optflags_notraceback -fomit-frame-pointer
@alt@
@alt@# aggressive floating-point optimization,
@alt@# violate some ANSI or IEEE rules and/or specifications
@alt@%optflags_fastmath -ffast-math
@alt@
@alt@# enable strict aliasing rules, applicable for well written code
@alt@%optflags_strict -fstrict-aliasing
@alt@
@alt@# flags for compiling kernel
2002-11-04 20:37:40 +03:00
@alt@%optflags_kernel -falign-loops=2 -falign-jumps=2 -falign-functions=2 -mpreferred-stack-boundary=2
2002-03-26 01:30:19 +03:00
@alt@
@alt@%optflags_default %optflags_core %optflags_warnings %{?_enable_debug:%optflags_debug}%{!?_enable_debug:%{optflags_optimization}}