Cygport Reference Manual

### TABLE OF CONTENTS

- Packaging

- PKG_NAMES
- PKG_HINTS
- PKG_CONTENTS
- PKG_IGNORE
- DIFF_EXCLUDES
- CATEGORY
- PKG_CATEGORY
- SUMMARY
- PKG_SUMMARY
- DESCRIPTION
- PKG_DESCRIPTION
- REQUIRES
- PKG_REQUIRES
- OBSOLETES
- PKG_OBSOLETES
- PROVIDES
- PKG_PROVIDES
- CONFLICTS
- PKG_CONFLICTS

## 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.

## 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 which should be used for each given binary package in PKG_NAMES.

NOTES

- 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 PN.list file can be used instead and placed in C before the packaging stage.

## 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

## 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 |htmlf <a href="Cygwin">https://cygwin.com/packaging-hint-files.html">Cygwin website</a>.

## 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

## 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.

## 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

## 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

## 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. An empty package will be created for each listed obsoletion which will cause this package to be installed in its 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

## PKG_OBSOLETES

[ Top ] [ Packaging ] [ Variables ]

DESCRIPTION

A single-line string containing a list of package(s) which this package replaces. An empty package will be created for each listed obsoletion which will cause PKG to be installed in its 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.

## 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

## 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

## 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.