Provided by: dpkg-dev_1.18.4ubuntu1.7_all bug

NAMN

       dpkg-architecture - ställ in och bestäm arkitektur för paket som byggs

SYNOPS

       dpkg-architecture [flagga...] [åtgärd]

BESKRIVNING

       dpkg-architecture  innehåller  en  funktion  för  att  bestämma  och  ställa  in bygg- och
       värdarkitekturerna för att bygga paket.

       Byggarkitekturen bestäms alltid av ett externt anrop till dpkg(1) och kan inte ställas  in
       på kommandoraden.

       You  can specify the host architecture by providing one or both of the options --host-arch
       and --host-type. The default is determined by an external call to gcc(1), or the  same  as
       the  build  architecture  if  CC or gcc are both not available. One out of --host-arch and
       --host-type is sufficient, the value of the other will be set to a usable default. Indeed,
       it  is  often  better to only specify one, because dpkg-architecture will warn you if your
       choice does not match the default.

KOMMANDON

       -l, --list
              Skriv miljövariabler, en per rad, på  formatet  VARIABEL=värde.  Detta  är  förvald
              åtgärd.

       -e, --equal arkitektur
              Kontrollera  arkitektur  för  likhet  (sedan dpkg 1.13.13). Det jämför den aktuella
              eller angivna Debian-värdarkitekturen mot arkitektur, för att se  om  de  är  lika.
              Åtgärden  expanderar inte jokertecken i arkitekturer. Kommandot avslutar med status
              0 om det är en träff, 1 om det inte är en träff.

       -i, --is arkitektur-jokertecken
              Kontrollera arkitekturens identitet (sedan dpkg 1.13.13). Det jämför  den  aktuella
              eller  angivna  Debian-värdarkitekturen  mot  arkitektur-jokertecken  efter  att ha
              expanderat det som ett arkitektur-jokertecken, för att se om de är lika.  Kommandot
              avslutar med status 0 om det är en träff, 1 om det inte är en träff.

       -q, --query variabelnamn
              Skriv värdet på en enkel variabel.

       -s, --print-set
              Visar ett exportkommando. Detta kan användas för att sätta miljövariabler med eval.

       -u, --print-unset
              Visar  ett  kommando  liknande  --print-unset  men  för att ta bort värdet för alla
              variabler.

       -c, --command kommando
              Exekvera ett kommando i en miljö som har alla variabler  satta  till  det  bestämda
              värdet.

       -L, --list-known
              Visar en lista över giltiga arkitekturnamn. Möjligen begränsad av en eller flera av
              träffvalen  --match-wildcard,  --match-bits  eller   --match-endian   (sedan   dpkg
              1.17.14).

       -?, --help
              Visar hjälpskärm och avslutar.

       --version
              Visar version och avslutar.

FLAGGOR

       -a, --host-arch arkitektur
              Sätter värd-Debianarkitekturen.

       -t, --host-type gnu-system-typ
              Sätter värd-GNU-systemtypen.

       -A, --target-arch arkitektur
              Set the target Debian architecture (since dpkg 1.17.14).

       -T, --target-type gnu-system-typ
              Set the target GNU system type (since dpkg 1.17.14).

       -W, --match-wildcard arkitektur-jokertecken
              Begränsa  arkitekturerna  som  visas  med  --list-known  till  en som motsvarar det
              angivna arkitektur-jokertecknet (sedan dpkg 1.17.14).

       -B, --match-bits arkitektur-bitar
              Begränsa arkitekturerna som visas  med  --list-known  till  en  med  angivet  antal
              CPU-bitar (sedan dpkg 1.17.14). Antingen 32 eller 64.

       -E, --match-endian architecture-endian
              Begränsa  arkitekturerna  som visas med --list-known till en som har angiven endian
              (sedan dpkg 1.17.14). Antingen little (liten endian) eller big (stor endian).

       -f, --force
              Values set by existing environment variables with the same  name  as  used  by  the
              scripts  are honored (i.e. used by dpkg-architecture), except if this force flag is
              present. This  allows  the  user  to  override  a  value  even  when  the  call  to
              dpkg-architecture    is    buried    in    some    other    script   (for   example
              dpkg-buildpackage(1)).

