Index: setup-packaging-historical.html =================================================================== RCS file: setup-packaging-historical.html diff -N setup-packaging-historical.html --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ setup-packaging-historical.html 1 May 2014 11:11:11 -0000 @@ -0,0 +1,120 @@ + + + + + + Historical Cygwin Packaging + + + + + +

Historical Cygwin Packaging

+

Package Source

+

There are two previous ways of packaging source code for Cygwin packages.

+

Method One

+ +

Method Two

+

This method is sometimes referred to as the "g-b-s" method, after the filename of the generic-build-script template.

+ + + Index: setup.html =================================================================== RCS file: /cvs/cygwin/htdocs/setup.html,v retrieving revision 1.129 diff -u -u -r1.129 setup.html --- setup.html 30 Apr 2014 10:21:20 -0000 1.129 +++ setup.html 1 May 2014 11:11:11 -0000 @@ -19,7 +19,8 @@
  • Sourceware.org
  • setup.hint
  • setup.ini
  • -
  • Making packages
  • +
  • Package contents
  • +
  • Making a package with cygport
  • Creating a package postinstall script
  • Submitting a package
  • @@ -31,8 +32,8 @@
  • a source tar file
  • a setup.hint file
  • -

    Binary tar files are named "package-version-release.tar.bz2". They generally contain the executable files that will be installed on a user's system plus any auxiliary files needed by the package. See the making packages section below for more details on how to generate a binary tar file.

    -

    Source tar files are named "package-version-release-src.tar.bz2". Source tar files should contain the source files, patches and scripts needed to rebuild the package. While installing these files is optional, the inclusion of a source tar file is part of the totality that makes up a Cygwin package and so, these files are not optional. In some cases, there may be multiple packages generated from the same source; for instance, one might have a "boffo" package and its associated shared library in "libboffo7", where both are generated from the same -src tarball. See the making packages section below for more details on the contents of a -src tar file, and the setup.hint section for information on the "external-source:" option.

    +

    Binary tar files are named "package-version-release.tar.bz2". They generally contain the executable files that will be installed on a user's system plus any auxiliary files needed by the package. See the package contents section below for more details on the contents of a binary tar file.

    +

    Source tar files are named "package-version-release-src.tar.bz2". Source tar files should contain the source files, patches and scripts needed to rebuild the package. While installing these files is optional, the inclusion of a source tar file is part of the totality that makes up a Cygwin package and so, these files are not optional. In some cases, there may be multiple packages generated from the same source; for instance, one might have a "boffo" package and its associated shared library in "libboffo7", where both are generated from the same -src tarball. See the package contents section below for more details on the contents of a -src tar file, and the setup.hint section for information on the "external-source:" option.

    The setup.hint file is discussed below.

    Automatic setup.ini generation on sourceware.org

    A script runs on sourceware.org which collects information from (currently) the release directory in the ftp download area. Information from subdirectories of these directories is parsed to automatically generate the default setup.ini file which is used by the Cygwin setup program for installation control. If you are responsible for maintaining a Cygwin package, it is important that you understand how this process works.

    @@ -238,7 +239,7 @@ source: release/boffo/boffo-2.4.1-2-src.tar.bz2

    Note that both packages point to the same -src tarball. Also, it is required that the version strings match (libboffo7-5.2 won't point to boffo-1.4-src). The same logic is used to "match up" prev: and test: versions.

    -

    Making Packages

    +

    Package contents

    The files paths within both the -src and the binary package files are quite important. Since setup extracts into a predetermined directory, you must structure your package contents accordingly.

    The following requirements avoid problems that have occured in the past with packages. Thus only skip them if you *know* your package will not recreate that prior problem.

    -

    Package Source

    -

    There are three accepted ways to package the source code for Cygwin packages.

    -

    Method One

    - -

    Method Two

    -

    This method is sometimes referred to as the "g-b-s" method, after the filename of the generic-build-script template.

    - -

    Method Three: cygport

    -

    The technique of method two became popular to many maintainers, however it suffers from a number of drawbacks when applied on a wide scale. The cygport README explains a number of these problems.

    -

    The cygport framework is a response to these issues, and borrows concepts from the Gentoo portage system. It separates the g-b-s into a small file containing the package-specific parts and moves the main script infrastructure into shared files. For more information on using cygport consult the documentation and sample port files.

    -

    Source packages created with cygport have a similar structure to those created with method two, except that they contain a 'boffo-1.0-1.cygport' file in place of the 'boffo-1.0-1.sh' script. The binary package is built by running 'cygport boffo-1.0-1 all' instead of './boffo-1.0-1.sh all', and so on for prep, compile, package, finish, etc.

    + +

    The source and binary packages can then be built and setup.hint generated by running 'cygport boffo all'.

    + +

    For more information on using cygport consult +the man page, +README, documentation +and sample .cygport files.

    +

    Creating a package postinstall script

    If your package requires certain commands to be executed after the files in the package are installed, include them in a file in the package called /etc/postinstall/package.sh or /etc/postinstall/package.bat.

    If the file's name ends in ".sh", it is executed with the Cygwin shell; if it ends in ".bat", it is executed with the DOS command interpreter. If it doesn't end with either of these suffixes, it is ignored.