logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Debian::DpkgCross - Package of dpkg-cross commonly used functions

Bugs

       Please report bugs via the Debian Bug Tracking System.

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

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

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.

Create_Tmpdir($Basename)

       Safely create a temporary directory

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

       return: Full directory pathname, undef if failed

Dump_Debug_Data

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

Get_Architecture

       Returns the current architecture.

       return: Current architecture or empty if not set.

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.

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.

Name

       Debian::DpkgCross - 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.

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

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

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

Simplify_Path($Path)

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

       $1: Path to simplify.

       return: Simplified path.

perl v5.36.0                                       2022-12-06                               Debian::DpkgCross(3)

Support

       All enquiries to the "<debian-embedded@lists.debian.org"> mailing list.

See Also