~ubuntu-branches/debian/sid/dpkg/sid

« back to all changes in this revision

Viewing changes to man/dpkg-architecture.1

  • Committer: Package Import Robot
  • Author(s): Guillem Jover, Guillem Jover, Raphaël Hertzog, Updated programs translations, Added man page translations, Updated man page translations
  • Date: 2013-07-26 23:54:54 UTC
  • Revision ID: package-import@ubuntu.com-20130726235454-14stk6eh9xbjj3wk
Tags: 1.17.0
[ Guillem Jover ]
* Switch update-alternatives back to a fatal error on out of range priority
  on --install.
* Document dpkg-deb --debug in --help output.
* Bump Standards-Version to 3.9.4 (no changes needed).
* Use the new canonical dpkg git Vcs URLs.
* Remove ancient version from zlibg1-dev Build-Depends.
* Add compression development packages to libdpkg-dev Depends.
* Man pages cleanup:
  - Disable justification and hyphenation in SEE ALSO sections.
  - Remove unneeded double quotes in .SH headings.
  - Do not use “header” when “format” or “field” is meant.
  - Move dangers of installing via dpkg-deb from BUGS to a NOTES section.
  - Remove BUGS sections containing obvious or misplaced information.
  - Move BUGS sections before EXAMPLES and SEE ALSO sections.
  - Place ENVIRONMENT and FILES sections contiguously.
  - Move EXIT STATUS section before ENVIRONMENT.
  - Rename CAVEATS sections to NOTES.
  - Fold BACKWARD COMPATIBILITY section into other sections.
  - Document since when DEB_*_MULTIARCH variables are supported.
  - Move compiler flags subsection from ENVIRONMENT to NOTES.
  - Unify WARNING and ERROR sections into DIAGNOSTICS.
  - Unify command-line options into a single OPTIONS section.
  - Mark programs, variables, fields and command-line options in bold.
  - Fold dpkg-architecture(1) DEBIAN/RULES section into EXAMPLES.
  - Fix dpkg-architecture(1) debian/rules usage documentation.
  - Move dpkg-buildflags(1) HARDENING into a new FEATURE AREAS subsection.
  - Improve dpkg-buildflags(1) usage documentation.
    Thanks to Matthijs Kooijman <matthijs@stdin.nl>. Closes: #657627
  - Clarify that DPKG_MAINTSCRIPT_PACKAGE is not arch-qualified.
  - Add triggers to the list of binary control information files.
    Thanks to Charles Plessy <plessy@debian.org>.
* Use colon instead of dot for user:group in dpkg debug output.
* Remove support for obsolete DM-Upload-Allowed from Dpkg::Vendor::Debian.
* Fix update-alternatives to use the current alternative link as the first
  best value, to avoid flip-flops of alternatives with equal priority.
  Closes: #699807
* Fix clang warnings due to change of alignment requirements.
* Change copyright file to point to GPL-2 instead of GPL.
* Do not pass -e in shell script shebangs, set it in the body.
* Add new dpkg-parsechangelog --show-field option to print a field value.
  Closes: #284664
* Add new dpkg-buildpackage --force-sign option.
* By default do not sign builds for UNRELEASED uploads on dpkg-buildpackage.
  Closes: #635117
* Also check Build-Depends-Arch for minimal versions in dpkg-shlibdeps.
  Closes: #681470
* Document dpkg-buildflags export mode usage in man page. Closes: #691449
  Thanks to Jonathan Nieder <jrnieder@gmail.com>.
* Rename dpkg-buildflags configure exporter to cmdline, but preserve
  configure as a legacy alias.
* Mask fortify hardening option from dpkg-buildflags output on noopt.
  New glibc 2.16 and later, issue a warning on this condition.
  Closes: #691745
* Refer to path instead of file on dpkg-statoverride.
* Always print a descriptive architecture column, even for empty or missing
  architectures on «dpkg-query --list».
* Rework SELinux code on unpack to reload the label database if it has
  changed, for example while upgrading the SELinux policy package.
* Execute maintainer scripts in a new execution context, based on the
  current one and the specific maintainer script filename, and if it's
  not different to the current one, use "dpkg_script_t" as a fallback.