TERMINOLOGI

       byggmaskin
           Maskinen paketet byggs på.

       värdmaskin
           Maskinen paketet byggs för.

       målmaskin
           The machine the compiler is  building  for.  This  is  only  needed  when  building  a
           cross-toolchain,  one  that  will be built on the build architecture, to be run on the
           host architecture, and to build code for the target architecture.

       Debianarkitektur
           Debianarkitektursträngen, vilken  anger  binärträdet  i  FTP-arkivet.  Exempel:  i386,
           sparc, hurd-i386.

       Debian architecture wildcard
           A  Debian  architecture  wildcard is a special architecture string that will match any
           real architecture being part of it. The  general  form  is  <kernel>-<cpu>.  Examples:
           linux-any, any-i386, hurd-any.

       GNU-systemtyp
           An  architecture  specification  string consisting of two parts separated by a hyphen:
           cpu and system. Examples: i586-linux-gnu, sparc-linux-gnu, i686-gnu, x86_64-netbsd.

       multiarch triplet
           The clarified GNU system type, used for filesystem paths. This triplet does not change
           even  when  the  baseline ISA gets bumped, so that the resulting paths are stable over
           time. The only current difference with the GNU system type is that the  CPU  part  for
           i386 based systems is always i386. Examples: i386-linux-gnu, x86_64-linux-gnu. Example
           paths: /lib/powerpc64le-linux-gnu/, /usr/lib/i386-kfreebsd-gnu/.

VARIABLER

       Följande variabler sätts av dpkg-architecture:

       DEB_BUILD_ARCH
           Debianarkitekturen för byggmaskinen.

       DEB_BUILD_ARCH_OS
           Debiansystemnamnet på byggmaskinen (sedan dpkg 1.13.2).

       DEB_BUILD_ARCH_CPU
           Debian-processornamnet för byggmaskinen (sedan dpkg 1.13.).

       DEB_BUILD_ARCH_BITS
           Pekarstorleken för byggmaskinen (i bitar; sedan dpkg 1.15.4).

       DEB_BUILD_ARCH_ENDIAN
           Endian för byggmaskinen (little / big; sedan dpkg 1.15.4).

       DEB_BUILD_GNU_CPU
           CPU-delen av DEB_BUILD_GNU_TYPE.

       DEB_BUILD_GNU_SYSTEM
           Systemdelen av DEB_BUILD_GNU_TYPE.

       DEB_BUILD_GNU_TYPE
           GNU-systemtypen för byggmaskinen.

       DEB_BUILD_MULTIARCH
           Den förtydligade GNU-systemtypen för byggmaskinen, används för sökvägar i filsystemet.

       DEB_HOST_ARCH
           Debianarkitekturen för värdmaskinen.

       DEB_HOST_ARCH_OS
           Debiansystemnamnet för värdmaskinen (sedan dpkg 1.13.2).

       DEB_HOST_ARCH_CPU
           Debian-processornamnet för värdmaskinen (sedan dpkg 1.13.2).

       DEB_HOST_ARCH_BITS
           Pekarstorleken för värdmaskinen (i bitar; sedan dpkg 1.15.4).

       DEB_HOST_ARCH_ENDIAN
           Endian för värdmaskinen (little / big; sedan dpkg 1.15.4).

       DEB_HOST_GNU_CPU
           CPU-delen av DEB_HOST_GNU_TYPE.

       DEB_HOST_GNU_SYSTEM
           Systemdelen av DEB_HOST_GNU_TYPE.

       DEB_HOST_GNU_TYPE
           GNU-systemtypen för värdmaskinen.

       DEB_HOST_MULTIARCH
           Den förtydligade GNU-systemtypen för värdmaskinen, används för sökvägar i filsystemet.

       DEB_TARGET_ARCH
           Debianarkitekturen för målmaskinen (sedan dpkg 1.17.14).

       DEB_TARGET_ARCH_OS
           Debiansystemnamnet för målmaskinen (sedan dpkg 1.17.14).

       DEB_TARGET_ARCH_CPU
           Debian-processornamnet för målmaskinen (sedan dpkg 1.17.14).

       DEB_TARGET_ARCH_BITS
           Pekarstorleken för målmaskinen (i bitar; sedan dpkg 1.17.14).

       DEB_TARGET_ARCH_ENDIAN
           Endian för målmaskinen (little / big; sedan dpkg 1.17.14).

       DEB_TARGET_GNU_CPU
           CPU-delen av DEB_TARGET_GNU_TYPE (sedan dpkg 1.17.14).

       DEB_TARGET_GNU_SYSTEM
           Systemdelen av DEB_TARGET_GNU_TYPE (sedan dpkg 1.17.14).

       DEB_TARGET_GNU_TYPE
           GNU-systemnamnet för målmaskinen (sedan dpkg 1.17.14).

       DEB_TARGET_MULTIARCH
           Den förtydligade GNU-systemtypen för målmaskinen, används för sökvägar  i  filsystemet
           (sedan dpkg 1.17.14).

