dpkg (1.18.25) stretch; urgency=medium
[dpkg] / man / sv / dpkg-architecture.man
CommitLineData
1479465f
GJ
1.\" dpkg manual page - dpkg-architecture(1)
2.\"
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>
7.\"
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.
12.\"
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.
17.\"
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/>.
20.
21.\"*******************************************************************
22.\"
23.\" This file was generated with po4a. Translate the source file.
24.\"
25.\"*******************************************************************
26.TH dpkg\-architecture 1 %RELEASE_DATE% %VERSION% Dpkg\-sviten
27.nh
28.SH NAMN
29dpkg\-architecture \- ställ in och bestäm arkitektur för paket som byggs
30.
31.SH SYNOPS
32\fBdpkg\-architecture\fP [\fIflagga\fP...] [\fIåtgärd\fP]
33.PP
34.
35.SH BESKRIVNING
36\fBdpkg\-architecture\fP innehåller en funktion för att bestämma och ställa in
37bygg\- och värdarkitekturerna för att bygga paket.
38.PP
39Byggarkitekturen bestäms alltid av ett externt anrop till \fBdpkg\fP(1) och kan
40inte ställas in på kommandoraden.
41.PP
42Du 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
44till \fBgcc\fP(1), eller är detsamma som byggarkitekturen varken \fBCC\fP eller
45gcc ä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
47fö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
49förvalet.
50.
51.SH KOMMANDON
52.TP
53\fB\-l\fP, \fB\-\-list\fP
54Skriv miljövariabler, en per rad, på formatet \fIVARIABEL=värde\fP. Detta är
55förvald åtgärd.
56.TP
57\fB\-e\fP, \fB\-\-equal\fP \fIarkitektur\fP
58Kontrollera arkitektur för likhet (sedan dpkg 1.13.13). Det jämför den
59aktuella eller angivna Debian\-värdarkitekturen mot \fIarkitektur\fP, för att se
60om de är lika. Åtgärden expanderar inte jokertecken i
61arkitekturer. Kommandot avslutar med status 0 om det är en träff, 1 om det
62inte är en träff.
63
64.TP
65\fB\-i\fP, \fB\-\-is\fP \fIarkitektur\-jokertecken\fP
66Kontrollera arkitekturens identitet (sedan dpkg 1.13.13). Det jämför den
67aktuella eller angivna Debian\-värdarkitekturen mot \fIarkitektur\-jokertecken\fP
68efter 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
70är en träff.
71.TP
72\fB\-q\fP, \fB\-\-query\fP \fIvariabelnamn\fP
73Skriv värdet på en enkel variabel.
74.TP
75\fB\-s\fP, \fB\-\-print\-set\fP
76Visar ett exportkommando. Detta kan användas för att sätta miljövariabler
77med eval.
78.TP
79\fB\-u\fP, \fB\-\-print\-unset\fP
80Visar ett kommando liknande \fB\-\-print\-unset\fP men för att ta bort värdet för
81alla variabler.
82.TP
83\fB\-c\fP, \fB\-\-command\fP \fIkommando\fP
84Exekvera ett \fIkommando\fP i en miljö som har alla variabler satta till det
85bestämda värdet.
86.TP
87\fB\-L\fP, \fB\-\-list\-known\fP
88Visar en lista över giltiga arkitekturnamn. Möjligen begränsad av en eller
89flera av träffvalen \fB\-\-match\-wildcard\fP, \fB\-\-match\-bits\fP eller
90\fB\-\-match\-endian\fP (sedan dpkg 1.17.14).
91.TP
92\fB\-?\fP, \fB\-\-help\fP
93Visar hjälpskärm och avslutar.
94.TP
95\fB\-\-version\fP
96Visar version och avslutar.
97.
98.SH FLAGGOR
99.TP
100\fB\-a\fP, \fB\-\-host\-arch\fP \fIarkitektur\fP
101Sätter värd\-Debianarkitekturen.
102.TP
103\fB\-t\fP, \fB\-\-host\-type\fP \fIgnu\-system\-typ\fP
104Sätter värd\-GNU\-systemtypen.
105.TP
106\fB\-A\fP, \fB\-\-target\-arch\fP \fIarkitektur\fP
107Set the target Debian architecture (since dpkg 1.17.14).
108.TP
109\fB\-T\fP, \fB\-\-target\-type\fP \fIgnu\-system\-typ\fP
110Set the target GNU system type (since dpkg 1.17.14).
111.TP
112\fB\-W\fP, \fB\-\-match\-wildcard\fP \fIarkitektur\-jokertecken\fP
113Begränsa arkitekturerna som visas med \fB\-\-list\-known\fP till en som motsvarar
114det angivna arkitektur\-jokertecknet (sedan dpkg 1.17.14).
115.TP
116\fB\-B\fP, \fB\-\-match\-bits\fP \fIarkitektur\-bitar\fP
117Begränsa arkitekturerna som visas med \fB\-\-list\-known\fP till en med angivet
118antal CPU\-bitar (sedan dpkg 1.17.14). Antingen \fB32\fP eller \fB64\fP.
119.TP
120\fB\-E\fP, \fB\-\-match\-endian\fP \fIarchitecture\-endian\fP
121Begränsa arkitekturerna som visas med \fB\-\-list\-known\fP till en som har
122angiven endian (sedan dpkg 1.17.14). Antingen \fBlittle\fP (liten endian) eller
123\fBbig\fP (stor endian).
124.TP
125\fB\-f\fP, \fB\-\-force\fP
126Värden som sätts av befintliga miljövariabler med samma namn som de som
127används av skriptet används (t.ex av \fBdpkg\-architecture\fP), såvida inte
128denna 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
130djupt inuti ett annat skript (till exempel \fBdpkg\-buildpackage\fP(1)).
131.
132.SH TERMINOLOGI
133.IP byggmaskin 4
134Maskinen paketet byggs på.
135.IP värdmaskin 4
136Maskinen paketet byggs för.
137.IP målmaskin 4
138The machine the compiler is building for. This is only needed when building
139a cross\-toolchain, one that will be built on the build architecture, to be
140run on the host architecture, and to build code for the target architecture.
141.IP Debianarkitektur 4
142Debianarkitektursträngen, vilken anger binärträdet i FTP\-arkivet. Exempel:
143i386, sparc, hurd\-i386.
144.IP "Debian architecture tuple" 4
145A Debian architecture tuple is the fully qualified architecture with all its
146components spelled out. This differs with Debian architectures in that at
147least the \fIcpu\fP component does not embed the \fIabi\fP. The current tuple has
148the form \fIabi\fP\-\fIlibc\fP\-\fIos\fP\-\fIcpu\fP. Examples: base\-gnu\-linux\-amd64,
149eabihf\-musl\-linux\-arm.
150.IP "Debian architecture wildcard" 4
151A Debian architecture wildcard is a special architecture string that will
152match any real architecture being part of it. The general form is a Debian
153architecture tuple with four or less elements, and with at least one of them
154being \fBany\fP. Missing elements of the tuple are prefixed implicitly as
155\fBany\fP, and thus the following pairs are equivalent:
156.nf
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
160.fi
161Examples: linux\-any, any\-i386, hurd\-any, eabi\-any\-any\-arm, musl\-any\-any.
162.IP GNU\-systemtyp 4
163An architecture specification string consisting of two parts separated by a
164hyphen: cpu and system. Examples: i586\-linux\-gnu, sparc\-linux\-gnu,
165i686\-gnu, x86_64\-netbsd.
166.IP "multiarch triplet" 4
167The clarified GNU system type, used for filesystem paths. This triplet does
168not change even when the baseline ISA gets bumped, so that the resulting
169paths are stable over time. The only current difference with the GNU system
170type is that the CPU part for i386 based systems is always i386. Examples:
171i386\-linux\-gnu, x86_64\-linux\-gnu. Example paths:
172/lib/powerpc64le\-linux\-gnu/, /usr/lib/i386\-kfreebsd\-gnu/.
173.
174.SH VARIABLER
175Följande variabler sätts av \fBdpkg\-architecture\fP:
176.IP \fBDEB_BUILD_ARCH\fP 4
177Debianarkitekturen för byggmaskinen.
178.IP \fBDEB_BUILD_ARCH_ABI\fP 4
179The Debian abi name of the build machine (since dpkg 1.18.11).
180.IP \fBDEB_BUILD_ARCH_LIBC\fP 4
181The Debian libc name of the build machine (since dpkg 1.18.11).
182.IP \fBDEB_BUILD_ARCH_OS\fP 4
183Debiansystemnamnet på byggmaskinen (sedan dpkg 1.13.2).
184.IP \fBDEB_BUILD_ARCH_CPU\fP 4
185Debian\-processornamnet för byggmaskinen (sedan dpkg 1.13.).
186.IP \fBDEB_BUILD_ARCH_BITS\fP 4
187Pekarstorleken för byggmaskinen (i bitar; sedan dpkg 1.15.4).
188.IP \fBDEB_BUILD_ARCH_ENDIAN\fP 4
189Endian för byggmaskinen (little / big; sedan dpkg 1.15.4).
190.IP \fBDEB_BUILD_GNU_CPU\fP 4
191CPU\-delen av \fBDEB_BUILD_GNU_TYPE\fP.
192.IP \fBDEB_BUILD_GNU_SYSTEM\fP 4
193Systemdelen av \fBDEB_BUILD_GNU_TYPE\fP.
194.IP \fBDEB_BUILD_GNU_TYPE\fP 4
195GNU\-systemtypen för byggmaskinen.
196.IP \fBDEB_BUILD_MULTIARCH\fP 4
197Den förtydligade GNU\-systemtypen för byggmaskinen, används för sökvägar i
198filsystemet.
199.IP \fBDEB_HOST_ARCH\fP 4
200Debianarkitekturen för värdmaskinen.
201.IP \fBDEB_HOST_ARCH_ABI\fP 4
202The Debian abi name of the host machine (since dpkg 1.18.11).
203.IP \fBDEB_HOST_ARCH_LIBC\fP 4
204The Debian libc name of the host machine (since dpkg 1.18.11).
205.IP \fBDEB_HOST_ARCH_OS\fP 4
206Debiansystemnamnet för värdmaskinen (sedan dpkg 1.13.2).
207.IP \fBDEB_HOST_ARCH_CPU\fP 4
208Debian\-processornamnet för värdmaskinen (sedan dpkg 1.13.2).
209.IP \fBDEB_HOST_ARCH_BITS\fP 4
210Pekarstorleken för värdmaskinen (i bitar; sedan dpkg 1.15.4).
211.IP \fBDEB_HOST_ARCH_ENDIAN\fP 4
212Endian 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
216Systemdelen av \fBDEB_HOST_GNU_TYPE\fP.
217.IP \fBDEB_HOST_GNU_TYPE\fP 4
218GNU\-systemtypen för värdmaskinen.
219.IP \fBDEB_HOST_MULTIARCH\fP 4
220Den förtydligade GNU\-systemtypen för värdmaskinen, används för sökvägar i
221filsystemet.
222.IP \fBDEB_TARGET_ARCH\fP 4
223Debianarkitekturen för målmaskinen (sedan dpkg 1.17.14).
224.IP \fBDEB_TARGET_ARCH_ABI\fP 4
225The Debian abi name of the target machine (since dpkg 1.18.11).
226.IP \fBDEB_TARGET_ARCH_LIBC\fP 4
227The Debian libc name of the target machine (since dpkg 1.18.11).
228.IP \fBDEB_TARGET_ARCH_OS\fP 4
229Debiansystemnamnet för målmaskinen (sedan dpkg 1.17.14).
230.IP \fBDEB_TARGET_ARCH_CPU\fP 4
231Debian\-processornamnet för målmaskinen (sedan dpkg 1.17.14).
232.IP \fBDEB_TARGET_ARCH_BITS\fP 4
233Pekarstorleken för målmaskinen (i bitar; sedan dpkg 1.17.14).
234.IP \fBDEB_TARGET_ARCH_ENDIAN\fP 4
235Endian för målmaskinen (little / big; sedan dpkg 1.17.14).
236.IP \fBDEB_TARGET_GNU_CPU\fP 4
237CPU\-delen av \fBDEB_TARGET_GNU_TYPE\fP (sedan dpkg 1.17.14).
238.IP \fBDEB_TARGET_GNU_SYSTEM\fP 4
239Systemdelen av \fBDEB_TARGET_GNU_TYPE\fP (sedan dpkg 1.17.14).
240.IP \fBDEB_TARGET_GNU_TYPE\fP 4
241GNU\-systemnamnet för målmaskinen (sedan dpkg 1.17.14).
242.IP \fBDEB_TARGET_MULTIARCH\fP 4
243Den förtydligade GNU\-systemtypen för målmaskinen, används för sökvägar i
244filsystemet (sedan dpkg 1.17.14).
245.
246.SH FILER
247.SS Arkitekturtabeller
248All these files have to be present for \fBdpkg\-architecture\fP to work. Their
249location can be overridden at runtime with the environment variable
250\fBDPKG_DATADIR\fP. These tables contain a format \fBVersion\fP pseudo\-field on
251their first line to mark their format, so that parsers can check if they
252understand it, such as "# Version=1.0".
253.TP
254\fI%PKGDATADIR%/cputable\fP
255Table of known CPU names and mapping to their GNU name. Format version 1.0
256(since dpkg 1.13.2).
257.TP
258\fI%PKGDATADIR%/ostable\fP
259Table of known operating system names and mapping to their GNU name. Format
260version 2.0 (since dpkg 1.18.11).
261.TP
262\fI%PKGDATADIR%/tupletable\fP
263Mapping between Debian architecture tuples and Debian architecture names.
264Format version 1.0 (since dpkg 1.18.11).
265.TP
266\fI%PKGDATADIR%/abitable\fP
267Table of Debian architecture ABI attribute overrides. Format version 2.0
268(since dpkg 1.18.11).
269.SS Paketeringsstöd
270.TP
271\fI%PKGDATADIR%/architecture.mk\fP
272Makefile\-utklipp som sätter alla variabler \fBdpkg\-architecture\fP skriver
273(sedan dpkg 1.16.1):
274.
275.SH EXEMPEL
276\fBdpkg\-architecture\fP godtar flaggan \fB\-a\fP och sänder den vidare till
277\fBdpkg\-architecture\fP. Andra exempel:
278.IP
279CC=i386\-gnu\-gcc dpkg\-architecture \-c debian/rules build
280.IP
281eval \`dpkg\-architecture \-u\`
282.PP
283Kontrollera om aktuell eller angiven arkitektur är samma en arkitektur:
284.IP
285dpkg\-architecture \-elinux\-alpha
286.IP
287dpkg\-architecture \-amips \-elinux\-mips
288.PP
289Se om den aktuella eller angivna arkitekturen är ett Linuxsystem:
290.IP
291dpkg\-architecture \-ilinux\-any
292.IP
293dpkg\-architecture \-ai386 \-ilinux\-any
294.
295.SS "Använda i debian/rules"
296Miljö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
298dock inte bero på dem eftersom detta förhindrar manuella anrop till
299skriptet. 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
301stödet för korskompilering i ditt paket:
302.PP
303Hämta GNU\-systemtypen och vidaresänd den till ./configure:
304.PP
305.RS 4
306.nf
307DEB_BUILD_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_BUILD_GNU_TYPE)
308DEB_HOST_GNU_TYPE ?= $(shell dpkg\-architecture \-qDEB_HOST_GNU_TYPE)
309[...]
310ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
311 confflags += \-\-build=$(DEB_HOST_GNU_TYPE)
312else
313 confflags += \-\-build=$(DEB_BUILD_GNU_TYPE) \e
314 \-\-host=$(DEB_HOST_GNU_TYPE)
315endif
316[...]
317\&./configure $(confflags)
318.fi
319.RE
320.PP
321Gör något endast för en specifik arkitektur:
322.PP
323.RS 4
324.nf
325DEB_HOST_ARCH ?= $(shell dpkg\-architecture \-qDEB_HOST_ARCH)
326
327ifeq ($(DEB_HOST_ARCH),alpha)
328 [...]
329endif
330.fi
331.RE
332.PP
333eller, 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.
335.PP
336Observera att du även kan bero på att ett externt Makefile\-utklipp sätter
337alla variabler \fBdpkg\-architecture\fP kan tillhandahålla:
338.PP
339.RS 4
340.nf
341include %PKGDATADIR%/architecture.mk
342
343ifeq ($(DEB_HOST_ARCH),alpha)
344 [...]
345endif
346.fi
347.RE
348.PP
349Oavsett bör du aldrig använda \fBdpkg \-\-print\-architecture\fP för att hämta
350arkitekturinformation när paketet byggs.
351.
352.SH MILJÖVARIABLER
353.TP
354\fBDPKG_DATADIR\fP
355If set, it will be used as the \fBdpkg\fP data directory, where the
356architecture tables are located (since dpkg 1.14.17). Defaults to
357«%PKGDATADIR%».
358.SH ANTECKNINGAR
359De långa kommando\- och flaggnamn är endast tillgängliga sedan dpkg 1.17.17.
360.
361.SH "SE ÄVEN"
362\fBdpkg\-buildpackage\fP(1), \fBdpkg\-cross\fP(1).
363.SH ÖVERSÄTTNING
364Peter Krefting och Daniel Nylander.