10139N/A#
10318N/A# Macro definitions for Solaris packages
10139N/A#
18857N/A# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
10139N/A#
10139N/A
10318N/A%include prod.inc
11310N/A%include options.inc
10139N/A
10318N/ASUNW_Pkg_AllZones: false
10318N/ASUNW_Pkg_Hollow: false
10318N/ASUNW_Pkg_ThisZone: false
10318N/A
19944N/AMeta(variant.opensolaris.zone): global,nonglobal
19944N/A
18857N/A# Set to 1 if $CC includes "gcc" (gcc4, parfait-gcc, etc.), otherwise 0
18857N/A%define cc_is_gcc %(basename "$CC" | grep -c gcc)
10139N/A
10139N/A%define is_nevada %(test `uname -r` = 5.11 && echo 1 || echo 0)
10139N/A%define is_s10 %(test `uname -r` = 5.10 && echo 1 || echo 0)
10139N/A%define _patch_options --fuzz=0 --unified
10139N/A
10139N/ASUNW_Category: %{default_category}
10139N/ASUNW_HotLine: Please contact your local service provider
10139N/ASUNW_MaxInst: 1000
10139N/ASUNW_Rev: 110.0.4.%(date +%Y.%m.%d.%H.%M)
12895N/A# no such file so this will break the build if the package
12895N/A# does not specify a copyright file:
12895N/ASUNW_Copyright: error-no-copyright
10139N/A
10139N/A%define _libexecdir %{_prefix}/lib
10139N/A%define _mandir %{_datadir}/man
10139N/A
10318N/A# by default we don't build optimised versions
10318N/A%define opt_sparcv9 0
10318N/A%define opt_amd64 0
10318N/A%define opt_sse2 0
10318N/A# opt_arch64 means opt_sparcv9 or opt_amd64
10318N/A%define opt_arch64 0
10318N/A# can_isaexec gets redefined to 1 if multiple isas are built
10318N/A%define can_isaexec 0
10318N/A%ifarch sparc
10318N/A%define base_isa sparcv7
10318N/A%define base_arch sparc
10139N/A%else
10318N/A%define base_isa i86
10318N/A%define base_arch i386
10139N/A%endif
10139N/A
10427N/A%define arch_ldadd
10427N/A%define ldadd
10427N/A
10139N/A%if %debug_build
10427N/A%define _ldflags %arch_ldadd %ldadd ${EXTRA_LDFLAGS}
10139N/A%else
10427N/A%define _ldflags %arch_ldadd %ldadd -Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect ${EXTRA_LDFLAGS}
10139N/A%endif
10139N/A
10318N/A%define gcc_picflags -fPIC -DPIC
10318N/A%define suncc_picflags -KPIC
10318N/A
10318N/A# ifarch doesn't support checking for sse2
10318N/A# this macros allows you to use %if %arch_sse2 instead
10318N/A%define arch_sse2 %(isainfo -x | grep sse2 > /dev/null && echo 1 || echo 0)
10318N/A
10318N/A# temporary, until all spec files are converted to the new multi-isa build
10318N/A# technique
10318N/A%ifarch amd64 sparcv9
10318N/A%include arch64.inc
10139N/A%endif
10139N/A
10318N/A%include base.inc
10139N/A
10139N/A%define _basedir /usr
10139N/A%define _subdir
10139N/A%define _prefix %{_basedir}
10139N/A%define _sysconfdir /etc
10139N/A%define _localstatedir /var
10318N/A%define _localedir %{_datadir}/locale
18177N/A%define _pkg_config_path %{_libdir}/pkgconfig:%{_datadir}/pkgconfig
10139N/A
18688N/A%define classification_prefix org.opensolaris.category.2008
18688N/A
19126N/A# specific basedir for the intermediate l10n pkgs
19126N/A%define _gnome_il10n_basedir /intermediatel10n/gnome
19126N/A%define _tgnome_il10n_basedir /intermediatel10n/tgnome
19126N/A%define _dto_il10n_basedir /intermediatel10n/desktop-other
19126N/A
10139N/A# ChangeLog:
19944N/A# 2011-01-19 Laszlo (Laca) Peter <laszlo.peter@oracle.com>
19944N/A# - define variant.opensolaris.zone
18857N/A# 2010-06-04 Alan Coopersmith <alan.coopersmith@oracle.com>
18857N/A# - Make cc_is_gcc work with names like gcc-4.3.3 and parfait-gcc
18688N/A# 2010-04-24 Dave Lin <dave.lin@sun.com>
18688N/A# - Add macro ips_classification_prefix
18005N/A# 2009-12-30 Halton Huo <halton.huo@sun.com>
18005N/A# - Remove cc_is_ssxx macros since we use ss12 always
15271N/A# 2008-10-29 Laszlo (Laca) Peter <laca@sun.com>
15271N/A# - respect $CC when checking compiler version
12895N/A# 2008-04-18 Laszlo (Laca) Peter <laca@sun.com>
12895N/A# - set default copyright to "error-no-copyright" which is not the name
12895N/A# of a file, so it will break the build if a package has no copyright file
12707N/A# 2008-03-30 Laszlo (Laca) Peter <laca@sun.com>
12707N/A# - define cc_is_ss11 and cc_is_ss12
11313N/A# 2007-09-28 Laszlo (Laca) Peter <laca@sun.com>
11313N/A# - copy arch_ldadd definition from base.inc
11310N/A# 2007-09-27 Laszlo (Laca) Peter <laca@sun.com>
11310N/A# - move configurable build options to options.inc and include
11310N/A# options.inc
10427N/A# 2007-04-05 Laszlo (Laca) Peter <laca@sun.com>
10427N/A# - fix _ldflags so that it includes the architecture specific flags
10318N/A# 2007-03-15 Laszlo (Laca) Peter <laca@sun.com>
10318N/A# - move product specific tags and macros to prod.inc
10318N/A# - define can_isaexec, base_isa, base_arch
10318N/A# - define arch_sse2
10318N/A# - move 32-bit compiler flags to base.inc and include base.inc
10318N/A# - move 64-bit compiler flags to arch64.inc and include it temporarily,
10318N/A# but it will not be needed once all spec files that build 64-bit are
10318N/A# rewritten to the new style
10139N/A# 2007-01-28 Laszlo Peter <laca@sun.com>
10139N/A# - define %is_s10
10139N/A# 2006-12-06 Damien Carbery <damien.carbery@sun.com>
10139N/A# - Bump SUNW_ProdVers and default_pkg_version to 2.17.3.
10139N/A# 2006-11-23 Damien Carbery <damien.carbery@sun.com>
10139N/A# - Bump SUNW_ProdVers and default_pkg_version to 2.17.1.
10139N/A# 2006-11-03 Laszlo Peter <laca@sun.com>
10139N/A# - define %gtk_doc_option, lets the user disable building gtk-docs
10139N/A# using --without-gtk-doc; also added comments about usage
10139N/A# 2006-10-03 Laszlo Peter <laca@sun.com>
10139N/A# - define %_patch_options, this specifies extra options for gpatch when
10139N/A# using pkgbuild 1.1.1 or later
10139N/A# 2006-10-03 Damien Carbery <damien.carbery@sun.com>
10139N/A# - Bump SUNW_ProdVers and default_pkg_version to 2.16.1.
10139N/A# 2006-09-18 Laszlo Peter <laca@sun.com>
10139N/A# - define cxx_optflags64
10139N/A# 2006-08-23 Laszlo Peter <laca@sun.com>
10139N/A# - define _localstatedir
10139N/A# 2006-06-02 Laszlo Peter <laca@sun.com>
10139N/A# - add the date string back into REV
10139N/A# 2005-11-28 Laszlo Peter <laca@sun.com>
10139N/A# - add -z combreloc and -Bdirect to the LDFLAGS
10139N/A# 2005-10-23 Laszlo Peter <laca@sun.com>
10139N/A# - define debug_build (if --with-debug is used) and build_l10n
10139N/A# (when --with-l10n is used) build_l10n will disable building
10139N/A# the l10n packages but needs changes in the spec files to work;
10139N/A# debug_build is already functional: replaces the optimisation flags
10139N/A# with -g and disables stripping the binaries. (Yay!)
10139N/A# 2005-10-14 Laszlo Peter <laca@sun.com>
10139N/A# - define _ldflags
10139N/A# 2005-09-19 Laszlo Peter <laca@sun.com>
10139N/A# - add -xregs=no%frameptr (Sun CC) or -fomit-frame-pointers (gcc)
10139N/A# flags to enable dtrace get stack traces
10139N/A# 2005-09-17 Laszlo Peter <laca@sum.com>
10139N/A# - define %picflags and add them to the gcc CFLAGS otherwise most things
10139N/A# seem to break
10139N/A# 2005-09-16 Laszlo Peter <laca@sun.com>
10139N/A# - define cc_is_gcc and define gcc specific compiler flags
10139N/A# 2005-09-15 Brian Cameron <brian.cameron@sun.com>
10139N/A# - Backout debug lines I accidently committed to this file.
10139N/A# 2005-07-14 Laszlo Peter <laca@sun.com>
10139N/A# - update product version to 2.10
10139N/A# 2004-11-01 Laszlo Peter <laca@sun.com>
10139N/A# - temporarily removed -O for amd64 to stop gtk-demo crashing
10139N/A# 2004-10-13 Laszlo Peter <laca@sun.com>
10139N/A# - defined _pkg_config_path64
10139N/A# 2004-10-02 Laszlo Peter <laca@sun.com>
10139N/A# - defined jds_version
10139N/A# 2004-10-02 Joseph Townsend <jan@eng.sun.com>
10139N/A# - Create 64bit libraries for Solaris
10139N/A# 2004-08-12 Shirley Woo <shirley.woo@sun.com>
10139N/A# - Updated SUNW_Category for G2.6 packages to 2.6.0
10139N/A# 2004-07-23 Laszlo Peter <laca@sun.com>
10139N/A# - Changed default copyright notice to default-copyright.txt
10139N/A# - Prefixed REV with 9.7.2
10139N/A# 2004-06-26 Shirley Woo <shirley.woo@sun.com>
10139N/A# - Changed install location to /usr/...
10139N/A# 2004-06-21 Laszlo Peter <laca@sun.com>
10139N/A# - descrease C++ optimisation level to xO3
10139N/A# - define _pkg_config_path
10139N/A# 2004-05-03 Laszlo Peter <laca@sun.com>
10139N/A# - define _basedir
10139N/A# 2004-04-14 Laszlo Peter <laca@sun.com>
10139N/A# - change CATEGORY to GNOME2,application,JDS3
10139N/A# 2004-02-28 Laszlo Peter <laca@sun.com>
10139N/A# - add -mr and -xtrconst options, -xpentium on intel.
10139N/A# - define cxx_optflags for CC compilation