FILER

   Arkitekturtabeller
       Alla  dessa filer måste finnas för att dpkg-architecture måste finnas. Deras placering kan
       överstyras vid körning med miljövariabeln DPKG_DATADIR.

       /usr/share/dpkg/cputable
              Tabell över kända processornamn och deras motsvarande GNU-namn.

       /usr/share/dpkg/ostable
              Tabell över kända operativsystemsnamn och deras motsvarande GNU-namn.

       /usr/share/dpkg/triplettable
              Tabell över Debianarkitekturtripplar och deras motsvarande Debianarkitekturnamn.

       /usr/share/dpkg/abitable
              Table of Debian architecture ABI attribute overrides.

   Paketeringsstöd
       /usr/share/dpkg/architecture.mk
              Makefile-utklipp som sätter alla variabler dpkg-architecture  skriver  (sedan  dpkg
              1.16.1):

EXEMPEL

       dpkg-buildpackage  accepts  the  -a  option  and  passes  it  to  dpkg-architecture. Other
       examples:

              CC=i386-gnu-gcc dpkg-architecture -c debian/rules build

              eval `dpkg-architecture -u`

       Kontrollera om aktuell eller angiven arkitektur är samma en arkitektur:

              dpkg-architecture -elinux-alpha

              dpkg-architecture -amips -elinux-mips

       Se om den aktuella eller angivna arkitekturen är ett Linuxsystem:

              dpkg-architecture -ilinux-any

              dpkg-architecture -ai386 -ilinux-any

   Använda i debian/rules
       The environment variables set by dpkg-architecture are  passed  to  debian/rules  as  make
       variables  (see  make documentation). However, you should not rely on them, as this breaks
       manual invocation of  the  script.  Instead,  you  should  always  initialize  them  using
       dpkg-architecture  with the -q option. Here are some examples, which also show how you can
       improve the cross compilation support in your package:

       Hämta GNU-systemtypen och vidaresänd den till ./configure:

           DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
           DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
           [...]
           ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
             confflags += --build=$(DEB_HOST_GNU_TYPE)
           else
             confflags += --build=$(DEB_BUILD_GNU_TYPE) \
                          --host=$(DEB_HOST_GNU_TYPE)
           endif
           [...]
           ./configure $(confflags)

       Gör något endast för en specifik arkitektur:

           DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

           ifeq ($(DEB_HOST_ARCH),alpha)
             [...]
           endif

       eller,  om  du  bara  vill  testa  på  processor-   eller   OS-typ,   använd   variablerna
       DEB_HOST_ARCH_CPU eller DEB_HOST_ARCH_OS.

       Observera  att  du även kan bero på att ett externt Makefile-utklipp sätter alla variabler
       dpkg-architecture kan tillhandahålla:

           include /usr/share/dpkg/architecture.mk

           ifeq ($(DEB_HOST_ARCH),alpha)
             [...]
           endif

       Oavsett   bör   du   aldrig   använda   dpkg   --print-architecture    för    att    hämta
       arkitekturinformation när paketet byggs.

ANTECKNINGAR

       De långa kommando- och flaggnamn är endast tillgängliga sedan dpkg 1.17.17.

SE ÄVEN

       dpkg-buildpackage(1), dpkg-cross(1).

ÖVERSÄTTNING

       Peter Krefting och Daniel Nylander.