--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Solaris/SUNWtemplate.spec.tmpl Fri Jan 09 12:37:35 2004 +0000
@@ -0,0 +1,170 @@
+#
+# spec file for package SUNWgnome-foo-bar
+#
+# includes module(s): gnome-foo, libgnomebar
+#
+# Copyright (c) 2004 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+############################################################################
+# The example in this template builds 2 GNOME components, gnome-foo and
+# libgnomebar and packages them together into a Solaris package called
+# SUNWgnome-foo-bar that is split by file system boundaries [Solaris rule],
+# so it has a "subpackage" called SUNWgnome-foo-bar-share.
+# gnome-foo.spec and libgnomebar.spec are the JDS linux spec files for
+# the corresponding RPMs.
+############################################################################
+
+%include Solaris.inc
+# The Solaris.inc file sets up some defaults: compiler options,
+# default locations and extra info needed for building Solaris pkgs.
+# See the file itself for more details, it's located in this directory.
+# Note that this line should appear before any %use lines so that
+# macros in Solaris.inc are used by the %use'd spec files
+
+%use gfoo = gnome-foo.spec
+%use libgnomebar = libgnomebar.spec
+# Declare that this spec file will use information (tags, scriptlets, etc.)
+# from another spec file or files. Assign a name (gfoo/libgnomebar) to the
+# spec file for future reference.
+# In this case gnome-foo
+
+Name: SUNWgnome-foo-bar
+# This is the name (PKG) of the Solaris package.
+
+Summary: GNOME foo bar libraries - platform dependent files, /usr filesystem
+# This will become the one-line description of the Solaris package
+
+Version: 2.6.0
+# This is the version of the Solaris package that has nothing to do with
+# the version of the gnome components included, since several gnome
+# components may be packaged together.
+
+SUNW_BaseDir: %{_prefix}
+# The base directory of the Solaris package (normally /usr, / or
+# /opt/<product>)
+# You need to define the basedir for each package and subpackage.
+# For now, the basedir of "-root" packages should be /, everything
+# else it should be %{_prefix}
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+# Same as with linux specs. Note that in this case this will be
+# /var/tmp/SUNWgnome-foo-bar-2.6.0-build
+
+%include default-depend.inc
+# There's a list of packages that all GNOME packages depend on
+# These are really just the Solaris core, devices, system libs.
+# We could include them in all spec files but it's nicer and shorter
+# to %include them from a common file.
+
+Requires: SUNWgnome-base-libs-root
+Requires: SUNWgnome-base-libs-share
+Requires: SUNWxwrtl
+Requires: SUNWxwplt
+Requires: SUNWlibms
+Requires: SUNWlxml
+Requires: SUNWfreetype2
+Requires: SUNWlibpopt
+Requires: SUNWpng
+Requires: SUNWTiff
+Requires: SUNWjpg
+# These are the additional [to the default ones %include'd above]
+# dependencies of this package. Please don't use version checks in
+# Solaris dependencies. They are not usually used and not properly
+# implemented in the build scripts either.
+
+%package share
+Summary: GNOME foo bar - platform independent files, /usr/share
+SUNW_BaseDir: %{_prefix}
+%include default-depend.inc
+# This defines the "-share" subpackage, i.e. SUNWgnome-foo-bar-share.
+# Solaris packages must be split by usual filesystem boundaries, so
+# /usr/share and / (e.g. /etc) files must be separated from the rest of
+# the package. When it makes sense (e.g. the package is big), development
+# files are also separated.
+#
+# The naming convention used in GNOME is this:
+#
+## runtime pkgs:
+#
+# SUNWgnome-package-name: the main package, binaries, libs
+# SUNWgnome-package-name-root: /etc, /var stuff
+# SUNWgnome-package-name-share: man pages, help, docs, anything in
+# %{_datadir} needed at runtime
+## development pkgs:
+#
+# SUNWgnome-package-name-devel: include files, pkgconfig files,
+# binaries only needed for development
+# SUNWgnome-package-name-devel-root: any root files that are only needed
+# for development
+# SUNWgnome-package-name-devel-share: development docs (e.g. gtk-doc),
+# man pages for devel binaries,
+# files in %{_datadir} only needed for
+# development: e.g. aclocal macros.
+
+%prep
+rm -rf %name-%version
+mkdir %name-%version
+# start with a clean source directory.
+
+%gfoo.prep -d %name-%version
+# prepare the sources of gnome-foo in the %name-%version subdir.
+# This will run the %prep section in the gfoo (gnome-foo.spec) spec file
+# (see %use above).
+# It will result in something like SUNWgnome-foo-bar-2.6.0/gnome-foo-x.y/
+
+%libgnomebar.prep -d %name-%version
+# The same thing again with libgnomebar.
+
+%build
+export CFLAGS="%optflags -I/usr/sfw/include -DANSICPP"
+export RPM_OPT_FLAGS="$CFLAGS"
+export CPPFLAGS="-I/usr/sfw/include"
+export LDFLAGS="-L/usr/sfw/lib -R/usr/sfw/lib"
+export MSGFMT="/usr/bin/msgfmt"
+# Set any environement variables that may be needed.
+# Note that the linux spec files usually set CFLAGS to $RPM_OPT_FLAGS
+# before running configure, so if you want to add something to the
+# CFLAGS defined in the linux spec file, the above trick will do
+# (i.e. set RPM_OPT_FLAGS to be the same as the CFLAGS you want)
+# ((RPM_OPT_FLAGS is normally defined by rpm as %optflags))
+
+%gfoo.build -d %name-%version
+%libgnomebar.build -d %name-%version
+# run the %build section of the linux spec files after cd'ing into
+# %name-%version.
+
+%install
+%gfoo.install -d %name-%version
+%libgnomebar.install -d %name-%version
+# The same thing with the %install sections.
+
+# The rest of this spec file is just the same as the Linux spec files,
+# so I'm not going to comment on everything.
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr (-, root, other)
+%attr (0755, root, bin) %{_bindir}
+# Make sure you define the Solaris default file attributes for system
+# directories.
+%{_bindir}/*
+%attr (0755, root, bin) %{_libdir}
+%{_libdir}/lib*.so*
+
+%files share
+%defattr (-, root, other)
+%attr (0755, root, sys) %{_datadir}
+%{_datadir}/locale
+%{_mandir}/*
+%{_datadir}/gfoo
+
+# That's it.
+# To build a Solaris package from this spec file, copy all referenced
+# spec files and include files to %topdir/SPECS, copy all sources & patches
+# referenced in this or any of the %use'd spec files to %topdir/SOURCES
+# and run pkgbuild -ba <this spec file>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Solaris/quickref.txt Fri Jan 09 12:37:35 2004 +0000
@@ -0,0 +1,78 @@
+Spec file extensions quick reference.
+------------------------------------
+
+Solaris specific tags:
+
+ SUNW_BaseDir prefix
+ Define prefix as the value of the BASEDIR tag in the SVr4 package.
+ prefix will be stripped off the beginning of all path names in the
+ %files section, therefore it has to be a real prefix, otherwise it
+ will abort with an error.
+
+ SUNW_ProdName name
+ SUNW_PRODNAME tag in the Solaris pkg.
+ SUNW_ProdVers version
+ SUNW_PRODVERS tag in the Solaris pkg.
+ SUNW_Category cat
+ CATEGORY tag in the Solaris pkg.
+ SUNW_HotLine text
+ HOTLINE tag in the pkginfo file of the SVr4 package.
+ SUNW_MaxInst num
+ num is the value of the MAXINST tag (maximum number of
+ instances of the pkg allowed to be installed on a system) in
+ the pkginfo file of the SVr4 package.
+
+ SUNW_Copyright file
+ Define file as the name of the file that contains the copyright
+ information for the package. [not implemented yet]
+
+
+Special macros:
+
+%include <file>
+
+ process the contents of %topdir/SPECS/<file> as if they were
+ copied into this file
+
+%use <name> = <spec-file>
+
+ Declare that parts of %topdir/SPECS/<spec-file> will be referenced
+ later in this spec file and call it <name>.
+ Any macros %define'd before the %use line will also affect
+ <spec-file> (as if they were copied to the beginning of that file).
+ E.g. %use gtk = gtk2.spec
+
+%<name>.<def> or
+%{<name>.<def>}
+
+ Reference to a %define'd macro in the spec file called <name>,
+ as defined by a preceding %use. Gets replaced by the value
+ of the referenced macro.
+ E.g. %{gtk._datadir}
+
+%<name>.<tag> or
+%{<name>.<tag>}
+
+ Reference to the value of a <tag> in the spec file called <name>.
+ Gets replaced by the value of <tag>.
+ E.g. %{gtk.version}
+
+%<name>.<scriptlet> [-d <directory>] or
+%{<name>.<scriptlet>} [-d <directory>]
+
+ Execute <scriptlet> from the spec file named <name>. If -d <directory>
+ is used, cd into <directory> before executing the <scriptlet>.
+ E.g. %gtk.prep
+
+%<name>.<package>.<tag> or
+%{<name.<package>.<tag>}
+
+ Reference to the value of a <tag> in a <package> (subpackage)
+ in the <name>'d spec file.
+ E.g. %{gtk.gtk-devel.summary}
+ Note that is not properly tested yet, use with caution and
+ let me know if it's broken.
+
+
+--
+Last modified: 2004-01-09 [email protected]