docs/SUNWtemplate.spec
author yippi
Fri, 08 Oct 2010 20:33:54 +0000
changeset 20147 9bd581afe2ae
parent 15650 dbcf7e3715dd
permissions -rw-r--r--
2010-10-07 Brian Cameron <[email protected]> * specs/SUNWgnome-print.spec, patches/libgnomeprint-sun-02-compile.diff: Add patch so that the package compiles with recent compilers. * specs/SUNWgnome-system-monitor.spec: Fix packaging when building without l10n.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
     1
#
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
     2
# spec file for package SUNWgnome-foo-bar
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
     3
#
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
     4
# includes module(s): gnome-foo, libgnomebar
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
     5
#
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
     6
# Copyright 2006 Sun Microsystems, Inc.
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
     7
# This file and all modifications and additions to the pristine
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
     8
# package are under the same license as the package itself.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
     9
#
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    10
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    11
############################################################################
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    12
# The example in this template builds 2 GNOME components, gnome-foo and
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    13
# libgnomebar and packages them together into a Solaris package called
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    14
# SUNWgnome-foo-bar that is split by file system boundaries [Solaris rule],
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    15
# so it has a "subpackage" called SUNWgnome-foo-bar-root.
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    16
# gnome-foo.spec and libgnomebar.spec are the JDS linux spec files for
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    17
# the corresponding RPMs.
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    18
# 
8370
f3cb26b6497c 2006-10-20 Glynn Foster <[email protected]>
gman
parents: 7366
diff changeset
    19
# See SUNWtemplate-standalone.spec for an example where Linux spec files 
f3cb26b6497c 2006-10-20 Glynn Foster <[email protected]>
gman
parents: 7366
diff changeset
    20
# are not used
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    21
############################################################################
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    22
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    23
%include Solaris.inc
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    24
# The Solaris.inc file sets up some defaults: compiler options,
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    25
# default locations and extra info needed for building Solaris pkgs.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    26
# See the file itself for more details, it's located in this directory.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    27
# Note that this line should appear before any %use lines so that 
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    28
# macros in Solaris.inc are used by the %use'd spec files
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    29
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    30
%use gfoo = gnome-foo.spec
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    31
%use libgnomebar = libgnomebar.spec
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    32
# Declare that this spec file will use information (tags, scriptlets, etc.)
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    33
# from another spec file or files. Assign a name (gfoo/libgnomebar) to the
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    34
# spec file for future reference.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    35
# In this case gnome-foo
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    36
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    37
Name:                    SUNWgnome-foo-bar
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    38
# This is the name (PKG) of the Solaris package.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    39
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    40
Summary:                 GNOME foo bar libraries
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    41
# This will become the one-line description of the Solaris package
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    42
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    43
Version:                 %{default_pkg_version}
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    44
# This is the version of the Solaris package that has little to do with
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    45
# the version of the gnome components included, since several gnome
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    46
# components may be packaged together.
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    47
# In case of non-GNOME components, however, we prefer to use the
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    48
# tarball version number of the component.
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    49
# Note: package version numbers must be numeric.  Things like 1.0.5beta
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    50
# and v6b are not allowed
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    51
#  %{default_pkg_version} is defined in Solaris.inc.
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    52
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    53
SUNW_BaseDir:            %{_basedir}
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    54
# The base directory of the Solaris package (normally /usr, / or
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    55
# /opt/<product>)
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    56
# You need to define the basedir for each package and subpackage.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    57
# For now, the basedir of "-root" packages should be /, everything
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    58
# else it should be %{_basedir} (defined in Solaris.inc)
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    59
12730
52c895f47fa4 2008-06-24 Damien Carbery <[email protected]>
dcarbery
parents: 8370
diff changeset
    60
SUNW_Copyright:          %{name}.copyright
52c895f47fa4 2008-06-24 Damien Carbery <[email protected]>
dcarbery
parents: 8370
diff changeset
    61
