Solaris.inc revision 18005
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# Macro definitions for Solaris packages
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# Copyright 2008 Sun Microsystems, Inc.
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%include prod.inc
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%include options.inc
355b4669e025ff377602b6fc7caaf30dbc218371jacobsSUNW_Pkg_AllZones: false
355b4669e025ff377602b6fc7caaf30dbc218371jacobsSUNW_Pkg_Hollow: false
355b4669e025ff377602b6fc7caaf30dbc218371jacobsSUNW_Pkg_ThisZone: false
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%define cc_is_gcc %(test "x`basename $CC`" = xgcc && echo 1 || echo 0)
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%define is_nevada %(test `uname -r` = 5.11 && echo 1 || echo 0)
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%define is_s10 %(test `uname -r` = 5.10 && echo 1 || echo 0)
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%define _patch_options --fuzz=0 --unified
355b4669e025ff377602b6fc7caaf30dbc218371jacobsSUNW_Category: %{default_category}
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali BahramiSUNW_HotLine: Please contact your local service provider
355b4669e025ff377602b6fc7caaf30dbc218371jacobsSUNW_MaxInst: 1000
355b4669e025ff377602b6fc7caaf30dbc218371jacobsSUNW_Rev: 110.0.4.%(date +%Y.%m.%d.%H.%M)
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# no such file so this will break the build if the package
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# does not specify a copyright file:
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali BahramiSUNW_Copyright: error-no-copyright
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami%define _libexecdir %{_prefix}/lib
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami%define _mandir %{_datadir}/man
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# by default we don't build optimised versions
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami%define opt_sparcv9 0
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami%define opt_amd64 0
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami%define opt_sse2 0
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# opt_arch64 means opt_sparcv9 or opt_amd64
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami%define opt_arch64 0
bfed486ad8de8b8ebc6345a8e10accae08bf2f45Ali Bahrami# can_isaexec gets redefined to 1 if multiple isas are built
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%define can_isaexec 0
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%ifarch sparc
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define base_isa sparcv7
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define base_arch sparc
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%define base_isa i86
355b4669e025ff377602b6fc7caaf30dbc218371jacobs%define base_arch i386
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%if %option_with_gnu_iconv
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define arch_ldadd -Wl,-zignore -R/usr/gnu/lib -lgnuintl -lgnuiconv
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define arch_ldadd
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define ldadd
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%if %debug_build
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define _ldflags %arch_ldadd %ldadd ${EXTRA_LDFLAGS}
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define _ldflags %arch_ldadd %ldadd -Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect ${EXTRA_LDFLAGS}
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define gcc_picflags -fPIC -DPIC
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define suncc_picflags -KPIC
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# ifarch doesn't support checking for sse2
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# this macros allows you to use %if %arch_sse2 instead
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define arch_sse2 %(isainfo -x | grep sse2 > /dev/null && echo 1 || echo 0)
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# temporary, until all spec files are converted to the new multi-isa build
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%ifarch amd64 sparcv9
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%include arch64.inc
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%include base.inc
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define _basedir /usr
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define _subdir
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define _prefix %{_basedir}
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define _sysconfdir /etc
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define _localstatedir /var
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define _localedir %{_datadir}/locale
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami%define _pkg_config_path %{_libdir}/pkgconfig
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2009-12-30 Halton Huo <halton.huo@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - Remove cc_is_ssxx macros since we use ss12 always
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2008-10-29 Laszlo (Laca) Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - respect $CC when checking compiler version
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2008-04-18 Laszlo (Laca) Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - set default copyright to "error-no-copyright" which is not the name
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# of a file, so it will break the build if a package has no copyright file
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2008-03-30 Laszlo (Laca) Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define cc_is_ss11 and cc_is_ss12
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2007-09-28 Laszlo (Laca) Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - copy arch_ldadd definition from base.inc
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2007-09-27 Laszlo (Laca) Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - move configurable build options to options.inc and include
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# options.inc
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2007-04-05 Laszlo (Laca) Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - fix _ldflags so that it includes the architecture specific flags
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2007-03-15 Laszlo (Laca) Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - move product specific tags and macros to prod.inc
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define can_isaexec, base_isa, base_arch
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define arch_sse2
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - move 32-bit compiler flags to base.inc and include base.inc
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - move 64-bit compiler flags to arch64.inc and include it temporarily,
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# but it will not be needed once all spec files that build 64-bit are
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# rewritten to the new style
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2007-01-28 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define %is_s10
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2006-12-06 Damien Carbery <damien.carbery@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - Bump SUNW_ProdVers and default_pkg_version to 2.17.3.
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2006-11-23 Damien Carbery <damien.carbery@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - Bump SUNW_ProdVers and default_pkg_version to 2.17.1.
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2006-11-03 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define %gtk_doc_option, lets the user disable building gtk-docs
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# using --without-gtk-doc; also added comments about usage
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2006-10-03 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define %_patch_options, this specifies extra options for gpatch when
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# using pkgbuild 1.1.1 or later
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2006-10-03 Damien Carbery <damien.carbery@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - Bump SUNW_ProdVers and default_pkg_version to 2.16.1.
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2006-09-18 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define cxx_optflags64
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2006-08-23 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define _localstatedir
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2006-06-02 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - add the date string back into REV
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2005-11-28 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - add -z combreloc and -Bdirect to the LDFLAGS
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2005-10-23 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define debug_build (if --with-debug is used) and build_l10n
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# (when --with-l10n is used) build_l10n will disable building
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# the l10n packages but needs changes in the spec files to work;
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# debug_build is already functional: replaces the optimisation flags
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# with -g and disables stripping the binaries. (Yay!)
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2005-10-14 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - define _ldflags
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2005-09-19 Laszlo Peter <laca@sun.com>
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# - add -xregs=no%frameptr (Sun CC) or -fomit-frame-pointers (gcc)
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# flags to enable dtrace get stack traces
cd3e933325e68e23516a196a8fea7f49b1e497c3Ali Bahrami# 2005-09-17 Laszlo Peter <laca@sum.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - define %picflags and add them to the gcc CFLAGS otherwise most things
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# seem to break
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2005-09-16 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - define cc_is_gcc and define gcc specific compiler flags
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2005-09-15 Brian Cameron <brian.cameron@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - Backout debug lines I accidently committed to this file.
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2005-07-14 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - update product version to 2.10
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-11-01 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - temporarily removed -O for amd64 to stop gtk-demo crashing
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-10-13 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - defined _pkg_config_path64
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-10-02 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - defined jds_version
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-10-02 Joseph Townsend <jan@eng.sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - Create 64bit libraries for Solaris
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-08-12 Shirley Woo <shirley.woo@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - Updated SUNW_Category for G2.6 packages to 2.6.0
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-07-23 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - Changed default copyright notice to default-copyright.txt
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - Prefixed REV with 9.7.2
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-06-26 Shirley Woo <shirley.woo@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - Changed install location to /usr/...
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-06-21 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - descrease C++ optimisation level to xO3
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - define _pkg_config_path
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-05-03 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - define _basedir
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-04-14 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - change CATEGORY to GNOME2,application,JDS3
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# 2004-02-28 Laszlo Peter <laca@sun.com>
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - add -mr and -xtrconst options, -xpentium on intel.
355b4669e025ff377602b6fc7caaf30dbc218371jacobs# - define cxx_optflags for CC compilation