Debian::DpkgCross(3)
Debian::DpkgCross (3) π
okay bestie, so this is Debian::DpkgCross β the Perl package that holds all the functions dpkg-cross uses over and over again. It's a section 3 Perl manual page, the kind that ships in User Contributed Perl Documentation, so pull up a chair and let's get into it π«Ά
β¨ NAME β¨
Debian::DpkgCross β the package of dpkg-cross commonly used functions πΈ
ngl, here's the tea: the 2.x series of dpkg-cross is literally trying to achieve its own removal by folding as much cross-building support as possible directly into dpkg itself. So the number, scope and range of functions supported by this package is only ever going to go down. 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. π
π Copyright and License π
Copyright (C) 2004 Nikita Youshchenko <yoush@cs.msu.su>
Copyright (C) 2004 Raphael Bossek <bossekr@debian.org>
Copyright (c) 2007-2009 Neil Williams <codehelp@debian.org>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. π
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
π Bugs π
Please report bugs via the Debian Bug Tracking System. fr fr, that's the move.
π« Support π«
All enquiries go to the "<debian-embedded@lists.debian.org>" mailing list. come hang out π
π 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. not a vibe, just facts π€
π read_config π
Read '$conffile' and save the definition in global variables β all recognised variables, no skips, no cap.
'$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. literally none.
return: none
π get_config π
Return the current configuration from read_config as a hash reference. simple as that π
π get_version π
Return the current DpkgCross version string used by all dpkg-cross scripts. iconic behavior tbh β
π 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. it goes both ways bestie π
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. vibe check, basically π
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.
and that's the whole page, bestie β no gatekeeping, every flag and every function accounted for π
this lil' page was brought to you by perl v5.40.1, dated 2026-04-26, filed under Debian::DpkgCross(3). slay, bye π
β¨
π¦ where this page comes from
- ubuntu stonking: libdebian-dpkgcross-perl 2.6.23 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms