.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "CSBS 1" .TH CSBS 1 "2024-04-15" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" csbs \- Common Solaris Build System .SH "INTRODUCTION" .IX Header "INTRODUCTION" \&\s-1CSBS\s0 is a system for creating things which could be regarded as Solaris Source Packages. It is inspired by cdbs, the Common Debian Build System ( http://packages.debian.org/unstable/devel/cdbs ). .PP Differences with cdbs: csbs-generated source packages are usable on systems which don't have csbs installed. .SH "USAGE" .IX Header "USAGE" Likely, you want one of these 3 things .IP "install a Solaris binary package" 4 .IX Item "install a Solaris binary package" Fetch the prebuild binary package for your Solaris version \- likely it is called something like foobar\-n.m_k\-sol8\-sparc\-local.gz \- and install that one, using \fBpkgadd\fR\|(1). If there is no prebuild package supplied which suits your needs, read on. .Sp .Vb 1 \& pkgadd \-d foobar\-n.m_k\-sol8\-sparc\-local .Ve .IP "create a Solaris binary package from a Solaris source package" 4 .IX Item "create a Solaris binary package from a Solaris source package" If there is a Solaris source package supplied \- likely it is called something like foobar\-n.m_k.diff.gz \- and you'd like to use a Solaris binary package, read on. .IP "create a Solaris source package from a tarball" 4 .IX Item "create a Solaris source package from a tarball" If you'd like to create Solaris binary packages from not-yet-packaged source tarballs, you could supply Solaris source packages too. This makes it easier for people to adapt your package to their specific needs. From this source package, you can create a binary package. Read on. .PP We'll explain the last 2 things in detail. .SH "CREATING A BINARY PACKAGE FROM A SOURCE PACKAGE" .IX Header "CREATING A BINARY PACKAGE FROM A SOURCE PACKAGE" .SS "Setting up the files" .IX Subsection "Setting up the files" Download tar.gz and solaris-ized diff.gz. The tar.gz is the vanilla upstreams source, you might as well get it from upstream. .PP Unpack the source .PP .Vb 1 \& gunzip \-c foobar\-n.m.tar.gz | tar \-xf \- .Ve .PP (foobar is the name of the source package, n.m is upstream version, k is Solaris package version.) .PP Now, using a sane \fBpatch\fR\|(1), apply the patch, running .PP .Vb 1 \& gunzip \-c foobar\-n.m_k.diff.gz | patch \-p0 .Ve .PP \&. Beware: Solaris patch, as shipped with Solaris 8, does \fInot\fR do this trick. A patch which works is e.g. Larry Wall's \s-1GNU\s0 patch available from ftp://ftp.gnu.org/pub/gnu/patch/ , and, in Solaris pkg format, from http://www.sunfreeware.com/ . .PP You could also perform this step on a nearby GNU/Linux or *BSD system, which likely has a right \fBpatch\fR\|(1) installed. .SS "Optionally: copy patched stuff around" .IX Subsection "Optionally: copy patched stuff around" If you need to build the package on a different platform as where you've patched it, pack the patched tarball together doing .PP .Vb 1 \& tar zcf foobar\-n.m.solaris.tar.gz foobar\-n.m .Ve .PP \&. Copy this file around, and unpack it again on the build platform .PP .Vb 1 \& tar zxf foobar\-n.m.solaris.tar.gz .Ve .PP \&. .SS "Building the Solaris package" .IX Subsection "Building the Solaris package" In the .PP .Vb 1 \& foobar\-n.m/ .Ve .PP directory, run .PP .Vb 1 \& make \-f solaris/Makefile .Ve .PP \&. (Both Solaris make (tested with SunOS 5.7 /usr/ccs/bin/make) and \s-1GNU\s0 make do fine.) This creates binary packages .PP .Vb 1 \& /var/tmp/foobar\-n.m_k\-sol8\-sparc\-local .Ve .PP and, for your convenience .PP .Vb 1 \& /var/tmp/foobar\-n.m_k\-sol8\-sparc\-local.gz .Ve .PP \&. If you're building on a SunOS 5.7 box, do .PP .Vb 1 \& make \-f solaris/Makefile OSVERSION=sol7 .Ve .PP to get a nice \s-1OS\s0 string in the package name. .SH "CREATING A SOURCE PACKAGE FROM A TARBALL" .IX Header "CREATING A SOURCE PACKAGE FROM A TARBALL" In a directory /some/where, create files Makefile.m4, \s-1README\s0.Solaris, pkginfo.in, prototype, and, optionally, postinstall, preinstall and bootstrap. .PP Typically, Makefile.m4 looks like: .PP .Vb 2 \& divert(\-1) \& changequote([, ]) \& \& define([CSBS_VENDORTAG], [BOZO]) \& define([CSBS_TARNAME], [foobarble]) \& define([CSBS_UPVERSION], [n.m]) \& define([CSBS_PKGVERSION], [1]) \& # max 6 chars: some old solaris\-en break otherwise \& define([CSBS_SHORTTARNAME], [foobar]) \& define([CSBS_ARCH], [sparc]) \& \& include([csbs.m4]) \& divert(0)dnl \& CSBS_ALL .Ve .PP Typically, pkginfo.in features: .PP .Vb 4 \& PKG="@PKGNAME@" \& NAME="@TARNAME@" \& VERSION="@VERSION@" \& ARCH="@ARCH@" .Ve .PP next to the common variables found in pkginfo. Run .PP .Vb 6 \& tar zxf foobar\-n.m.tar.gz \& mv foobar\-n.m foobar\-n.m.orig \& tar zxf foobar\-n.m.tar.gz \& cd foobar\-n.m \& mkdir solaris \& cp /some/where/{Makefile.m4,README.Solaris,pkginfo.in,postinstall,preinstall,prototype} solaris .Ve .PP Now, make sure you've installed \s-1CSBS:\s0 be sure the \s-1CSBS\s0 files \f(CW\*(C`bootstrap\*(C'\fR, \&\f(CW\*(C`csbs.m4\*(C'\fR, and \f(CW\*(C`makeMakefile\*(C'\fR are installed in ~/.csbs/ . Then, continue with: .PP .Vb 4 \& cd solaris \& sh ~/.csbs/bootstrap \& cd .. \& make \-f solaris/Makefile source .Ve .PP The last command runs something like .PP .Vb 1 \& diff \-Pdur foobar\-n.m.orig foobar\-n.m | gzip \-c > foobar\-n.m_k.diff.gz .Ve .PP \&. Your \fBdiff\fR\|(1) needs to understand the \f(CW\*(C`\-P\*(C'\fR flag. Solaris \fBdiff\fR\|(1) does \&\fInot\fR. \s-1GNU\s0 diff, from the \s-1GNU\s0 diffutils package version 2.7, ftp://ftp.gnu.org/pub/gnu/diffutils/ , does. The option's effect is: .PP .Vb 3 \& When comparing directories, if a file appears only \& in the second directory of the two, treat it as \& present but empty in the other. .Ve .PP (Solaris diff can only state something like: .PP ``Only in foodir: bar'' .PP which is really too little for our needs.) .PP In 2.8, the \-P option should be invoked as \-\-unidirectional\-new\-file. .SH "EXAMPLES" .IX Header "EXAMPLES" See http://cvs.alioth.debian.org/cgi\-bin/cvsweb.cgi/~checkout~/caspar/solaris/pkg/Makefile.m4?content\-type=text/plain&cvsroot=caspar for an example of usage. .SH "SOURCE PACKAGES" .IX Header "SOURCE PACKAGES" The idea for Solaris source packages is based upon the Debian .deb source package format, see appendix C. ``Source packages'' from ``Debian Policy Manual'', http://packages.debian.org/debian\-policy ; http://www.debian.org/doc/debian\-policy/ap\-pkg\-sourcepkg.html .SH "HACKING" .IX Header "HACKING" You can fetch a copy of the current state of csbs by running: .PP .Vb 2 \& joostvb@banach:~/arch% tla register\-archive joostvb\-arch@mdcc.cx\-\-2005\-csbs http://mdcc.cx/arch/\e{archives\e}/2005\-csbs \& joostvb@banach:~/arch% tla get joostvb\-arch@mdcc.cx\-\-2005\-csbs/csbs\-\-mainline\-\-0.1 csbs .Ve .PP \&. .SH "SEE ALSO" .IX Header "SEE ALSO" .SS "alternatives for csbs" .IX Subsection "alternatives for csbs" solpkg ( http://solpkg.berlios.de/ ) is a framework and repository of Makefile \&\*(L"recipes\*(R" that can be used to build Solaris packages, by Matt Behrens ( http://www.zigg.com/matt/ ). Very likely, it does about the same job as \s-1CSBS.\s0 See also http://lists.berlios.de/pipermail/solpkg\-devel/ . .PP Guenther Schreiner has written about his spb (Solaris Package Builder) on http://lists.gnu.org/archive/html/savannah\-hackers/2002\-06/msg00298.html . No publication of this software is known to the author. .PP Joerg Schilling has created \s-1SPS\s0 ( http://sps.berlios.de/pkg/ ). As of 2005\-08, it does not create Solaris packages, but just tarballs holding the binaries. This might change once Sun has released its packaging tools under an Open Source license. .SS "instructions on how to create solaris binary packages" .IX Subsection "instructions on how to create solaris binary packages" Philip Brown's instructions on http://www.bolthole.com/solaris/makeapackage.html . .PP Dennis Clarke's instructions on http://www.blastwave.org/standards/pkgcreation.php . .PP Mark Ashley's instructions on http://ibiblio.org/pub/packages/solaris/sparc/html/creating.solaris.packages.html \&. .PP Steven M. Christensen's instructions on http://sunfreeware.com/pkgadd.html . .PP Troy Johnson's instructions on http://troy.jdmz.net/sun/ . .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2003 Tilburg University .PP Copyright (C) 2005 Joost van Baal .PP This document is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU GPL,\s0 available online at http://www.gnu.org/copyleft/gpl.html . There is \s-1NO WARRANTY.\s0 .SH "AUTHOR" .IX Header "AUTHOR" Joost van Baal