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

NOME

       dpkg-buildpackage - crea pacchetti binari o sorgente a partire dai sorgenti

SINTASSI

       dpkg-buildpackage [opzione...]

DESCRIZIONE

       dpkg-buildpackage  è un programma che automatizza il processo di creazione di un pacchetto
       Debian. Effettua i seguenti passaggi:

       1. Prepara l'ambiente di compilazione  impostando  diverse  variabili  d'ambiente  (vedere
          ENVIRONMENT),  esegue  l'hook  init e invoca dpkg-source --before-build (a meno che non
          sia stata usata -T o --target.

       2. Controlla che le dipendenze di  compilazione  ed  i  conflitti  di  compilazione  siano
          soddisfatti (a meno che non sia stata usata -d).

       3. Se  è  stato  selezionato  un target specifico con l'opzione -T o --target, invoca quel
          target e si ferma a quel punto. Altrimenti esegue l'hook  preclean  e  invoca  fakeroot
          debian/rules  clean per pulire l'albero di compilazione (a meno che non sia stata usata
          -nc).

       4. Esegue l'hook source e invoca dpkg-source -b per generare il pacchetto sorgente (a meno
          che non sia stato richiesto di creare solo il pacchetto binario usando -b, -B o -A).

       5. Esegue l'hook build e invoca debian/rules target-compilazione, poi esegue l'hook binary
          seguito da fakeroot debian/rules target-binario (a meno che non sia stato richiesto  di
          creare  solo  il  pacchetto  sorgente  usando  -S).  Notare  che  target-compilazione e
          target-binario sono build e binary (in modo predefinito o se viene  specificata  -b)  o
          build-arch  e  binary-arch  (se  viene  specificata  -B  o  -G)  oppure  build-indep  e
          binary-indep (se viene specificata -A o -g).

       6. Esegue l'hook changes e invoca dpkg-genchanges per generare  un  file  .changes.  Molte
          opzioni di dpkg-buildpackage vengono inoltrate a dpkg-genchanges.

       7. Esegue  l'hook  postclean  e,  se  viene  specificata  l'opzione -tc, invoca nuovamente
          fakeroot debian/rules clean.

       8. Invoca dpkg-source --after-build.

       9. Esegue l'hook check e invoca uno strumento di  controllo  dei  pacchetti  per  il  file
          .changes (se è specificato un comando in DEB_CHECK_COMMAND o con --check-command).

       10.
          Esegue  l'hook sign e invoca gpg2 o gpg per firmare il file .dsc (se esiste, a meno che
          non sia stata specificata l'opzione  -us  o  in  compilazioni  UNRELEASED)  e  il  file
          .changes  (a  meno  che  non  sia  stata  specificata  l'opzione  -us o in compilazioni
          UNRELEASED).

       11.
          Esegue l'hook done.

