IMPORTANT: Per accedir als fitxer de subversion: http://acacha.org/svn (sense password). Poc a poc s'aniran migrant els enllaços. Encara però funciona el subversion de la farga però no se sap fins quan... (usuari: prova i la paraula de pas 123456)

Forma part del paquet devscripts.

Instal·lació

$ sudo apt-get install devscripts

Funcionament

debuild permet automatitzar amb més profunditat l'execució de dpkg-buildpackage. De fet segons el manual:

$ man debuild
debuild  creates  all the files necessary for uploading a Debian package.  It first runs dpkg-buildpackage, then runs lintian on the .changes file
      created (assuming that lintian is installed), and finally signs the .changes and/or .dsc files as appropriate (using debsign(1) to do this instead
      of dpkg-buildpackage(1) itself; all relevant key-signing options are passed on).  Parameters can be passed to dpkg-buildpackage and lintian, where
      the parameters to the latter are indicated with the --lintian-opts option.  The allowable options in this case are --lintian and  --no-lintian  to
      force  or skip the lintian step, respectively. The default is to run lintian.  There are also various options available for setting and preserving
      environment variables, as described below in the Environment Variables section.  In this method of running debuild, we also save a  build  log  to
      the file ../<package>_<version>_<arch>.build.

      An  alternative  way  of  using debuild is to use one or more of the parameters binary, binary-arch, binary-indep and clean, in which case debuild
      will attempt to gain root privileges and then run debian/rules with the given parameters.  A  --rootcmd=gain-root-command  or  -rgain-root-command
      option  may  be  used  to specify a method of gaining root privileges.  The gain-root-command is likely to be one of fakeroot, sudo or super.  See
      below for further discussion of this point.  Again, the environment preservation options may be used.  In this case, debuild will also attempt  to
      run  dpkg-checkbuilddeps  first;  this  can  be  explicitly requested or switched off using the options -D and -d respectively.  Note also that if
      either of these or a -r option is specified in the configuration file option DEBUILD_DPKG_BUILDPACKAGE_OPTS, then it will be  recognised  even  in
      this method of invocation of debuild.

      debuild also reads the devscripts configuration files as described below.  This allows default options to be given.
...

El que fa és executar en l'ordre següent:

Es pot configurar a mida l'ús de debuild canviant els fitxers:

/etc/devscripts.conf --> a nivell de sistema
~/.devscripts --> a nivell d'usuari

O utilitzar les variables d'entorn:

DEBSIGN_KEYID=Your_GPG_keyID
DEBUILD_LINTIAN_OPTS=-i -I --show-overrides

Normalment si heu configurat els valors anteriors prèviament aleshores només cal executar:

$ debuild

Si els fitxers no cal signar-los podeu posar:

$ debuild -us -uc

Es pot fer un clean amb:

$ debuild clean

Format Debian 3.0 quilt

Si us dona l'error:

$ debuild
This package has a Debian revision number but there does not seem to be
an appropriate original tar file or .orig directory in the parent directory;
(expected one of ubuntucustom_0.1.orig.tar.gz, ubuntucustom_0.1.orig.tar.bz2,
ubuntucustom_0.1.orig.tar.lzma,  ubuntucustom_0.1.orig.tar.xz or ubuntucustom-0.1.orig)
continue anyway? (y/n) 

Aleshores el que heu de fer es crear prèviament el fitxer NOMPAQUET_VERSIO.orig.tar.gz. Es simplement fer una copia del tar.gz original:

/bin/cp NOMPAQUET-VERSIO.tar.gz NOMPAQUET_VERSIO.orig.tar.gz

IMPORTANT: El paquet original es crearà d'una carpeta anomenada (és obligatori per què funcioni!) NOMPAQUET-VERSIO. Observeu el guió normal! En canvi el orig ha de ser amb guió baix!

Vegeu també

Enllaços externs