TABLE OF CONTENTS
Packaging
[ Top ] [ Chapter 12 ] [ Concepts ]
INTRODUCTION
In most cases, only one binary package is created from a source package, including all files installed into $D. This is the default, and if this applies to your package, the rest of this section is irrelevant.
However, there are many cases -- often with library packages -- that it is desirable to create multiple binary packages from one source. cygport makes that very easy, by defining the variables described in this section.
TAR_COMPRESSION_EXT
[ Top ] [ Packaging ] [ Variables ]
SYNOPSIS
TAR_COMPRESSION_EXT="zstd"
DESCRIPTION
The compression to be used for package tar archives, default xz.
DEFINITION
TAR_COMPRESSION_EXT="${TAR_COMPRESSION_EXT:-xz}"
PKG_NAMES
[ Top ] [ Packaging ] [ Variables ]
SYNOPSIS
PKG_NAMES="foo libfoo1 libfoo-devel libfoo-doc"
DESCRIPTION
A list of binary packages to create from the files installed into D. The exact contents of these packages are specified in PKG_CONTENTS variables or .list files.
NOTES
- PN does not need to be listed in PKG_NAMES if there are no files to go into a corresponding binary package. This is common with packages providing only libraries.
- Any packages listed in PKG_NAMES which do not have a corresponding PKG_CONTENTS variable or .list file will be created as an empty package. This can be useful to provide upgrade helpers for renamed packages.
PKG_HINTS
[ Top ] [ Packaging ] [ Variables ]
SYNOPSIS
PKG_NAMES="foo libfoo1 libfoo-devel libfoo-doc" PKG_HINTS="setup runtime devel doc"
DESCRIPTION
A list of unsuffixed .hint files in $C, which should be used for each given binary package in PKG_NAMES.
NOTES
- This variable is obsolete, and allowing cygport to automatically generate hints should be used in new packages.
- If PN is not included in PKG_NAMES, a file named $PN.hint or setup.hint is still required for the source package, but should not be listed in PKG_HINTS.
- If the .hint filenames (minus the .hint suffix) match PKG_NAMES, PKG_HINTS need not be defined.
PKG_CONTENTS
[ Top ] [ Packaging ] [ Variables ]
SYNOPSIS
PKG_NAMES="foo libfoo1 libfoo-devel libfoo-doc" foo_CONTENTS="--exclude=html usr/bin/foo.exe usr/share/doc/ usr/share/locale/" libfoo1_CONTENTS="usr/bin/cygfoo-1.dll" libfoo_devel_CONTENTS="usr/include/ usr/lib/ usr/share/aclocal/" libfoo_doc_CONTENTS="usr/share/doc/${NAME}/html/"
DESCRIPTION
A list of files to be included in each binary package. The PKG_CONTENTS name is descriptive rather than literal, where "PKG" should be substituted with the name of the binary package whose contents it describes. When a package contains a character which cannot be used in a shell variable name (namely '+', '-', and '.'), that character must be substituted with an underscore ('_'), such as libfoo-devel above.
NOTES
- Be sure to omit the leading forward slash from file contents.
- Patterns to be excluded from a given package may be specified with an --exclude= argument (as above). All such arguments must precede all file or directory names which are being included.
- Early versions of cygport only supported a literal PKG_CONTENTS, in form of an array. This form should be considered deprecated in favour of explicitly-named variables as described above.
- If the contents of a package are too many or complicated to easily describe in this form, a PKG.list file in $C can be used instead.
PKG_IGNORE
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A list of files that should not be included in any package, in the same form as PKG_CONTENTS. This will silence warnings on these files not being included in any package, and error if they are included in a package.
DIFF_EXCLUDES
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A list of file names, directory names, or glob patterns in S which will be excluded when creating the .src.patch file. This should be used for files automatically generated in S to avoid polluting the patch.
NOTE
Files generated by various buildsystem infrastructures, such as autoconf, automake, gettext, and libtool are already excluded automatically and need not be listed here.
CATEGORY
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A string containing one or more setup package categories. This will be used as the category: field of auto-generated .hint files.
NOTE
A list of official categories is available on the Cygwin website.
SEE ALSO
PKG_CATEGORY
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A string containing one or more setup package categories. This will be used as the category: field of the corresponding auto-generated .hint file.
Note that the PKG_CATEGORY name is descriptive rather than literal, where "PKG" should be substituted with the name of the binary package whose contents it describes. When a package contains a character which cannot be used in a shell variable name (namely '+', '-', and '.'), that character must be substituted with an underscore ('_'), e.g. libfoo-devel will use libfoo_devel_CATEGORY.
NOTE
A list of official categories is available on the Cygwin website.
Specifying the categories for a package is mandatory.
SUMMARY
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A one-line summary of the package. This will be used as the sdesc: field of auto-generated .hint files.
SEE ALSO
PKG_SUMMARY
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A one-line summary of the subpackage. This will be used as the sdesc: field of the corresponding auto-generated .hint file.
Note that the PKG_SUMMARY name is descriptive rather than literal, where "PKG" should be substituted with the name of the binary package whose contents it describes. When a package contains a character which cannot be used in a shell variable name (namely '+', '-', and '.'), that character must be substituted with an underscore ('_'), e.g. libfoo-devel will use libfoo_devel_SUMMARY.
NOTE
Specifying a summary for a package is mandatory.
DESCRIPTION
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A short paragraph description of the package. This will be used as the ldesc: field of auto-generated .hint files.
SEE ALSO
PKG_DESCRIPTION
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A short paragraph description of the subpackage. This will be used as the ldesc: field of the corresponding auto-generated .hint file.
Note that the PKG_DESCRIPTION name is descriptive rather than literal, where "PKG" should be substituted with the name of the binary package whose contents it describes. When a package contains a character which cannot be used in a shell variable name (namely '+', '-', and '.'), that character must be substituted with an underscore ('_'), e.g. libfoo-devel will use libfoo_devel_DESCRIPTION.
REQUIRES
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A single-line strings containing a list of packages on which this package depends. This will be added to the requires: field of the auto-generated .hint file.
NOTES
- cygport attempts to automatically detect many types of package dependencies, which do not need to be listed in REQUIRES. This is still needed for commands called by scripts or in code with fork(), libraries which are accessed by dlopen(), or data used by your package at runtime.
- If there is more than one package in PKG_NAMES, this variable will be ignored; you must use PKG_REQUIRES instead.
- Any newlines in this variable must be escaped.
SEE ALSO
PKG_REQUIRES
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A single-line strings containing a list of packages on which this package depends. This will be added to the requires: field of the auto-generated .hint file.
Note that the PKG_REQUIRES name is descriptive rather than literal, where "PKG" should be substituted with the name of the binary package whose contents it describes. When a package contains a character which cannot be used in a shell variable name (namely '+', '-', and '.'), that character must be substituted with an underscore ('_'), e.g. libfoo-devel will use libfoo_devel_REQUIRES.
NOTES
- cygport attempts to automatically detect many types of package dependencies, which do not need to be listed in REQUIRES. This is still needed for commands called by scripts or in code with fork(), libraries which are accessed by dlopen(), or data used by your package at runtime.
- Any newlines in this variable must be escaped.
OBSOLETES
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A single-line string containing a list of package(s) which this package replaces. This package's metadata will include the listed obsoletions, which will cause this package to be installed in their place.
NOTE
If there is more than one package in PKG_NAMES, this variable will be ignored; you must use PKG_OBSOLETES instead.
SEE ALSO
PKG_OBSOLETES
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A single-line string containing a list of package(s) which PKG replaces. PKG's metadata will include the listed obsoletions, which will cause PKG to be installed in their place.
Note that the PKG_OBSOLETES name is descriptive rather than literal, where "PKG" should be substituted with the name of the binary package whose contents it describes. When a package contains a character which cannot be used in a shell variable name (namely '+', '-', and '.'), that character must be substituted with an underscore ('_'), e.g. libfoo-devel will use libfoo_devel_OBSOLETES.
NOTES
- Additionally, if a debuginfo package is automatically generated, you may
specify a PN_debuginfo_OBSOLETES value, even though PN_debuginfo is not explicitly listed in PKG_NAMES.
PROVIDES
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A single-line string containing a list of names which this package also provides.
NOTE
If there is more than one package in PKG_NAMES, this variable will be ignored; you must use PKG_PROVIDES instead.
SEE ALSO
PKG_PROVIDES
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A single-line string containing a list of names which this package also provides.
Note that the PKG_PROVIDES name is descriptive rather than literal, where "PKG" should be substituted with the name of the binary package whose contents it describes. When a package contains a character which cannot be used in a shell variable name (namely '+', '-', and '.'), that character must be substituted with an underscore ('_'), e.g. libfoo-devel will use libfoo_devel_PROVIDES.
CONFLICTS
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A single-line string containing a comma-separated list of packages, possibly with version relations which this package conflicts with.
NOTE
If there is more than one package in PKG_NAMES, this variable will be ignored; you must use PKG_CONFLICTS instead.
SEE ALSO
PKG_CONFLICTS
[ Top ] [ Packaging ] [ Variables ]
DESCRIPTION
A single-line string containing a comma-separated list of packages, possibly with version relations which this package conflicts with.
Note that the PKG_CONFLICTS name is descriptive rather than literal, where "PKG" should be substituted with the name of the binary package whose contents it describes. When a package contains a character which cannot be used in a shell variable name (namely '+', '-', and '.'), that character must be substituted with an underscore ('_'), e.g. libfoo-devel will use libfoo_devel_CONFLICTS.