OPZIONI

       -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     Specifica una compilazione solo binaria, nessun file sorgente deve essere creato  o
              distribuito. Passata a dpkg-genchanges.

       -B     Specifica  una  compilazione  solo  binaria,  limitata  ai  pacchetti che dipendono
              dall'architettura. Passata a dpkg-genchanges.

       -A     Specifica  una  compilazione  solo  binaria,  limitata  ai  pacchetti  indipendenti
              dall'architettura. Passata a 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=target
       --target target
       -Ttarget
              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
       -vversione
       -Cdescrizione-modifiche
       -mindirizzo-manutentore
       -eindirizzo-manutentore
              Passate inalterate a dpkg-genchanges. Vedere la sua pagina di manuale.

       -a, --host-arch architettura
              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 tipo-sistema-gnu
              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 architettura
              Specify  the  Debian  architecture  the  binaries  built will build for (since dpkg
              1.17.17).  The default value is the host machine.

       --target-type tipo-sistema-gnu
              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.

       -Pprofilo[,...]
              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[compiti|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     Controlla le dipendenze e i conflitti di compilazione; si interrompe  se  non  sono
              soddisfatti. Questo è il comportamento predefinito.

       -d     Non controlla le dipendenze e i conflitti di compilazione.

       --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    Pulisce  l'albero  dei  sorgenti  (usando  comando-per-diventare-root  debian/rules
              clean) dopo che il pacchetto è stato creato.

       -rcomando-per-diventare-root
              Quando  dpkg-buildpackage  deve  eseguire  parte  del  processo  di  creazione  dei
              pacchetti    come    utente    root,    antepone    al    comando    che     esegue
              comando-per-diventare-root,  se  è  stato  specificato.  Altrimenti, se non è stato
              specificato, viene in modo predefinito usato fakeroot, se tale comando è  presente.
              comando-per-diventare-root  dovrebbe iniziare con il nome di un programma in PATH e
              accetta come argomenti il nome del vero comando da eseguire  e  gli  argomenti  per
              esso.   comando-per-diventare-root  può  includere  parametri  (che  devono  essere
              separati da spazi) ma non  metacaratteri  della  shell.  comando-per-diventare-root
              tipicamente  può  essere fakeroot, sudo, super o really. su non è adatto perché può
              solo invocare la shell utente con -c invece di passare singoli argomenti al comando
              da eseguire.

       -Rfile-rules
              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=comando-di-controllo
              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=opz
              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-nome-hook=comando-hook
              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).

              Nota: gli hook possono influenzare il processo di compilazione e causare fallimenti
              se falliscono i loro comandi, perciò stare attenti alle conseguenze indesiderate.

              I nomi-hook attualmente supportati sono:

              init preclean source build binary changes postclean check sign done

              Il  comando-hook  supporta  le  seguenti  stringhe  di  sostituzione  che  verranno
              applicate ad esso prima dell'esecuzione:

              %%     Un singolo carattere %.

              %a     Un valore booleano (0 o 1) che indica se l'azione successiva viene eseguita.

              %p     Il nome del pacchetto sorgente.

              %v     La versione del pacchetto sorgente.

              %s     La versione del pacchetto sorgente (senza l'epoca).

              %u     La versione originale a monte.

       -pcomando-per-firmare
              Quando dpkg-buildpackage deve eseguire GPG per firmare un  file  di  controllo  dei
              sorgenti  (.dsc) o un file .changes, esegue comando-per-firmare (cercandolo in PATH
              se necessario) invece di gpg2 o gpg. comando-per-firmare riceve gli  argomenti  che
              avrebbe  ricevuto  gpg2 o gpg. comando-per-firmare non deve contenere spazi o altri
              metacaratteri della shell.

       -kID-chiave
              Specifica l'ID della chiave da usare per firmare i pacchetti.

       -us    Non firma il pacchetto sorgente.

       -uc    Non firma il file .changes.

       --force-sign
              Forza la firma dei file risultanti (a partire da dpkg 1.17.0), indipendentemente da
              -us o -uc o altre euristiche interne.

       -i[regex]
       -I[modello]
       -s[nsAkurKUR]
       -z, -Z Passate inalterate a dpkg-source. Vedere la sua pagina di manuale.

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

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

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

       -?, --help
              Mostra il messaggio sull'uso ed esce.

       --version
              Mostra la versione ed esce.

AMBIENTE

       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
              Se impostata e contiene nocheck la variabile DEB_CHECK_COMMAND sarà ignorata.

       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.

   Dipendenza dalle variabili di ambiente esportate
       Anche  se  dpkg-buildpackage  esporta  alcune  variabili,  debian/rules  non dovrebbe fare
       affidamento sulla loro  presenza  e  dovrebbe  invece  usare  l'interfaccia  apposita  per
       recuperare i valori necessari.

   Variabili impostate da dpkg-architecture
       dpkg-architecture viene invocata inoltrando i parametri -a e -t. Qualsiasi variabile che è
       prodotta in output dalla sua opzione -s viene integrata nell'ambiente di compilazione.

NOTE

   I flag di compilazione non sono più esportati
       Nelle versioni comprese tra la 1.14.17 e la 1.16.1, dpkg-buildpackage esportava i flag  di
       compilazione  (CFLAGS,  CXXFLAGS,  FFLAGS,  CPPFLAGS e LDFLAGS) con i valori restituiti da
       dpkg-buildflags. Ora non è più così.

   Target di compilazione predefiniti
       A partire da dpkg 1.16.2, dpkg-buildpackage usa i target build-arch e build-indep.  Questi
       target  sono perciò obbligatori. Per evitare di rendere difettosi i pacchetti esistenti, e
       per facilitare la transizione, ripiegherà però  sull'uso  del  target  build  se  make  -f
       debian/rules -qn target-compilazione restituisce 2 come codice di uscita.

BUG

       Dovrebbe  essere possibile usare spazi e metacaratteri della shell e specificare argomenti
       iniziali quando si usa comando-per-diventare-root e comando-per-firmare.

VEDERE ANCHE

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