# Use the copyright-extractor script to create a copyright file.
52c895f47fa4 2008-06-24 Damien Carbery <[email protected]>
dcarbery
parents: 8370
diff changeset
    62
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    63
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    64
# Same as with linux specs. Note that in this case this will be
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    65
# /var/tmp/SUNWgnome-foo-bar-2.6.0-build
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    66
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    67
%include default-depend.inc
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    68
# There's a list of packages that all GNOME packages depend on
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    69
# These are really just the Solaris core, devices, system libs.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    70
# We could include them in all spec files but it's nicer and shorter
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    71
# to %include them from a common file.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    72
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    73
Requires: SUNWxwrtl
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    74
Requires: SUNWxwplt
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    75
Requires: SUNWlibms
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    76
Requires: SUNWlxml
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    77
Requires: SUNWpng
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    78
Requires: SUNWTiff
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    79
Requires: SUNWjpg
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    80
# These are the additional [to the default ones %include'd above]
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    81
# dependencies of this package. Please don't use version checks in
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    82
# Solaris dependencies. They are not usually used and not properly
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    83
# implemented in the build scripts either.
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    84
# Try to identify the dependencies of the package the best you can.
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    85
# Missing dependencies may cause broken installs, but unnecessary deps
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    86
# are a pain too.
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    87
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    88
BuildRequires: SUNWsfwhea
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    89
# These lines define what package need to be installed at build time.
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    90
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    91
%package root
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    92
Summary:                 %{summary} - / filesystem
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    93
SUNW_BaseDir:            /
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    94
%include default-depend.inc
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    95
# This defines the "-root" subpackage, i.e. SUNWgnome-foo-bar-root.
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
    96
# Solaris packages must be split by usual filesystem boundaries, so
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    97
# root filesystem (e.g. /etc) files must be separated from the rest of
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    98
# the package.  According to Solaris packaging rules, development and
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
    99
# runtime files must also be separated..
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   100
#
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   101
# The naming convention used in GNOME is this:
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   102
#
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   103
## runtime pkgs:
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   104
#
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   105
# SUNWgnome-package-name:             the main package, binaries, libs,
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   106
#                                     files in %{_datadir} needed at runtime
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   107
# SUNWgnome-package-name-root:        /etc, /var stuff
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   108
#
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   109
## development pkgs:
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   110
#
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   111
# SUNWgnome-package-name-devel:       header files, pkgconfig files,
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   112
#                                     binaries only needed for development,
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   113
#                                     developer docs, man pages, aclocal
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   114
#                                     macros, etc.
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   115
# SUNWgnome-package-name-devel-root:  any root files that are only needed
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   116
#                                     for development (rarely needed)
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   117
#
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   118
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   119
%if %build_l10n
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   120
%package l10n
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   121
Summary:                 foo - l10n files
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   122
SUNW_BaseDir:            %{_basedir}
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   123
%include default-depend.inc
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   124
Requires:                %{name}
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   125
%endif
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   126
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   127
%prep
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   128
rm -rf %name-%version
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   129
mkdir %name-%version
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   130
# start with a clean source directory.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   131
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   132
%gfoo.prep -d %name-%version
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   133
# prepare the sources of gnome-foo in the %name-%version subdir.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   134
# This will run the %prep section in the gfoo (gnome-foo.spec) spec file
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   135
# (see %use above).
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   136
# It will result in something like SUNWgnome-foo-bar-2.6.0/gnome-foo-x.y/
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   137
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   138
%libgnomebar.prep -d %name-%version
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   139
# The same thing again with libgnomebar.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   140
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   141
%build
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   142
export CFLAGS="%optflags -I/usr/sfw/include -DANSICPP"
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   143
export RPM_OPT_FLAGS="$CFLAGS"
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   144
export CPPFLAGS="-I/usr/sfw/include"
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   145
export LDFLAGS="-L/usr/sfw/lib -R/usr/sfw/lib"
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   146
export MSGFMT="/usr/bin/msgfmt"
12730
52c895f47fa4 2008-06-24 Damien Carbery <[email protected]>
dcarbery
parents: 8370
diff changeset
   147
