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

NAMN

       dpkg-buildpackage - bygg binär- eller källkodspaket från källkod

SYNOPS

       dpkg-buildpackage [flagga...]

BESKRIVNING

       dpkg-buildprogram   är   ett  program  som  automatiserar  processen  med  att  bygga  ett
       Debianpaket. Det består av följande steg:

       1. Byggmiljön förbereds genom att diverse miljövariabler sätts (se MILJÖ), kör haken  init
          och anropar dpkg-source --before-build (såvida inte -T eller --target används).

       2. Byggberoenden och -konflikter kontrolleras att de uppfylls (såvida inte -d anges).

       3. Om  ett  specifikt mål har valts med flaggan -T eller --target anropas det målet, varpå
          programmet avslutas. I annat fall körs haken preclean och anropas fakeroot debian/rules
          clean för att städa byggträdet (såvida inte -nc anges).

       4. Kör  haken source och anropar dpkg-source -b för att skapa källkodspaketet (såvida inte
          ett bygge av enbart binärer har valts med -b, -B eller -A).

       5. Kör haken build och anropar debian/rules byggmål, därefter körs haken binary  följt  av
          fakeroot  debian/rules  binärmål (såvida inte ett bygge av enbart källkod har valts med
          -S). Observera att byggmål och binärmål är ett av build och binary (standardval,  eller
          om  -b anges), build-arch och binary-arch (om -B eller -G anges), eller build-indep och
          binary-indep (om -A eller -g anges).

       6. Kör haken changes och anropar dpkg-genchanges för att skapa en .changes-fil.  Många  av
          flaggorna till dpkg-buildpackage vidaresänds till dpkg-genchanges.

       7. Kör  haken postclean och, om -tc anges, anropar fakeroot debian/rules clean ytterligare
          en gång.

       8. Anropar dpkg-source --after-build.

       9. Kör haken check och anropar en paketkontrollerare för .changes-filen (om  ett  kommando
          har angivits med DEB_CHECK_COMMAND eller med --check-command).

       10.
          Kör  haken  sign och anropar gpg2 eller gpg för att signera .dsc-filen (om sådan finns,
          såvida inte -us anges eller på UNRELEASED-byggen) och .changes-filen (såvida  inte  -uc
          anges eller på UNRELEASED-byggen).

       11.
          Kör haken done.