* Do not unnecessarily create a dpkg update log record on remove or purge.
* Always reset want status when removing or purging a package; so this
  now resets holds among others. Closes: #163763
* Always reset want status when installing a package; so this now resets
  holds among others. Closes: #162541
* Defer cleanup of .dpkg-new and .dpkg-tmp paths on removal to the point
  when we are definitely removing the main path.
* Activate file triggers on removal more accurately, only when we know
  we are inevitably removing things.
* Change dir to / before executing maintainer scripts. Closes: #686782
* Add new dpkg-deb --deb-format option and base --new and --old on it,
  as the latter are not future-proof, and neither can be guaranteed to
  produce a reliable output file format.
* Drop archtable. It serves no purpose, it's Debian specific, it's
  usually outdated, and everyone should be using dpkg-architecture anyway.
* Add musl-linux support to ostable and triplettable.
  Requested-by Kevin Bortis <wermut@gmail.com>.
* Remove update-alternatives, dpkg-divert and dpkg-statoverride
  compatibility symlinks under /usr/sbin/.
* Remove install-info wrapper.
* Only ignore older packages if the existing version is informative. This
  allows any program using libdpkg to parse the available file to see again
  packages with versions lesser than 0-0 (like 0~0-0). Closes: #676664
* Fix Dpkg::Control::Hash set_options() to take a hash as argument instead
  of two scalars.
* Add a new Dpkg::Vendor get_vendor_dir() function.
* Print correct path to vendor directory on error message in dpkg-vendor.
* Do not hardcode the dpkg system configuration directory in perl scripts,
  respect build time setting.
* Deprecate Dpkg lowercase and exported by default variables, replaced by
  new unified uppercase non-exported by default ones.
* Do not set -fstack-protector in the default build flags on arm64 (it's
  not yet supported). Thanks to Matthias Klose <doko@ubuntu.com>.
  Closes: #711936
* Add GCJFLAGS support to dpkg-buildflags. Closes: #708375
* Clarify that dpkg --set-selections needs an up-to-date available db,
  by documenting it on the dpkg(1) man page, and warning whenever dpkg
  finds unknown packages while setting the selections. Closes: #703092
* Print nicer error messages in perl scripts using Getopt::Long by trapping
  $SIG{__WARN__} to call usageerr() on option parse errors.
* Move the exit call out from usage() in dpkg-scansources so that usageerr()
  gives a correct exit code. Thanks to Bernhard R. Link <brlink@debian.org>.
* Print correct error message on unknown dpkg-name options before --.
* Require at least one filename on dpkg-name after --.
* Switch program usage errors to not print entire --help output.
  Closes: #681371
* Document that «dpkg-parsechangelog -l-» can be used to read from stdin.
* Support parsing compressed changelog files transparently. Closes: #684196
* Sort files inside new diffs generated by dpkg-source lexicographically.
  Closes: #689193
* Add support for a build_arch option in Dpkg::Deps deps_parse().
  Thanks to Colin Watson <cjwatson@ubuntu.com>. Closes: #697297
* Move epoch-less or revision-less output logic to Dpkg::Version.
  Based on a patch by Bernhard R. Link <brlink@debian.org>.
* Catch mismatches between version strings and format versions in
  dpkg-source. Ensure that a 3.0 (quilt) package has a non-native version
  and that a 3.0 (native) package has a native version. Closes: #700177
  Thanks to Bernhard R. Link <brlink@debian.org>.
* Add support for mipsn32(el) and mips64(el) to arch tables.
  Thanks to YunQiang Su <wzssyqa@gmail.com>. Closes: #685096, #707323
* Document --file and --label parser options in dpkg-parsechangelog(1).
* Add a new configure --with-dpkg-deb-compressor option to allow selecting
  the default dpkg-deb compressor, mainly for downstreams.
* Switch dpkg-deb default compressor from gzip to xz. Build dpkg.deb using
  gzip to make debootstrap life easier on non-Debian based systems.
* Add support for gzip compression strategies to dpkg-deb. The new
  strategies are: filtered, huffman, rle and fixed.