# Set any environment variables that may be needed.
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   148
# Note that the linux spec files usually set CFLAGS to $RPM_OPT_FLAGS
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   149
# before running configure, so if you want to add something to the
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   150
# CFLAGS defined in the linux spec file, the above trick will do
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   151
# (i.e. set RPM_OPT_FLAGS to be the same as the CFLAGS you want)
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   152
# ((RPM_OPT_FLAGS is normally defined by rpm as %optflags))
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   153
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   154
%gfoo.build -d %name-%version
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   155
%libgnomebar.build -d %name-%version
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   156
# run the %build section of the linux spec files after cd'ing into 
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   157
# %name-%version.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   158
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   159
%install
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   160
# This section installs the files in what ON/SFW folks would call a
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   161
# "proto area", which is a directory where files are staged for packaging
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   162
# In the case of rpm/pkgbuild, we have a separate proto area for each
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   163
# spec file, called $RPM_BUILD_ROOT.
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   164
rm -rf $RPM_BUILD_ROOT
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   165
# start with a clean proto dir
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   166
%gfoo.install -d %name-%version
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   167
%libgnomebar.install -d %name-%version
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   168
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   169
#
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   170
# when not building -l10n packages, remove anything l10n related from
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   171
# $RPM_BUILD_ROOT
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   172
#
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   173
%if %build_l10n
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   174
%else
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   175
# REMOVE l10n FILES
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   176
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   177
rm -rf $RPM_BUILD_ROOT%{_datadir}/gnome/help/*/[a-z]*
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   178
rm -rf $RPM_BUILD_ROOT%{_datadir}/omf/*/*-[a-z]*.omf
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   179
%endif
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   180
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   181
%clean
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   182
rm -rf $RPM_BUILD_ROOT
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   183
# remove the build root dir once packaging succeeds
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   184
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   185
%iclass myclass [-f script]
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   186
%rclass myclass [-f script]
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   187
# use these to define a class and associate installation and removal class
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   188
# action scripts.  The script can be inline or in an external file identified
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   189
# by "script".  In an external script is used, put it in spec-files/ext-sources
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   190
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   191
%files
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   192
%defattr (-, root, bin)
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   193
%dir %attr (0755, root, bin) %{_prefix}
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   194
%dir %attr (0755, root, bin) %{_bindir}
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   195
# Make sure you define the Solaris default file attributes for system
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   196
# directories.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   197
%{_bindir}/*
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   198
%dir %attr (0755, root, bin) %{_libdir}
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   199
%{_libdir}/lib*.so*
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   200
%class(myclass) %{_libdir}/foo/bar
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   201
# This make /usr/lib/foo/bar 'f myclass' type and adds myclass to CLASSES
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   202
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   203
%files root
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   204
%defattr (-, root, sys)
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   205
%dir %attr(0755, root, sys) %{_sysconfdir}
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   206
%{_sysconfig}/gconf/schemas/foo.schemas
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   207
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   208
#
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   209
# The files included here should match the ones removed in %install
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   210
#
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   211
%if %build_l10n
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   212
%files l10n
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   213
%defattr (-, root, other)
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   214
%dir %attr (0755, root, sys) %{_datadir}
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   215
%{_datadir}/locale
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   216
%{_datadir}/gnome/help/*/[a-z]*
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   217
%{_datadir}/omf/*/*-[a-z]*.omf
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   218
%endif
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   219
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   220
%changelog
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   221
* Fri Jun  2 2006 - [email protected]
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   222
- update to remove info about -share pkgs and add some more comments
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   223
* Fri Feb 27 2004 - [email protected]
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   224
- add info about %changelog to the template
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   225
# Although pkgbuild doesn't currently do anything with %changelog, it's
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   226
# still a good idea to use changelog entries.
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   227
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   228
# To build a Solaris package from this spec file, copy all referenced
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   229
# spec files and include files to %topdir/SPECS, copy all sources & patches
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   230
# referenced in this or any of the %use'd spec files to %topdir/SOURCES
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   231
# and run pkgbuild -ba <this spec file>
7366
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   232
# Alternatively, run
105ebbc873b4 2006-06-03 Laszlo (Laca) Peter <[email protected]>
lp117937
parents: 5807
diff changeset
   233
#       pkgtool build <spec-file>
5807
dac359526cee 2005-09-12 Glynn Foster <[email protected]>
gman
parents:
diff changeset
   234
# in this directory.