Debian::DpkgCross(3)

Debian::DpkgCross3

Package of dpkg-cross commonly used functions the 2.x series of dpkg-cross is seeking to achieve its own removal by incorporating as much cross-building support as possible into dpkg itself. the number, scope and range of functions supported by this package is therefore only going to decrease. any newly-written code using this package will need to keep up with changes in dpkg. developers are recommended to join the debian-dpkg and debian-embedded mailing lists and keep their code under review.

Support

All enquiries to the "<[email protected]"> mailing list.

Makeflags

See bug #437507 Even if the other flags are needed CC, GCC and other compiler names should *NOT* be overridden in $ENV{'MAKEFLAGS'} because this prevents packages compiling and running build tools using CC_FOR_BUILD. CDBS packages need to declare an empty override variable in debian/rules:

 DEB_CONFIGURE_SCRIPT_ENV=

Depending on progress with dpkg cross-building support, the remaining overrides may also be removed. Do not rely on these being set.

read_config

Read '$conffile' and save the definition in global variables all recognised variables.

'$crossroot' will be set by setup(). Until setup() is called all "crossroot-<arch>" settings are stored within '%allcrossroots'.

All package variables are stored within '%conf'.

No variables are skipped.

return: none

get_config

Return the current configuration from read_config as a hash reference.

get_version

Return the current DpkgCross version string used by all dpkg-cross scripts.

dump_debug_data

Return a hashtable of assorted debug data collated during the current run that can be processed using Data::Dumper.

rewrite_pkg_name

Converts a package name into the dpkg-cross package name.

$1 - the package name to check and convert if needed return - the cross-package name

convert_filename($)

Converts an original .deb filename into the dpkg-cross .deb filename or converts a dpkg-cross .deb filename into the original .deb filename.

returns undef on error

get_architecture

Returns the current architecture.

return: Current architecture or empty if not set.

check_arch($arch)

Checks that the supplied $arch is (or can be converted to) a DEB_HOST_GNU_TYPE that can be supported by dpkg-cross.

returns the DPKG_HOST_GNU_TYPE or undef

setup

Set global variables '$arch', '$crossbase', '$crossbin', '$crosslib32', '$crossdir', '$crossinc', '$crosslib', '$crosslib64', '$crossprefix', '$compilerpath' and '$deb_host_gnu_type' to defaults and substitute them with variables from '%conf' and '$arch'.

return: none

create_tmpdir($basename)

Safely create a temporary directory

 $1: Directory basename (random suffix will be added)

return: Full directory pathname, undef if failed

convert_path($multiarch, $path)

Convert path, substituting '$crossinc', '$crosslib', '$crosslib64', '$crosslib32', '$crossdir', allowing for multiarch paths. This function will be used while building foreign binary packages or converting GCC options.

 $1: Multiarch sub-directory to strip
 $2: Directory (and file) to convert.

return: Converted path.

simplify_path($path)

Simplify path. Remove duplicate slashes, "./", "dir/..", etc

$1: Path to simplify.

return: Simplified path.

Releases

8 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 9
  5. 10
  6. 11
  7. 12–13

Bugs

Please report bugs via the Debian Bug Tracking System.

From libdebian-dpkgcross-perl 2.6.20 in Debian 13 (Trixie). Parsed by carta from the page's man source.