Home | History | Annotate | Download | only in include
      1 #
      2 # Macro definitions for Solaris packages
      3 #
      4 # Copyright 2008 Sun Microsystems, Inc.
      5 #
      6 
      7 %include prod.inc
      8 %include options.inc
      9 
     10 SUNW_Pkg_AllZones:         false
     11 SUNW_Pkg_Hollow:           false
     12 SUNW_Pkg_ThisZone:         false
     13 
     14 %define cc_is_gcc %(test "x`basename $CC`" = xgcc && echo 1 || echo 0)
     15 %define cc_is_ss11 %(${CC:-cc} -V 2>&1 | /bin/egrep -s 'Sun C 5\.8' && echo 1 || echo 0)
     16 %define cc_is_ss12 %(${CC:-cc} -V 2>&1 | /bin/egrep -s 'Sun C 5\.9' && echo 1 || echo 0)
     17 
     18 %define is_nevada %(test `uname -r` = 5.11 && echo 1 || echo 0)
     19 %define is_s10    %(test `uname -r` = 5.10 && echo 1 || echo 0)
     20 %define _patch_options --fuzz=0 --unified
     21 
     22 SUNW_Category:             %{default_category}
     23 SUNW_HotLine:              Please contact your local service provider
     24 SUNW_MaxInst:              1000
     25 SUNW_Rev:		   110.0.4.%(date +%Y.%m.%d.%H.%M)
     26 # no such file so this will break the build if the package
     27 # does not specify a copyright file:
     28 SUNW_Copyright:            error-no-copyright
     29 
     30 %define _libexecdir        %{_prefix}/lib
     31 %define _mandir		   %{_datadir}/man
     32 
     33 # by default we don't build optimised versions
     34 %define opt_sparcv9 0
     35 %define opt_amd64   0
     36 %define opt_sse2    0
     37 # opt_arch64 means opt_sparcv9 or opt_amd64
     38 %define opt_arch64  0
     39 # can_isaexec gets redefined to 1 if multiple isas are built
     40 %define can_isaexec 0
     41 %ifarch sparc
     42 %define base_isa sparcv7
     43 %define base_arch sparc
     44 %else
     45 %define base_isa i86
     46 %define base_arch i386
     47 %endif
     48 
     49 %if %option_with_gnu_iconv
     50 %define arch_ldadd -Wl,-zignore -R/usr/gnu/lib -lgnuintl -lgnuiconv
     51 %else
     52 %define arch_ldadd
     53 %endif
     54 %define ldadd
     55 
     56 %if %debug_build
     57 %define _ldflags           %arch_ldadd %ldadd ${EXTRA_LDFLAGS}
     58 %else
     59 %define _ldflags           %arch_ldadd %ldadd -Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect ${EXTRA_LDFLAGS}
     60 %endif
     61 
     62 %define gcc_picflags -fPIC -DPIC
     63 %define suncc_picflags -KPIC
     64 
     65 # ifarch doesn't support checking for sse2
     66 # this macros allows you to use %if %arch_sse2 instead
     67 %define arch_sse2 %(isainfo -x | grep sse2 > /dev/null && echo 1 || echo 0)
     68 
     69 # temporary, until all spec files are converted to the new multi-isa build
     70 # technique
     71 %ifarch amd64 sparcv9
     72 %include arch64.inc
     73 %endif
     74 
     75 %include base.inc
     76 
     77 %define _basedir           /usr
     78 %define _subdir            
     79 %define _prefix		   %{_basedir}
     80 %define _sysconfdir	   /etc
     81 %define _localstatedir	   /var
     82 %define _localedir	   %{_datadir}/locale
     83 %define _pkg_config_path   %{_libdir}/pkgconfig
     84 
     85 # ChangeLog:
     86 #
     87 # 2008-10-29  Laszlo (Laca) Peter  <laca (at] sun.com>
     88 # - respect $CC when checking compiler version
     89 # 2008-04-18  Laszlo (Laca) Peter  <laca (at] sun.com>
     90 # - set default copyright to "error-no-copyright" which is not the name
     91 #   of a file, so it will break the build if a package has no copyright file
     92 # 2008-03-30  Laszlo (Laca) Peter  <laca (at] sun.com>
     93 # - define cc_is_ss11 and cc_is_ss12
     94 # 2007-09-28  Laszlo (Laca) Peter  <laca (at] sun.com>
     95 # - copy arch_ldadd definition from base.inc
     96 # 2007-09-27  Laszlo (Laca) Peter  <laca (at] sun.com>
     97 # - move configurable build options to options.inc and include
     98 #   options.inc
     99 # 2007-04-05  Laszlo (Laca) Peter  <laca (at] sun.com>
    100 # - fix _ldflags so that it includes the architecture specific flags
    101 # 2007-03-15  Laszlo (Laca) Peter  <laca (at] sun.com>
    102 # - move product specific tags and macros to prod.inc
    103 # - define can_isaexec, base_isa, base_arch
    104 # - define arch_sse2
    105 # - move 32-bit compiler flags to base.inc and include base.inc
    106 # - move 64-bit compiler flags to arch64.inc and include it temporarily,
    107 #   but it will not be needed once all spec files that build 64-bit are
    108 #   rewritten to the new style
    109 # 2007-01-28  Laszlo Peter  <laca (at] sun.com>
    110 # - define %is_s10
    111 # 2006-12-06  Damien Carbery  <damien.carbery (at] sun.com>
    112 # - Bump SUNW_ProdVers and default_pkg_version to 2.17.3.
    113 # 2006-11-23  Damien Carbery  <damien.carbery (at] sun.com>
    114 # - Bump SUNW_ProdVers and default_pkg_version to 2.17.1.
    115 # 2006-11-03  Laszlo Peter  <laca (at] sun.com>
    116 # - define %gtk_doc_option, lets the user disable building gtk-docs
    117 #   using --without-gtk-doc; also added comments about usage
    118 # 2006-10-03  Laszlo Peter  <laca (at] sun.com>
    119 # - define %_patch_options, this specifies extra options for gpatch when
    120 #   using pkgbuild 1.1.1 or later
    121 # 2006-10-03  Damien Carbery <damien.carbery (at] sun.com>
    122 # - Bump SUNW_ProdVers and default_pkg_version to 2.16.1.
    123 # 2006-09-18  Laszlo Peter  <laca (at] sun.com>
    124 # - define cxx_optflags64
    125 # 2006-08-23  Laszlo Peter  <laca (at] sun.com>
    126 # - define _localstatedir
    127 # 2006-06-02  Laszlo Peter  <laca (at] sun.com>
    128 # - add the date string back into REV
    129 # 2005-11-28  Laszlo Peter  <laca (at] sun.com>
    130 # - add -z combreloc and -Bdirect to the LDFLAGS
    131 # 2005-10-23  Laszlo Peter  <laca (at] sun.com>
    132 # - define debug_build (if --with-debug is used) and build_l10n
    133 #   (when --with-l10n is used)  build_l10n will disable building
    134 #   the l10n packages but needs changes in the spec files to work;
    135 #   debug_build is already functional: replaces the optimisation flags
    136 #   with -g and disables stripping the binaries. (Yay!)
    137 # 2005-10-14  Laszlo Peter  <laca (at] sun.com>
    138 # - define _ldflags
    139 # 2005-09-19  Laszlo Peter  <laca (at] sun.com>
    140 # - add -xregs=no%frameptr (Sun CC) or -fomit-frame-pointers (gcc)
    141 #   flags to enable dtrace get stack traces
    142 # 2005-09-17  Laszlo Peter  <laca (at] sum.com>
    143 # - define %picflags and add them to the gcc CFLAGS otherwise most things
    144 #   seem to break
    145 # 2005-09-16  Laszlo Peter  <laca (at] sun.com>
    146 # - define cc_is_gcc and define gcc specific compiler flags
    147 # 2005-09-15  Brian Cameron  <brian.cameron (at] sun.com>
    148 # - Backout debug lines I accidently committed to this file.
    149 # 2005-07-14  Laszlo Peter  <laca (at] sun.com>
    150 # - update product version to 2.10
    151 # 2004-11-01  Laszlo Peter  <laca (at] sun.com>
    152 # - temporarily removed -O for amd64 to stop gtk-demo crashing
    153 # 2004-10-13  Laszlo Peter  <laca (at] sun.com>
    154 # - defined _pkg_config_path64
    155 # 2004-10-02  Laszlo Peter  <laca (at] sun.com>
    156 # - defined jds_version
    157 # 2004-10-02  Joseph Townsend <jan (at] eng.sun.com>
    158 # - Create 64bit libraries for Solaris
    159 # 2004-08-12  Shirley Woo  <shirley.woo (at] sun.com>
    160 # - Updated SUNW_Category for G2.6 packages to 2.6.0
    161 # 2004-07-23  Laszlo Peter  <laca (at] sun.com>
    162 # - Changed default copyright notice to default-copyright.txt
    163 # - Prefixed REV with 9.7.2
    164 # 2004-06-26  Shirley Woo  <shirley.woo (at] sun.com>
    165 # - Changed install location to /usr/...
    166 # 2004-06-21  Laszlo Peter  <laca (at] sun.com>
    167 # - descrease C++ optimisation level to xO3
    168 # - define _pkg_config_path
    169 # 2004-05-03  Laszlo Peter  <laca (at] sun.com>
    170 # - define _basedir
    171 # 2004-04-14  Laszlo Peter  <laca (at] sun.com>
    172 # - change CATEGORY to GNOME2,application,JDS3
    173 # 2004-02-28  Laszlo Peter  <laca (at] sun.com>
    174 # - add -mr and -xtrconst options, -xpentium on intel.
    175 # - define cxx_optflags for CC compilation
    176