/home/Yaakov/src/cygport/tests/cygport-0.20.2-1.noarch/src/cygport-0.20.2/lib/syntax.cygpart

Cygport Reference Manual

### TABLE OF CONTENTS

- Format

- Syntax

- defined
- pushd
- popd
- boolean
- cross_compiling
- inherit
- inherited

- Messages

- error
- warning
- inform
- verbose

- Globals

- NAME
- VERSION
- RELEASE
- PN
- PV
- PR
- P
- PVR
- PF
- S
- B
- C
- D

## Format

[ Top ] [ Chapter 3 ] [ Concepts ]

INTRODUCTION

If the .cygport file defines NAME, VERSION, and RELEASE, the filename may be anything, but is conventionally NAME.cygport. Otherwise, the filename must be in the form NAME-VERSION-RELEASE.cygport, and the values of NAME, VERSION, and RELEASE will be determined automatically.

A .cygport file must conform to bash shell syntax. Comments may be included, beginning with '#' until end-of-line; all comments are ignored during execution of cygport.

Since a .cygport file is itself not a functioning script, the she-bang header (#!/bin/bash) should be omitted, and the file should not be executable.

The bare minimum for a working .cygport file includes a SRC_URI definition, and src_compile and src_install functions. Note that several Cygclasses provide some or all of these, so in some cases a single line inherit command will suffice.

## Syntax

[ Top ] [ Format ] [ Concepts ]

DESCRIPTION

This section includes functions which provide some syntactical sugar. These functions can be used anywhere.

## defined

[ Top ] [ Syntax ] [ General Functions ]

SYNOPSIS

      if defined VARIABLE_NAME; then [...]; fi

DESCRIPTION

Tests if the given variable name is defined. Returns TRUE if so, else FALSE.

## pushd

[ Top ] [ Syntax ] [ General Functions ]

SYNOPSIS

      pushd DIRECTORY

DESCRIPTION

A silent wrapper for the bash pushd directory stack builtin.

## popd

[ Top ] [ Syntax ] [ General Functions ]

SYNOPSIS

      popd

DESCRIPTION

A silent wrapper for the bash popd directory stack builtin.

## Messages

[ Top ] [ Format ] [ Concepts ]

DESCRIPTION

This section includes functions which provide output to the user. These functions may be used anywhere.

## error

[ Top ] [ Messages ] [ General Functions ]

SYNOPSIS

      error MESSAGE

DESCRIPTION

Declares a fatal error. The given message is displayed, then cygport exits.

## warning

[ Top ] [ Messages ] [ General Functions ]

SYNOPSIS

      warning MESSAGE

DESCRIPTION

Displays a warning message before continuing.

## inform

[ Top ] [ Messages ] [ General Functions ]

SYNOPSIS

      inform MESSAGE

DESCRIPTION

Displays an informational message.

## verbose

[ Top ] [ Messages ] [ General Functions ]

SYNOPSIS

      verbose COMMAND

DESCRIPTION

Echoes the given command before executing it. Returns the exit code of the given command.

## boolean

[ Top ] [ Syntax ] [ Concepts ]

DESCRIPTION

A boolean variable is true if set to one of '1', 'on', 'true', or 'yes', and false if set to one of '0', 'off', 'false', or 'no'. These values are case-insensitive.

## cross_compiling

[ Top ] [ Syntax ] [ Concepts ]

SYNOPSIS

      if cross_compiling; then ...; fi

DESCRIPTION

Tests if the package is being cross-compiled. Returns TRUE if so, else FALSE.

## Globals

[ Top ] [ Format ] [ Concepts ]

## NAME

[ Top ] [ Globals ] [ Variables ]

DESCRIPTION

The Cygwin (primary) package name. Generally, this is the same as the upstream package name, but need not be. A common reason for deviating from the upstream name is to append a version "slot" where multiple versions of a package are completely parallel installable (e.g. gtk1.2 and gtk2.0, both from gtk+). In this case, define ORIG_PN to the upstream package name.

## VERSION

[ Top ] [ Globals ] [ Variables ]

DESCRIPTION

The upstream package version number. PV must begin with a digit 0-9, and subsequent characters can be a digit, letter, dot, hyphen, or underscore.

## RELEASE

[ Top ] [ Globals ] [ Variables ]

DESCRIPTION

The Cygwin package release number, e.g. the "1" in foo-2.3.4-1. The first release of a new version is usually 1, and is incremented if subsequent releases are made of the same version. PR must be an integer.

## PN

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

A read-only alias for NAME.

## PV

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

A read-only alias for VERSION.

## PR

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

A read-only alias for RELEASE.

## P

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

A read-only alias for NAME-VERSION (PN-PV).

## PVR

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

A read-only alias for VERSION-RELEASE (PV-PR).

## PF

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

A read-only alias for NAME-VERSION-RELEASE (PN-PV-PR).

## S

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

The source directory. Build tool regeneration (e.g. cygautoreconf) occurs in this directory, but other build steps should occur in B.

## B

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

The build directory. All configuring and compiling steps should occur in this directory.

## C

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

The CYGWIN-PATCHES directory where Cygwin READMEs, setup.hint files, custom postinstall scripts, and other Cygwin-specific files are placed before packaging.

## D

[ Top ] [ Globals ] [ Definitions ]

DESCRIPTION

The installation staging directory. All installation and postinstall steps occur in or into this directory.