SUNWtemplate.spec revision 9112
10139N/A# spec file for package SUNWgnome-foo-bar 12198N/A# includes module(s): gnome-foo, libgnomebar 10139N/A# Copyright 2006 Sun Microsystems, Inc. 10139N/A# This file and all modifications and additions to the pristine 10139N/A# package are under the same license as the package itself. 10139N/A############################################################################ 10139N/A# The example in this template builds 2 GNOME components, gnome-foo and 10139N/A# libgnomebar and packages them together into a Solaris package called 12888N/A# SUNWgnome-foo-bar that is split by file system boundaries [Solaris rule], 12578N/A# so it has a "subpackage" called SUNWgnome-foo-bar-root. 10139N/A############################################################################ 10142N/A# default locations and extra info needed for building Solaris pkgs. 10244N/A# See the file itself for more details, it's located in this directory. 12773N/A# Note that this line should appear before any %use lines so that 10139N/A# Declare that this spec file will use information (tags, scriptlets, etc.) 11437N/A# spec file for future reference. 10139N/A# This is the name (PKG) of the Solaris package. 10139N/A# This will become the one-line description of the Solaris package 10803N/A# This is the version of the Solaris package that has little to do with 10139N/A# the version of the gnome components included, since several gnome 10139N/A# components may be packaged together. 10139N/A# In case of non-GNOME components, however, we prefer to use the 10139N/A# tarball version number of the component. 10139N/A# Note: package version numbers must be numeric. Things like 1.0.5beta 10139N/A# The base directory of the Solaris package (normally /usr, / or 11070N/A# You need to define the basedir for each package and subpackage. 11070N/A# For now, the basedir of "-root" packages should be /, everything 10139N/A# Same as with linux specs. Note that in this case this will be 12048N/A# There's a list of packages that all GNOME packages depend on 12368N/A# These are really just the Solaris core, devices, system libs. 12849N/A# We could include them in all spec files but it's nicer and shorter 12608N/A# to %include them from a common file. 10139N/A# These are the additional [to the default ones %include'd above] 10139N/A# dependencies of this package. Please don't use version checks in 10139N/A# Solaris dependencies. They are not usually used and not properly 10139N/A# implemented in the build scripts either. 10139N/A# Try to identify the dependencies of the package the best you can. 10139N/A# Missing dependencies may cause broken installs, but unnecessary deps 10139N/A# These lines define what package need to be installed at build time. 10139N/A# This defines the "-root" subpackage, i.e. SUNWgnome-foo-bar-root. 10139N/A# Solaris packages must be split by usual filesystem boundaries, so 10139N/A# root filesystem (e.g. /etc) files must be separated from the rest of 10139N/A# the package. According to Solaris packaging rules, development and 10139N/A# runtime files must also be separated.. 10139N/A# The naming convention used in GNOME is this: 10139N/A# SUNWgnome-package-name: the main package, binaries, libs, 10139N/A# files in %{_datadir} needed at runtime 10139N/A# SUNWgnome-package-name-root: /etc, /var stuff 10139N/A# SUNWgnome-package-name-devel: header files, pkgconfig files, 10139N/A# binaries only needed for development, 10139N/A# developer docs, man pages, aclocal 10139N/A# SUNWgnome-package-name-devel-root: any root files that are only needed 10139N/A# for development (rarely needed) 11855N/A# start with a clean source directory. 10139N/A# prepare the sources of gnome-foo in the %name-%version subdir. 11419N/A# The same thing again with libgnomebar. 10139N/A# Set any environement variables that may be needed. 12117N/A# Note that the linux spec files usually set CFLAGS to $RPM_OPT_FLAGS 12849N/A# before running configure, so if you want to add something to the 12368N/A# CFLAGS defined in the linux spec file, the above trick will do 12892N/A# (i.e. set RPM_OPT_FLAGS to be the same as the CFLAGS you want) 12316N/A# ((RPM_OPT_FLAGS is normally defined by rpm as %optflags)) 11419N/A# run the %build section of the linux spec files after cd'ing into 10139N/A# This section installs the files in what ON/SFW folks would call a 10139N/A# "proto area", which is a directory where files are staged for packaging 10139N/A# spec file, called $RPM_BUILD_ROOT. 10139N/A# when not building -l10n packages, remove anything l10n related from 10139N/A# remove the build root dir once packaging succeeds 10139N/A# use these to define a class and associate installation and removal class 10139N/A# action scripts. The script can be inline or in an external file identified 10139N/A# Make sure you define the Solaris default file attributes for system 10139N/A# The files included here should match the ones removed in %install 10139N/A# Although pkgbuild doesn't currently do anything with %changelog, it's 10139N/A# still a good idea to use changelog entries. 10139N/A# To build a Solaris package from this spec file, copy all referenced 10139N/A# and run pkgbuild -ba <this spec file>