FLAGGOR

       -g     Specifies  a  build  limited to source and architecture independent packages (since
              dpkg 1.17.11). Passed to dpkg-genchanges.

       -G     Specifies a build limited to source and architecture specific packages (since  dpkg
              1.17.11). Passed to dpkg-genchanges.

       -b     Anger  att  enbart  binära  paket  skall byggas, inga källkodsfiler byggs och/eller
              distribueras. Sänds vidare till dpkg-genchanges.

       -B     Anger att enbart binära  paket  skall  byggas,  begränsat  till  arkitekturberoende
              paket. Sänds vidare till dpkg-genchanges.

       -A     Anger  att  enbart  binära  paket  skall byggas, begränsat till arkitekturoberoende
              paket. Sänds vidare till dpkg-genchanges.

       -S     Specifies a source-only build, no binary  packages  need  to  be  made.  Passed  to
              dpkg-genchanges. Note: if what you want is simply to (re-)build the source package,
              using dpkg-source is always better as it does not require any build dependencies to
              be installed to be able to call the clean target.

       -F     Specifies a normal full build, binary and source packages will be built (since dpkg
              1.15.8). This is the same as the default case when no build option is specified.

       --target=mål
       --target mål
       -Tmål  Calls debian/rules target after having setup the build environment  and  stops  the
              package  build  process  here (since dpkg 1.15.0). If --as-root is also given, then
              the command is executed as root (see -r).  Note  that  official  targets  that  are
              required to be run as root by the Debian policy do not need this option.

       --as-root
              Only  meaningful  together  with  --target  (since  dpkg 1.15.0). Requires that the
              target be run with root rights.

       -si
       -sa
       -sd
       -vversion
       -Cändringsbeskrivning
       -mpaketansvarige-adress
       -epaketansvarige-adress
              Sänds vidare utan ändringar till dpkg-genchanges. Se dess manualsida.

       -a, --host-arch arkitektur
              Specify the Debian architecture we build for (long option since dpkg 1.17.17).  The
              architecture  of  the  machine we build on is determined automatically, and is also
              the default for the host machine.

       -t, --host-type gnu-system-typ
              Specify the GNU system type we build for (long option since dpkg 1.17.17).  It  can
              be  used  in  place  of  --host-arch or as a complement to override the default GNU
              system type of the host Debian architecture.

       --target-arch arkitektur
              Specify the Debian architecture the binaries  built  will  build  for  (since  dpkg
              1.17.17). The default value is the host machine.

       --target-type gnu-system-type
              Specify the GNU system type the binaries built will build for (since dpkg 1.17.17).
              It can be used in place of --target-arch or as a complement to override the default
              GNU system type of the target Debian architecture.

       -Pprofil[,...]
              Specify the profile(s) we build, as a comma-separated list (since dpkg 1.17.2). The
              default behavior is to build for no specific profile. Also sets them  (as  a  space
              separated  list)  as  the DEB_BUILD_PROFILES environment variable which allows, for
              example, debian/rules files to use this information for conditional builds.

       -j[jobb|auto]
              Number of jobs allowed to be run simultaneously, number of jobs matching the number
              of online processors if auto is specified (since dpkg 1.17.10), or unlimited number
              if jobs is not specified, equivalent to the make(1) option of the same name  (since
              dpkg  1.14.7).  Will add itself to the MAKEFLAGS environment variable, which should
              cause all subsequent make invocations to  inherit  the  option,  thus  forcing  the
              parallel  setting  on the packaging (and possibly the upstream build system if that
              uses make) regardless of their support for parallel builds, which might cause build
              failures.  Also adds parallel=jobs or parallel to the DEB_BUILD_OPTIONS environment
              variable which allows debian/rules files to use  this  information  for  their  own
              purposes.  The  -j  value will override the parallel=jobs or parallel option in the
              DEB_BUILD_OPTIONS environment variable. Note that the auto value will get  replaced
              by  the  actual  number  of  currently  active processors, and as such will not get
              propagated to any child process. If the  number  of  online  processors  cannot  be
              inferred then the code will fallback to using an unlimited number.

       -J[jobs|auto]
              This  option (since dpkg 1.18.2) is equivalent to the -j option except that it does
              not set the MAKEFLAGS environment variable, and as such it is safer to use with any
              package including those that are not parallel-build safe.

       -D     Kontrollera   byggberoenden  och  -konflikter; avbryt om de inte uppfylls. Detta är
              standardbeteendet.

       -d     Kontrollera inte byggberoenden eller -konflikter.

       --ignore-builtin-builddeps
              Do not check built-in build dependencies and conflicts (since dpkg  1.18.2).  These
              are  the  distribution  specific  implicit build dependencies usually required in a
              build environment, the so called Build-Essential package set.

       -nc    Do not clean the source tree. Implies -b if nothing else has  been  selected  among
              -F, -g, -G, -B, -A or -S. Implies -d with -S (since dpkg 1.18.0).

       -tc    Städa  källkodsträdet  (använder  få-root-kommando  debian/rules  clean)  efter att
              paketet har byggts.

       -rfå-root-kommando
              När dpkg-buildpackages behöver exekvera delar av byggprocessen som root sätter  den
              kommandot som skall exekveras efter få-root-kommando om ett sådant har angivits. Om
              inte  kommer  fakeroot  att  användas  som  standard,   om   kommandot   existerar.
              få-root-kommando måste börja med namnet på det faktiska kommandot som skall anropas
              samt de parametrar det skall anropas med. få-root-kommando kan innehålla parametrar
              (de  måste  vara  avdelade med blanksteg) men inga skalmetatecken. få-root-kommando
              kan typiskt vara fakeroot, sudo, super eller really. su är inte  lämpligt  eftersom
              det  kräver  flaggan  -c  för att köra ett kommando och även då kan det bara starta
              användarens skal med -c istället för att sända flaggor individuellt till  kommandot
              som skall startas.

       -Rregelfil
              Building  a Debian package usually involves invoking debian/rules as a command with
              several standard parameters (since dpkg 1.14.17). With this option it's possible to
              use another program invocation to build the package (it can include space separated
              parameters). Alternatively it can be used to execute the standard rules  file  with
              another  make  program (for example by using /usr/local/bin/make -f debian/rules as
              rules-file).

       --check-command=kontrollkommando
              Command used to check the .changes file itself and any artifact built referenced in
              the  file  (since dpkg 1.17.6). The command should take the .changes pathname as an
              argument. This command will usually be lintian.

       --check-option=val
              Pass  option  opt  to  the  check-command  specified  with   DEB_CHECK_COMMAND   or
              --check-command (since dpkg 1.17.6). Can be used multiple times.

       --hook-hakenamn=hakekommando
              Set  the specified shell code hook-command as the hook hook-name, which will run at
              the times specified in the run steps (since dpkg 1.17.6). The hooks will always  be
              executed  even  if  the  following  action  is not performed (except for the binary
              hook).

              Observera: Hakar kan påverka byggprocessen och  orsaka  att  byggen  misslyckas  om
              deras kommandon misslyckas, så se upp för oförutsedda konsekvenser.

              För närvarande stöds följande hakenamn:

              init preclean source build binary changes postclean check sign done

              hakekommando stöder följande substitueringsformatsträng, som appliceras på den föra
              exekvering:

              %%     Ett ensamt %-tecken.

              %a     Ett boolskt värde (0 eller 1) som anger om följande funktion utförs.

              %p     Namnet på källkodspaketet.

              %v     Version för källkodspaketet.

              %s     Version för källkodspaketet (utan epoken).

              %u     Uppströmsversionen.

       -psigneringskommando
              När dpkg-buildpackage måste exekvera GPG för att signera ett källkodsstyrfil (.dsc)
              eller  en  .changes-fil  kör det signeringskommando (det letar i PATH om så behövs)
              istället för gpg2 eller gpg. signeringskommando får  de  argument  gpg2  eller  gpg
              skulle  ha  fått.  signeringskommando  får  inte  innehålla  blanksteg  eller andra
              skalmetatecken.

       -knyckel-id
              Ange nyckel-id att använda vid signering av paket.

       -us    Signera inte källkodspaketet.

       -uc    Signera inte .changes-filen.

       --force-sign
              Tvinga signering av de slutliga filerna (sedan dpkg 1.17.0), oberoende av -us eller
              -uc eller annan intern heuristik.

       -i[reguljärt-uttryck]
       -I[mönster]
       -s[nsAkurKUR]
       -z, -Z Sänds vidare utan ändringar till dpkg-source. Se dess manualsida.

       --source-option=val
              Pass option opt to dpkg-source (since dpkg 1.15.6). Can be used multiple times.

       --changes-option=val
              Pass option opt to dpkg-genchanges (since dpkg 1.15.6). Can be used multiple times.

       --admindir=kat
       --admindir kat
              Change  the location of the dpkg database (since dpkg 1.14.0). The default location
              is /var/lib/dpkg.

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

       --version
              Visar version och avslutar.