* Change dpkg and dpkg-deb help output to recommend apt instead of dselect
  as a user-friendly frontend.
* Remove temporary file on error during «dpkg-divert --rename».
* Fix value caching in Dpkg::Arch by not shadowing the variables.
* Fix chmod() arguments order in Dpkg::Source::Quilt. Closes: #710265
  Thanks to Pablo Oliveira <pablo@sifflez.org>.
* Add new dpkg-shlibdeps -l option to add private shared library directories.
  This should be used instead of abusing LD_LIBRARY_PATH to pass the paths,
  which might be problematic when cross-compiling. Closes: #698881
* Only apply empy line and comma cleanups when doing substvar replacements
  on fields where those are relevant. Closes: #659814
* Do not scan control files twice for PGP signature presence.

[ Raphaël Hertzog ]
* Fix dpkg-maintscript-helper rm_conffile and mv_conffile to do nothing
  when the conffile is no longer owned by the current (or named) package.
  Thanks to Steve Langasek for the patch. Closes: #716948
* Improve dpkg-maintscript-helper behaviour in “Multi-Arch: same” packages
  by arch-qualifying package names read from the environment. Also add
  a warning about this potential problem in the manual page.
* Fix usage of non-existent _() function in multiple places of the Perl
  code. Thanks to Lincoln Myers <lincoln@netapp.com> for the patch.
  Closes: #708607

[ Updated programs translations ]
* Fix typo in Spanish translation of update-alternatives.
  Thanks to Javier Fernandez-Sanguino <jfs@debian.org>. Closes: #713020

[ Updated programs translations ]
* Vietnamese (Trần Ngọc Quân). Closes: #715334

[ Added man page translations ]
* Italian (Beatrice Torracca). Closes: #711647

[ Updated man page translations ]
* Fix wrong translation of "fortify" in French dpkg-buildflags(1) man page.
  Thanks to Christian Perrier <bubulle@debian.org>. Closes: #712976
* Fix typo in dpkg-source(1) man page French translation.
  Thanks to Cédric Boutillier <boutil@debian.org>. Closes: #708292
* Japanese (TAKAHASHI Motonobu). Closes: #704240

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
.\"
3
3
.\" Copyright © 2005 Marcus Brinkmann <brinkmd@debian.org>
4
4
.\" Copyright © 2005 Scott James Remnant <scott@netsplit.com>
5
 
.\" Copyright © 2006-2011 Guillem Jover <guillem@debian.org>
 
5
.\" Copyright © 2006-2013 Guillem Jover <guillem@debian.org>
6
6
.\" Copyright © 2009-2012 Raphaël Hertzog <hertzog@debian.org>
7
7
.\"
8
8
.\" This is free software; you can redistribute it and/or modify
18
18
.\" You should have received a copy of the GNU General Public License
19
19
.\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
20
.
21
 
.TH dpkg\-architecture 1 "2012-01-20" "Debian Project" "dpkg utilities"
22
 
.SH "NAME"
 
21
.TH dpkg\-architecture 1 "2013-03-28" "Debian Project" "dpkg utilities"
 
22
.SH NAME
23
23
dpkg\-architecture \- set and determine the architecture for package building
24
24
.
25
25
.SH SYNOPSIS
28
28
.PP
29
29
.
30
30
.SH DESCRIPTION
31
 
dpkg\-architecture does provide a facility to determine and set the build and
 
31
.B dpkg\-architecture
 
32
does provide a facility to determine and set the build and
32
33
host architecture for package building.
33
34
.PP
34
35
The build architecture is always determined by an external call to
37
38
You can specify the host architecture by providing one or both of the options
38
39
\fB\-a\fR and \fB\-t\fR. The default is determined by an external call to
39
40
.BR gcc (1),
40
 
or the same as the build architecture if \s-1CC\s0 or gcc are both not
 
