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