MILJÖVARIABLER

       DEB_CHECK_COMMAND
              If set, it will be used as the command to  check  the  .changes  file  (since  dpkg
              1.17.6). Overridden by the --check-command option.

       DEB_SIGN_KEYID
              If  set,  it  will be used to sign the .changes and .dsc files (since dpkg 1.17.2).
              Overridden by the -k option.

       DEB_BUILD_OPTIONS
              Om satt, och innehåller nocheck, kommer variabeln DEB_CHECK_COMMAND att ignoreras.

       DEB_BUILD_PROFILES
              If set, it will be used as the active build profile(s) for the package being  built
              (since  dpkg  1.17.2). It is a space separated list of profile names. Overridden by
              the -P option.

   Bero  exporterade miljöflaggor
       Även om dpkg-buildpackage exporterar några variabler bör inte debian/rules  vara  beroende
       av  deras  närvaro  och bör istället använda respektive gränssnitt för att hämta de värden
       som behövs.

   Variabler som sätts av dpkg-architecture
       dpkg-architecture anropas med flaggorna -a och -t vidaresända. Variabler som skrivs ut via
       dess -s-flagga integreras i byggmiljön.

ANTECKNINGAR

   Kompileringsflaggor exporteras inte längre.
       Mellan  dpkg  1.14.17  och 1.16.1 exporterade dpkg-buildpackage kompilatorflaggor (CFLAGS,
       CXXFLAGS, CPPFLAGS och LDFLAGS) med  värden  enligt  dpkg-buildflags.  Detta  gäller  inte
       längre.

   Förvalda byggmål
       dpkg-buildpackage  använder  målen build-archi och build-indep från dpkg 1.16.2. Dessa mål
       krävs därmed, men för att undvika att existerande paket går sönder, och för  att  förenkla
       övergången, kommer den falla tillbaka till att använda målet build om make -f debian/rules
       -gn byggmål returnerar statuskoden 2.

PROGRAMFEL

       Det borde vara möjligt att ange blanksteg och skalmetatecken och  inledande  argument  för
       få-root-kommando och signeringskommando.

SE ÄVEN

       dpkg-source(1), dpkg-architecture(1), dpkg-buildflags(1), dpkg-genchanges(1), fakeroot(1),
       lintian(1), gpg2(1), gpg(1).

ÖVERSÄTTNING

       Peter Krefting och Daniel Nylander.