41
or the same as the build architecture if \fBCC\fP or gcc are both not
41
42
available. One out of \fB\-a\fR and \fB\-t\fR is sufficient, the value of the
42
43
other will be set to a usable default. Indeed, it is often better to only
43
44
specify one, because \fBdpkg\-architecture\fP will warn you if your choice
50
51
\fIVARIABLE=value\fP. This is the default action.
51
52
.TP
52
53
.BI \-e debian-architecture
53
 
Check for equality of architecture. By default \fIdebian-architecture\fP
54
 
is compared against the current Debian architecture, being the host.
55
 
This action will not expand the architecture wildcards. Command finishes
56
 
with an exit status of 0 if matched, 1 if not matched.
 
54
Check for equality of architecture (since dpkg 1.13.13). By default
 
55
\fIdebian-architecture\fP is compared against the current Debian architecture,
 
56
being the host. This action will not expand the architecture wildcards.
 
57
Command finishes with an exit status of 0 if matched, 1 if not matched.
 
58
 
57
59
.TP
58
60
.BI \-i architecture-wildcard
59
61
Check for identity of architecture by expanding \fIarchitecture-wildcard\fP
60
62
as an architecture wildcard and comparing against the current Debian
61
 
architecture. Command finishes with an exit status of 0 if matched, 1 if
62
 
not matched.
 
63
architecture (since dpkg 1.13.13).
 
64
Command finishes with an exit status of 0 if matched, 1 if not matched.
63
65
.TP
64
66
.BI \-q variable-name
65
67
Print the value of a single variable.
106
108
The machine the package is built for.
107
109
.IP "Debian architecture" 4
108
110
The Debian architecture string, which specifies the binary tree in the
109
 
\s-1FTP\s0 archive. Examples: i386, sparc, hurd\-i386.
 
111
FTP archive. Examples: i386, sparc, hurd\-i386.
110
112
.IP "architecture wildcard" 4
111
113
An architecture wildcard is a special architecture string that will match
112
114
any real architecture being part of it. The general form is <kernel>\-<cpu>.
113
115
Examples: linux\-any, any\-i386, hurd\-any.
114
 
.IP "\s-1GNU\s0 system type" 4
 
116
.IP "GNU system type" 4
115
117
An architecture specification string consisting of two parts separated by
116
118
a dash: cpu and system. Examples: i386\-linux\-gnu, sparc\-linux\-gnu,
117
119
i386\-gnu, x86_64\-netbsd.
118
120
.
119
121
.SH VARIABLES
120
122
The following variables are set by \fBdpkg\-architecture\fP:
121
 
.IP "\s-1DEB_BUILD_ARCH\s0" 4
 
123
.IP "\fBDEB_BUILD_ARCH\fP" 4
122
124
The Debian architecture of the build machine.
123
 
.IP "\s-1DEB_BUILD_ARCH_OS\s0" 4
124
 
The Debian system name of the build machine.
125
 
.IP "\s-1DEB_BUILD_ARCH_CPU\s0" 4
126
 
The Debian cpu name of the build machine.
127
 
.IP "\s-1DEB_BUILD_ARCH_BITS\s0" 4
128
 
The pointer size of the build machine (in bits).
129
 
.IP "\s-1DEB_BUILD_ARCH_ENDIAN\s0" 4
130
 
The endianness of the build machine (little / big).
131
 
.IP "\s-1DEB_BUILD_GNU_CPU\s0" 4
132
 
The \s-1CPU\s0 part of \s-1DEB_BUILD_GNU_TYPE\s0.
133
 
.IP "\s-1DEB_BUILD_GNU_SYSTEM\s0" 4
134
 
The System part of \s-1DEB_BUILD_GNU_TYPE\s0.
135
 
.IP "\s-1DEB_BUILD_GNU_TYPE\s0" 4
136
 
The \s-1GNU\s0 system type of the build machine.
137
 
.IP "\s-1DEB_BUILD_MULTIARCH\s0" 4
138
 
The clarified \s-1GNU\s0 system type of the build machine, used for filesystem
139
 
paths.
140
 
.IP "\s-1DEB_HOST_ARCH\s0" 4
 
125
.IP "\fBDEB_BUILD_ARCH_OS\fP" 4
 
126
The Debian system name of the build machine (since dpkg 1.13.2).
 
