1 .\" dpkg manual page - dpkg-architecture(1)
3 .\" Copyright © 2005 Marcus Brinkmann <brinkmd@debian.org>
4 .\" Copyright © 2005 Scott James Remnant <scott@netsplit.com>
5 .\" Copyright © 2006-2015 Guillem Jover <guillem@debian.org>
6 .\" Copyright © 2009-2012 Raphaël Hertzog <hertzog@debian.org>
8 .\" This is free software; you can redistribute it and/or modify
9 .\" it under the terms of the GNU General Public License as published by
10 .\" the Free Software Foundation; either version 2 of the License, or
11 .\" (at your option) any later version.
13 .\" This is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 .\" GNU General Public License for more details.
18 .\" You should have received a copy of the GNU General Public License
19 .\" along with this program. If not, see <https://www.gnu.org/licenses/>.
21 .\"*******************************************************************
23 .\" This file was generated with po4a. Translate the source file.
25 .\"*******************************************************************
26 .TH dpkg\-architecture 1 %RELEASE_DATE% %VERSION% Dpkg\-sviten
29 dpkg\-architecture \- ställ in och bestäm arkitektur för paket som byggs
32 \fBdpkg\-architecture\fP [\fIflagga\fP...] [\fIåtgärd\fP]
36 \fBdpkg\-architecture\fP innehåller en funktion för att bestämma och ställa in
37 bygg\- och värdarkitekturerna för att bygga paket.
39 Byggarkitekturen bestäms alltid av ett externt anrop till \fBdpkg\fP(1) och kan
40 inte ställas in på kommandoraden.
42 Du kan ange värdarkitektur genom att ange en av, eller båda, flaggorna
43 \fB\-\-host\-arch\fP och \fB\-\-host\-type\fP. Förvalet bestäms av ett externt anrop
44 till \fBgcc\fP(1), eller är detsamma som byggarkitekturen varken \fBCC\fP eller
45 gcc är tillgängliga. Det räcker att ange en av \fB\-\-host\-arch\fP och
46 \fB\-host\-type\fP, värdet på den andra kommer ställas in till ett fungerande
47 förval. Det är faktiskt oftast bättre att bara ange den ena eftersom
48 \fBdpkg\-architecture\fP kommer varna dig om ditt val inte överensstämmer med
53 \fB\-l\fP, \fB\-\-list\fP
54 Skriv miljövariabler, en per rad, på formatet \fIVARIABEL=värde\fP. Detta är
57 \fB\-e\fP, \fB\-\-equal\fP \fIarkitektur\fP
58 Kontrollera arkitektur för likhet (sedan dpkg 1.13.13). Det jämför den
59 aktuella eller angivna Debian\-värdarkitekturen mot \fIarkitektur\fP, för att se
60 om de är lika. Åtgärden expanderar inte jokertecken i
61 arkitekturer. Kommandot avslutar med status 0 om det är en träff, 1 om det
65 \fB\-i\fP, \fB\-\-is\fP \fIarkitektur\-jokertecken\fP
66 Kontrollera arkitekturens identitet (sedan dpkg 1.13.13). Det jämför den
67 aktuella eller angivna Debian\-värdarkitekturen mot \fIarkitektur\-jokertecken\fP
68 efter att ha expanderat det som ett arkitektur\-jokertecken, för att se om de
69 är lika. Kommandot avslutar med status 0 om det är en träff, 1 om det inte
72 \fB\-q\fP, \fB\-\-query\fP \fIvariabelnamn\fP
73 Skriv värdet på en enkel variabel.
75 \fB\-s\fP, \fB\-\-print\-set\fP
76 Visar ett exportkommando. Detta kan användas för att sätta miljövariabler
79 \fB\-u\fP, \fB\-\-print\-unset\fP
80 Visar ett kommando liknande \fB\-\-print\-unset\fP men för att ta bort värdet för
83 \fB\-c\fP, \fB\-\-command\fP \fIkommando\fP
84 Exekvera ett \fIkommando\fP i en miljö som har alla variabler satta till det
87 \fB\-L\fP, \fB\-\-list\-known\fP
88 Visar en lista över giltiga arkitekturnamn. Möjligen begränsad av en eller
89 flera av träffvalen \fB\-\-match\-wildcard\fP, \fB\-\-match\-bits\fP eller
90 \fB\-\-match\-endian\fP (sedan dpkg 1.17.14).
92 \fB\-?\fP, \fB\-\-help\fP
93 Visar hjälpskärm och avslutar.
96 Visar version och avslutar.
100 \fB\-a\fP, \fB\-\-host\-arch\fP \fIarkitektur\fP
101 Sätter värd\-Debianarkitekturen.
103 \fB\-t\fP, \fB\-\-host\-type\fP \fIgnu\-system\-typ\fP
104 Sätter värd\-GNU\-systemtypen.
106 \fB\-A\fP, \fB\-\-target\-arch\fP \fIarkitektur\fP
107 Set the target Debian architecture (since dpkg 1.17.14).
109 \fB\-T\fP, \fB\-\-target\-type\fP \fIgnu\-system\-typ\fP
110 Set the target GNU system type (since dpkg 1.17.14).
112 \fB\-W\fP, \fB\-\-match\-wildcard\fP \fIarkitektur\-jokertecken\fP
113 Begränsa arkitekturerna som visas med \fB\-\-list\-known\fP till en som motsvarar
114 det angivna arkitektur\-jokertecknet (sedan dpkg 1.17.14).
116 \fB\-B\fP, \fB\-\-match\-bits\fP \fIarkitektur\-bitar\fP
117 Begränsa arkitekturerna som visas med \fB\-\-list\-known\fP till en med angivet
118 antal CPU\-bitar (sedan dpkg 1.17.14). Antingen \fB32\fP eller \fB64\fP.
120 \fB\-E\fP, \fB\-\-match\-endian\fP \fIarchitecture\-endian\fP
121 Begränsa arkitekturerna som visas med \fB\-\-list\-known\fP till en som har
122 angiven endian (sedan dpkg 1.17.14). Antingen \fBlittle\fP (liten endian) eller
123 \fBbig\fP (stor endian).
125 \fB\-f\fP, \fB\-\-force\fP
126 Värden som sätts av befintliga miljövariabler med samma namn som de som
127 används av skriptet används (t.ex av \fBdpkg\-architecture\fP), såvida inte
128 denna tvingande flagga anges. Det gör det möjligt för användaren att
129 överstyra ett värde även om anropet till \fBdpkg\-architecture\fP är begravt
130 djupt inuti ett annat skript (till exempel \fBdpkg\-buildpackage\fP(1)).
134 Maskinen paketet byggs på.
136 Maskinen paketet byggs för.
138 The machine the compiler is building for. This is only needed when building
139 a cross\-toolchain, one that will be built on the build architecture, to be
140 run on the host architecture, and to build code for the target architecture.
141 .IP Debianarkitektur 4
142 Debianarkitektursträngen, vilken anger binärträdet i FTP\-arkivet. Exempel:
143 i386, sparc, hurd\-i386.
144 .IP "Debian architecture tuple" 4
145 A Debian architecture tuple is the fully qualified architecture with all its
146 components spelled out. This differs with Debian architectures in that at
147 least the \fIcpu\fP component does not embed the \fIabi\fP. The current tuple has
148 the form \fIabi\fP\-\fIlibc\fP\-\fIos\fP\-\fIcpu\fP. Examples: base\-gnu\-linux\-amd64,
149 eabihf\-musl\-linux\-arm.
150 .IP "Debian architecture wildcard" 4
151 A Debian architecture wildcard is a special architecture string that will
152 match any real architecture being part of it. The general form is a Debian
153 architecture tuple with four or less elements, and with at least one of them
154 being \fBany\fP. Missing elements of the tuple are prefixed implicitly as
155 \fBany\fP, and thus the following pairs are equivalent:
157 \fBany\fP\-\fBany\fP\-\fBany\fP\-\fBany\fP = \fBany\fP
158 \fBany\fP\-\fBany\fP\-\fIos\fP\-\fBany\fP = \fIos\fP\-\fBany\fP
159 \fBany\fP\-\fIlibc\fP\-\fBany\fP\-\fBany\fP = \fIlibc\fP\-\fBany\fP\-\fBany\fP
161 Examples: linux\-any, any\-i386, hurd\-any, eabi\-any\-any\-arm, musl\-any\-any.
163 An architecture specification string consisting of two parts separated by a
164 hyphen: cpu and system. Examples: i586\-linux\-gnu, sparc\-linux\-gnu,
165 i686\-gnu, x86_64\-netbsd.
166 .IP "multiarch triplet" 4
167 The clarified GNU system type, used for filesystem paths. This triplet does
168 not change even when the baseline ISA gets bumped, so that the resulting
169 paths are stable over time. The only current difference with the GNU system
170 type is that the CPU part for i386 based systems is always i386. Examples:
171 i386\-linux\-gnu, x86_64\-linux\-gnu. Example paths:
172 /lib/powerpc64le\-linux\-gnu/, /usr/lib/i386\-kfreebsd\-gnu/.
175 Följande variabler sätts av \fBdpkg\-architecture\fP:
176 .IP \fBDEB_BUILD_ARCH\fP 4
177 Debianarkitekturen för byggmaskinen.
178 .IP \fBDEB_BUILD_ARCH_ABI\fP 4
179 The Debian abi name of the build machine (since dpkg 1.18.11).
180 .IP \fBDEB_BUILD_ARCH_LIBC\fP 4
181 The Debian libc name of the build machine (since dpkg 1.18.11).
182 .IP \fBDEB_BUILD_ARCH_OS\fP 4
183 Debiansystemnamnet på byggmaskinen (sedan dpkg 1.13.2).
184 .IP \fBDEB_BUILD_ARCH_CPU\fP 4
185 Debian\-processornamnet för byggmaskinen (sedan dpkg 1.13.).
186 .IP \fBDEB_BUILD_ARCH_BITS\fP 4
187 Pekarstorleken för byggmaskinen (i bitar; sedan dpkg 1.15.4).
188 .IP \fBDEB_BUILD_ARCH_ENDIAN\fP 4
189 Endian för byggmaskinen (little / big; sedan dpkg 1.15.4).
190 .IP \fBDEB_BUILD_GNU_CPU\fP 4
191 CPU\-delen av \fBDEB_BUILD_GNU_TYPE\fP.
192 .IP \fBDEB_BUILD_GNU_SYSTEM\fP 4
193 Systemdelen av \fBDEB_BUILD_GNU_TYPE\fP.
194 .IP \fBDEB_BUILD_GNU_TYPE\fP 4
195 GNU\-systemtypen för byggmaskinen.
196 .IP \fBDEB_BUILD_MULTIARCH\fP 4
197 Den förtydligade GNU\-systemtypen för byggmaskinen, används för sökvägar i
199 .IP \fBDEB_HOST_ARCH\fP 4
200 Debianarkitekturen för värdmaskinen.
201 .IP \fBDEB_HOST_ARCH_ABI\fP 4
202 The Debian abi name of the host machine (since dpkg 1.18.11).
203 .IP \fBDEB_HOST_ARCH_LIBC\fP 4
204 The Debian libc name of the host machine (since dpkg 1.18.11).
205 .IP \fBDEB_HOST_ARCH_OS\fP 4
206 Debiansystemnamnet för värdmaskinen (sedan dpkg 1.13.2).
207 .IP \fBDEB_HOST_ARCH_CPU\fP 4
208 Debian\-processornamnet för värdmaskinen (sedan dpkg 1.13.2).
209 .IP \fBDEB_HOST_ARCH_BITS\fP 4
210 Pekarstorleken för värdmaskinen (i bitar; sedan dpkg 1.15.4).
211 .IP \fBDEB_HOST_ARCH_ENDIAN\fP 4
212 Endian för värdmaskinen (little / big; sedan dpkg 1.15.4).
213 .IP \fBDEB_HOST_GNU_CPU\fP 4
214 \s-1CPU\s0\-delen av \fBDEB_HOST_GNU_TYPE\fP.
215 .IP \fBDEB_HOST_GNU_SYSTEM\fP 4
216 Systemdelen av \fBDEB_HOST_GNU_TYPE\fP.
217 .IP \fBDEB_HOST_GNU_TYPE\fP 4
218 GNU\-systemtypen för värdmaskinen.
219 .IP \fBDEB_HOST_MULTIARCH\fP 4
220 Den förtydligade GNU\-systemtypen för värdmaskinen, används för sökvägar i
222 .IP \fBDEB_TARGET_ARCH\fP 4
223 Debianarkitekturen för målmaskinen (sedan dpkg 1.17.14).
224 .IP \fBDEB_TARGET_ARCH_ABI\fP 4
225 The Debian abi name of the target machine (since dpkg 1.18.11).
226 .IP \fBDEB_TARGET_ARCH_LIBC\fP 4
227 The Debian libc name of the target machine (since dpkg 1.18.11).
228 .IP \fBDEB_TARGET_ARCH_OS\fP 4
229 Debiansystemnamnet för målmaskinen (sedan dpkg 1.17.14).
230 .IP \fBDEB_TARGET_ARCH_CPU\fP 4
231 Debian\-processornamnet för målmaskinen (sedan dpkg 1.17.14).
232 .IP \fBDEB_TARGET_ARCH_BITS\fP 4
233 Pekarstorleken för målmaskinen (i bitar; sedan dpkg 1.17.14).
234 .IP \fBDEB_TARGET_ARCH_ENDIAN\fP 4
235 Endian för målmaskinen (little / big; sedan dpkg 1.17.14).
236 .IP \fBDEB_TARGET_GNU_CPU\fP 4
237 CPU\-delen av \fBDEB_TARGET_GNU_TYPE\fP (sedan dpkg 1.17.14).
238 .IP \fBDEB_TARGET_GNU_SYSTEM\fP 4
239 Systemdelen av \fBDEB_TARGET_GNU_TYPE\fP (sedan dpkg 1.17.14).
240 .IP \fBDEB_TARGET_GNU_TYPE\fP 4
241 GNU\-systemnamnet för målmaskinen (sedan dpkg 1.17.14).
242 .IP \fBDEB_TARGET_MULTIARCH\fP 4
243 Den förtydligade GNU\-systemtypen för målmaskinen, används för sökvägar i
244 filsystemet (sedan dpkg 1.17.14).
247 .SS Arkitekturtabeller
248 All these files have to be present for \fBdpkg\-architecture\fP to work. Their
249 location can be overridden at runtime with the environment variable
250 \fBDPKG_DATADIR\fP. These tables contain a format \fBVersion\fP pseudo\-field on
251 their first line to mark their format, so that parsers can check if they
252 understand it, such as "# Version=1.0".
254 \fI%PKGDATADIR%/cputable\fP
255 Table of known CPU names and mapping to their GNU name. Format version 1.0
258 \fI%PKGDATADIR%/ostable\fP
259 Table of known operating system names and mapping to their GNU name. Format
260 version 2.0 (since dpkg 1.18.11).
262 \fI%PKGDATADIR%/tupletable\fP
263 Mapping between Debian architecture tuples and Debian architecture names.
264 Format version 1.0 (since dpkg 1.18.11).
266 \fI%PKGDATADIR%/abitable\fP
267 Table of Debian architecture ABI attribute overrides. Format version 2.0
268 (since dpkg 1.18.11).
271 \fI%PKGDATADIR%/architecture.mk\fP
272 Makefile\-utklipp som sätter alla variabler \fBdpkg\-architecture\fP skriver
276 \fBdpkg\-architecture\fP godtar flaggan \fB\-a\fP och sänder den vidare till
277 \fBdpkg\-architecture\fP. Andra exempel:
279 CC=i386\-gnu\-gcc dpkg\-architecture \-c debian/rules build
281 eval \`dpkg\-architecture \-u\`
283 Kontrollera om aktuell eller angiven arkitektur är samma en arkitektur:
285 dpkg\-architecture \-elinux\-alpha
287 dpkg\-architecture \-amips \-elinux\-mips
289 Se om den aktuella eller angivna arkitekturen är ett Linuxsystem:
291 dpkg\-architecture \-ilinux\-any
293 dpkg\-architecture \-ai386 \-ilinux\-any
295 .SS "Använda i debian/rules"
296 Miljövariablerna som sätts av \fBdpkg\-architecture\fP sänds till
297 \fIdebian/rules\fP som make\-variabler (se dokumentationen för make). Du bör
298 dock inte bero på dem eftersom detta förhindrar manuella anrop till
299 skriptet. Du bör istället alltid initiera dem med \fBdpkg\-architecture\fP med
300 \fB\-q\fP\-flaggan. Här är några exempel, vilka även visar hur du kan förbättra
301 stödet för korskompilering i ditt paket:
303 Hämta GNU\-systemtypen och vidaresänd den till ./configure:
307 DEB_BUILD_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_BUILD_GNU_TYPE)
308 DEB_HOST_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_HOST_GNU_TYPE)
310 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
311 confflags += \-\-build=$(DEB_HOST_GNU_TYPE)
313 confflags += \-\-build=$(DEB_BUILD_GNU_TYPE) \e
314 \-\-host=$(DEB_HOST_GNU_TYPE)
317 \&./configure $(confflags)
321 Gör något endast för en specifik arkitektur:
325 DEB_HOST_ARCH ?= $(shell dpkg\-architecture \-qDEB_HOST_ARCH)
327 ifeq ($(DEB_HOST_ARCH),alpha)
333 eller, om du bara vill testa på processor\- eller OS\-typ, använd variablerna
334 \fBDEB_HOST_ARCH_CPU\fP eller \fBDEB_HOST_ARCH_OS\fP.
336 Observera att du även kan bero på att ett externt Makefile\-utklipp sätter
337 alla variabler \fBdpkg\-architecture\fP kan tillhandahålla:
341 include %PKGDATADIR%/architecture.mk
343 ifeq ($(DEB_HOST_ARCH),alpha)
349 Oavsett bör du aldrig använda \fBdpkg \-\-print\-architecture\fP för att hämta
350 arkitekturinformation när paketet byggs.
355 If set, it will be used as the \fBdpkg\fP data directory, where the
356 architecture tables are located (since dpkg 1.14.17). Defaults to
359 De långa kommando\- och flaggnamn är endast tillgängliga sedan dpkg 1.17.17.
362 \fBdpkg\-buildpackage\fP(1), \fBdpkg\-cross\fP(1).
364 Peter Krefting och Daniel Nylander.