Cygwin

Get that Linux feeling - on Windows

Cygwin Package Contributor's Guide

This document is intended for people who upload packages to sourceware.org, to be made available through the standard Cygwin setup program.

Contents

Making a package with cygport

Suppose that the upstream's boffo-1.0.tar.xz source tar file, that you downloaded from the boffo homepage, unpacks into boffo-1.0/.

Further, suppose you've got boffo ported to Cygwin. It took some work, but you've got a patch file, which we will name boffo-1.0-fix-whatever.patch, and with that applied boffo builds and runs.

All that remains is to write a boffo.cygport file which will describe how to unpack, configure, build and package. See these examples for a quick introduction to these files.

# package name
NAME="boffo"
VERSION=1.0
RELEASE=1

# package metadata
CATEGORY="Games"
SUMMARY="A whackamole simulation in ASCII art"
DESCRIPTION="A whackamole simulation in ASCII art.
Intended for use on VT100 terminals at BAUD rates 1200 and
above.  Uses arrow keys for positioning over moles.  Space
bar whacks the mole.
No actual moles will be harmed during execution of this game."
HOMEPAGE="https://boffo.org"
LICENSE="BSD-3-Clause"

# source and patch files
SRC_URI="https://boffo.org/downloads/boffo-${VERSION}.tar.xz"
PATCH_URI="boffo-1.0-fix-whatever.patch"

# use the standard autotools src_compile, src_install and src_test

The source and binary packages can then be built and metadata .hint files generated by running cygport, e.g.

$ cygport boffo.cygport download
--2017-04-01 11:59:59--  https://boffo.org/downloads/boffo-1.0.tar.xz
Resolving boffo.org... 203.0.113.1
Connecting to boffo.org|203.0.113.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 352 [application/x-tar]
Saving to: ‘boffo-1.0.tar.xz.tmp’

boffo-1.0.tar.xz.tmp 100%[===================>]     352  --.-KB/s    in 0s

2017-04-01 11:59:59 (8.06 MB/s) - ‘boffo-1.0.tar.xz.tmp’ saved [352/352]

$ cygport boffo.cygport all
>>> Preparing boffo-1.0-1.x86_64
>>> Unpacking source boffo-1.0.tar.xz
*** Info: applying patch boffo-1.0-fix-whatever.patch:
>>> Preparing working source directory
>>> Compiling boffo-1.0-1.x86_64
[...]
>>> Installing boffo-1.0-1.x86_64
[...]
Fixing symlinks:
Stripping executables:
        usr/bin/boffo.exe
Preparing debuginfo source files:
        1 files
>>> Packaging boffo-1.0-1.x86_64
>>> Creating binary package(s)
>>> boffo-1.0-1.tar.xz
usr/
usr/bin/
usr/bin/boffo.exe
usr/lib/
usr/share/
usr/share/doc/
usr/share/doc/boffo/
usr/share/doc/boffo/README

>>> boffo-debuginfo-1.0-1.tar.xz
usr/lib/debug/
usr/lib/debug/usr/
usr/lib/debug/usr/bin/
usr/lib/debug/usr/bin/boffo.exe.dbg
usr/src/debug/
usr/src/debug/boffo-1.0-1/
usr/src/debug/boffo-1.0-1/boffo.c

>>> Checking packages for missing or duplicate files

>>> Creating source patches
 0 files changed
>>> Creating source package
boffo-1.0-1.src/
boffo-1.0-1.src/boffo-1.0-fix-whatever.patch
boffo-1.0-1.src/boffo-1.0.tar.xz
boffo-1.0-1.src/boffo.cygport

>>> boffo requires: cygwin libncursesw10

For more information on using cygport consult the man page, README, reference manual, cygport tips page and sample .cygport files.

The cygport file for any existing cygwin package can be found in /usr/src/package_name after installing the source package, or in the packaging repositories.

Locally installing your package for testing

Unfortunately, there is no tool for directly installing package files, at the moment. Two common techniques to achieve this:

Marking your package as a test version

Packages can be marked as test versions, which are not offered for installation by setup unless the use of test packages has been opted-into, by using cygport all-test, rather than cygport all. Building the packages in that way adds a test: to the hint.

Submitting a new package

So you've got a package you want to submit. Follow the following checklist before emailing the cygwin-apps mailing list, and you'll almost certainly save time.

Updating or adopting an orphaned package

Unfortunately some packages are without a maintainer, and volunteers to take over are welcome.

Uploading a package

Updating a package

So you've got an updated package. You should already have upload privileges, and should be able to do the entire process yourself.

Composing an announcement mail

cygport announce can help you compose and send an announcement mail, based on the following template.

Subject: foo-0.30.2-1

The following packages have been uploaded to the Cygwin distribution:

* foo 0.30.2-1

(a couple of lines about what "foo" is)
(short changelog of important features or fixes; big emphasis for security fixes)
(paths or links to installed and online changelogs, with more details)

Once sent, your message will be reviewed by one of the cygwin-announce moderators and will be posted, when approved.

Historical packaging methods

The cygport framework improves on previous Cygwin build scripts.