127
.IP "\fBDEB_BUILD_ARCH_CPU\fP" 4
 
128
The Debian cpu name of the build machine (since dpkg 1.13.2).
 
129
.IP "\fBDEB_BUILD_ARCH_BITS\fP" 4
 
130
The pointer size of the build machine (in bits; since dpkg 1.15.4).
 
131
.IP "\fBDEB_BUILD_ARCH_ENDIAN\fP" 4
 
132
The endianness of the build machine (little / big; since dpkg 1.15.4).
 
133
.IP "\fBDEB_BUILD_GNU_CPU\fP" 4
 
134
The CPU part of \fBDEB_BUILD_GNU_TYPE\fP.
 
135
.IP "\fBDEB_BUILD_GNU_SYSTEM\fP" 4
 
136
The System part of \fBDEB_BUILD_GNU_TYPE\fP.
 
137
.IP "\fBDEB_BUILD_GNU_TYPE\fP" 4
 
138
The GNU system type of the build machine.
 
139
.IP "\fBDEB_BUILD_MULTIARCH\fP" 4
 
140
The clarified GNU system type of the build machine, used for filesystem
 
141
paths (since dpkg 1.16.0).
 
142
.IP "\fBDEB_HOST_ARCH\fP" 4
141
143
The Debian architecture of the host machine.
142
 
.IP "\s-1DEB_HOST_ARCH_OS\s0" 4
143
 
The Debian system name of the host machine.
144
 
.IP "\s-1DEB_HOST_ARCH_CPU\s0" 4
145
 
The Debian cpu name of the host machine.
146
 
.IP "\s-1DEB_HOST_ARCH_BITS\s0" 4
147
 
The pointer size of the host machine (in bits).
148
 
.IP "\s-1DEB_HOST_ARCH_ENDIAN\s0" 4
149
 
The endianness of the host machine (little / big).
150
 
.IP "\s-1DEB_HOST_GNU_CPU\s0" 4
151
 
The \s-1CPU\s0 part of \s-1DEB_HOST_GNU_TYPE\s0.
152
 
.IP "\s-1DEB_HOST_GNU_SYSTEM\s0" 4
153
 
The System part of \s-1DEB_HOST_GNU_TYPE\s0.
154
 
.IP "\s-1DEB_HOST_GNU_TYPE\s0" 4
155
 
The \s-1GNU\s0 system type of the host machine.
156
 
.IP "\s-1DEB_HOST_MULTIARCH\s0" 4
157
 
The clarified \s-1GNU\s0 system type of the host machine, used for filesystem
158
 
paths.
159
 
.
160
 
.SH "DEBIAN/RULES"
 
144
.IP "\fBDEB_HOST_ARCH_OS\fP" 4
 
145
The Debian system name of the host machine (since dpkg 1.13.2).
 
146
.IP "\fBDEB_HOST_ARCH_CPU\fP" 4
 
147
The Debian cpu name of the host machine (since dpkg 1.13.2).
 
148
.IP "\fBDEB_HOST_ARCH_BITS\fP" 4
 
149
The pointer size of the host machine (in bits; since dpkg 1.15.4).
 
150
.IP "\fBDEB_HOST_ARCH_ENDIAN\fP" 4
 
151
The endianness of the host machine (little / big; since dpkg 1.15.4).
 
152
.IP "\fBDEB_HOST_GNU_CPU\fP" 4
 
153
The CPU part of \fBDEB_HOST_GNU_TYPE\fP.
 
154
.IP "\fBDEB_HOST_GNU_SYSTEM\fP" 4
 
155
The System part of \fBDEB_HOST_GNU_TYPE\fP.
 
156
.IP "\fBDEB_HOST_GNU_TYPE\fP" 4
 
157
The GNU system type of the host machine.
 
158
.IP "\fBDEB_HOST_MULTIARCH\fP" 4
 
159
The clarified GNU system type of the host machine, used for filesystem
 
160
paths (since dpkg 1.16.0).
 
161
.
 
162
.SH FILES
 
163
.SS Architecture tables
 
164
All these files have to be present for \fBdpkg\-architecture\fP to
 
165
work. Their location can be overridden at runtime with the environment
 
166
variable \fBDPKG_DATADIR\fP.
 
167
.TP
 
168
.I /usr/share/dpkg/cputable
 
169
Table of known CPU names and mapping to their GNU name.
 
170
.TP
 
171
.I /usr/share/dpkg/ostable
 
172
Table of known operating system names and mapping to their GNU name.
 
173
.TP
 
174
.I /usr/share/dpkg/triplettable
 
175
Mapping between Debian architecture triplets and Debian architecture
 
176
names.
 
177
.SS Packaging support
 
178
.TP
 
179
.I /usr/share/dpkg/architecture.mk
 
180
Makefile snippet that properly sets and exports all the variables that
 
181
\fBdpkg\-architecture\fP outputs (since dpkg 1.16.1).
 
182
.
 
183
.SH EXAMPLES
 
184
\fBdpkg\-buildpackage\fP accepts the \fB\-a\fR option and passes it to
 
185
\fBdpkg\-architecture\fP. Other examples:
 
186
.IP
 
187
CC=i386\-gnu\-gcc dpkg\-architecture \-c debian/rules build
 
188
.IP
 
189
eval \`dpkg\-architecture \-u\`
 
190
.PP
 
191
Check if an architecture is equal to the current architecture or a given
 
192
one:
 
193
.IP
 
194
dpkg\-architecture \-elinux\-alpha
 
195
.IP
 
196
dpkg\-architecture \-amips \-elinux\-mips
 
197
.PP
 
198
Check if the current architecture or an architecture provided with \fB\-a\fP
 
199
are Linux systems:
 
200
.IP
 
201
dpkg\-architecture \-ilinux\-any
 
202
.IP
 
203
dpkg\-architecture \-ai386 \-ilinux\-any
 
204
.
 
205
.SS Usage in debian/rules
161
206
The environment variables set by \fBdpkg\-architecture\fP are passed to
162
207
\fIdebian/rules\fP as make variables (see make documentation). However,
163
208
you should not rely on them, as this breaks manual invocation of the
164
209
script. Instead, you should always initialize them using
165
 
\fBdpkg\-architecture\fP with the \-q option. Here are some examples,
 
210
\fBdpkg\-architecture\fP with the \fB\-q\fP option. Here are some examples,
166
211
which also show how you can improve the cross compilation support in your
167
212
package:
168
213
.PP
169
 
 
170
214
Retrieving the GNU system type and forwarding it to ./configure:
171
 
.IP
 
215
.PP
 
216
.RS 4
172
217
.nf
173
 
\&\s-1DEB_BUILD_GNU_TYPE\s0 := $(shell dpkg\-architecture \-qDEB_BUILD_GNU_TYPE)
174
 
\&\s-1DEB_HOST_GNU_TYPE\s0 := $(shell dpkg\-architecture \-qDEB_HOST_GNU_TYPE)
175
 
[...]
176
 
configure \-\-build=$(\s-1DEB_BUILD_GNU_TYPE\s0) \-\-host=$(\s-1DEB_HOST_GNU_TYPE\s0)
 
218
DEB_BUILD_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_BUILD_GNU_TYPE)
 
219
DEB_HOST_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_HOST_GNU_TYPE)
 
220
[...]
 
221
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
 
222
  confflags += \-\-build=$(DEB_HOST_GNU_TYPE)
 
223
else
 
224
  confflags += \-\-build=$(DEB_BUILD_GNU_TYPE) \\
 
225
               \-\-host=$(DEB_HOST_GNU_TYPE)
 
226
endif
 
227
[...]
 
228
\&./configure $(confflags)
177
229
.fi
 
230
.RE
178
231
.PP
179
 
 
180
232
Doing something only for a specific architecture:
181
 
.IP
 
233
.PP
 
234
.RS 4
182
235
.nf
183
 
\&\s-1DEB_HOST_ARCH\s0 := $(shell dpkg\-architecture \-qDEB_HOST_ARCH)
 
236
DEB_HOST_ARCH ?= $(shell dpkg\-architecture \-qDEB_HOST_ARCH)
184
237
 
185
 
ifeq ($(\s-1DEB_HOST_ARCH\s0),alpha)
 
238
ifeq ($(DEB_HOST_ARCH),alpha)
186
239
  [...]
187
240
endif
188
241
.fi
 
242
.RE
189
243
.PP
190
 
or if you only need to check the CPU or OS type, use the DEB_HOST_ARCH_CPU
191
 
or DEB_HOST_ARCH_OS variables.
 
244
or if you only need to check the CPU or OS type, use the
 
245
\fBDEB_HOST_ARCH_CPU\fP or \fBDEB_HOST_ARCH_OS\fP variables.
192
246
.PP
193
247
Note that you can also rely on an external Makefile snippet to properly
194
248
set all the variables that \fBdpkg\-architecture\fP can provide:
195
 
.IP
 
249
.PP
 
250
.RS 4
196
251
.nf
197
252
include /usr/share/dpkg/architecture.mk
198
253
 
199
 
ifeq ($(\s-1DEB_HOST_ARCH\s0),alpha)
 
254
ifeq ($(DEB_HOST_ARCH),alpha)
200
255
  [...]
201
256
endif
202
257
.fi
 
258
.RE
203
259
.PP
204
260
In any case, you should never use \fBdpkg \-\-print\-architecture\fP to get
205
261
architecture information during a package build.
206
262
.
207
 
.SH "BACKWARD COMPATIBILITY"
208
 
The /usr/share/dpkg/architecture.mk Makefile snippet is provided by
209
 
dpkg\-dev since version 1.16.1.
210
 
.PP
211
 
The DEB_*_ARCH_BITS and DEB_*_ARCH_ENDIAN variables were introduced
212
 
in dpkg\-dev 1.15.4. Using them in \fIdebian/rules\fR thus requires a
213
 
build-dependency on dpkg\-dev (>= 1.15.4).
214
 
.PP
215
 
The DEB_HOST_ARCH_CPU and DEB_HOST_ARCH_OS variables were introduced
216
 
in dpkg\-dev 1.13.2.
217
 
.PP
218
 
The \fB\-e\fP and \fB\-i\fP options were only introduced in relatively recent
219
 
versions of \fBdpkg\-architecture\fR (since dpkg 1.13.13).
220
 
.
221
 
.SH EXAMPLES
222
 
\fBdpkg\-buildpackage\fP accepts the \fB\-a\fR option and passes it to
223
 
\fBdpkg\-architecture\fP. Other examples:
224
 
.IP
225
 
CC=i386\-gnu\-gcc dpkg\-architecture \-c debian/rules build
226
 
.IP
227
 
eval \`dpkg\-architecture \-u\`
228
 
.PP
229
 
Check if an architecture is equal to the current architecture or a given
230
 
one:
231
 
.IP
232
 
dpkg\-architecture \-elinux\-alpha
233
 
.IP
234
 
dpkg\-architecture \-amips \-elinux\-mips
235
 
.PP
236
 
Check if the current architecture or an architecture provided with \-a are
237
 
Linux systems:
238
 
.IP
239
 
dpkg\-architecture \-ilinux\-any
240
 
.IP
241
 
dpkg\-architecture \-ai386 \-ilinux\-any
242
 
.
243
 
.SH FILES
244
 
All these files have to be present for \fBdpkg\-architecture\fP to
245
 
work. Their location can be overridden at runtime with the environment
246
 
variable \fBDPKG_DATADIR\fP.
247
 
.TP
248
 
.I /usr/share/dpkg/cputable
249
 
Table of known CPU names and mapping to their GNU name.
250
 
.TP
251
 
.I /usr/share/dpkg/ostable
252
 
Table of known operating system names and mapping to their GNU name.
253
 
.TP
254
 
.I /usr/share/dpkg/triplettable
255
 
Mapping between Debian architecture triplets and Debian architecture
256
 
names.
257
 
.
258
 
.SH "SEE ALSO"
 
263
.SH SEE ALSO
259
264
.BR dpkg\-buildpackage (1),
260
265
.BR dpkg\-cross (1).