Changes between Version 8 and Version 9 of AnatomyOfAPackage

01/23/13 16:43:35 (11 years ago)



  • AnatomyOfAPackage

    v8 v9  
    1010 * '''`debian/`''': CDBS packages will often have a file called debian/ that looks exactly like debian/control except that it has @cdbs@ as a build dependency. This is replaced with various build dependencies that CDBS knows about (like debhelper and cdbs) at build time to generate debian/control. 
    1111 * '''`debian/copyright`''':  A human-readable description of the copyright status of the package.   See [wiki:Copyright] for what to use in the Athena repository. 
    12  * '''`debian/rules`''': The executable makefile used to build the binary package.  The information in the table above (along with the control file reference at the end of this document) should be sufficient to generate the files mentioned so far aside from debian/rules, so we will focus attention on that.  
     12 * '''`debian/rules`''': The executable makefile used to build the binary package.  See [wiki:Rules]. 
    1414N.B. The control file can be generated from the file with the following invocation, from within the package's root directory: 
    1616While that looks complicated, all it does is set a variable to 'yes', and then run `debian/rules` (remember, it's executable) with the argument: `debian/control`. 
    18 == The `rules` file == 
    20 The `rules` file is written in `make`.  See [[CaffeinatedMake]] for a brief overview. 
    22 With CDBS, a simple package whose build system is based on autotools but where autoconf, automake, libtool, and aclocal should not be regenerated will probably look something like the following: 
    24 {{{ 
    25 #!/usr/bin/make -f 
    27 include /usr/share/cdbs/1/rules/ 
    28 include /usr/share/cdbs/1/class/ 
    29 }}} 
    31 For packages that use other build systems, there are rules files in `/usr/share/cdbs/1/class/` for make, python-distutils, ant, and a few others. If you plan to use quilt patches, you’ll want to include `/usr/share/cdbs/1/rules/`. CDBS is primarily controlled through the setting of make variables in the rules file or through the existence of special files in the debian directory. Many changes to flags passed to during the build process can be implemented by just setting a single variable. Many of these variables can also be set on a per-package basis using names like CFLAGS_package. To get a definitive answer, one should inspect the code of or the class file that you are using.  
    33 === Useful makefile variables === 
    35  * DEB_AUTO_UPDATE_DEBIAN_CONTROL: Set this to enabled auto-generation of debian/control from debian/ This option is basically banned in Debian because it apparently causes problems with NMUs, but it can save work. 
    36  * DEB_CONFIGURE_EXTRA_FLAGS ( Any extra flags you want to pass to configure. 
    37  * DEB_MAKE_ENVVARS ( Any environment variables you want to set for make. 
    38  * DEB_MAKE_INVOKE += … ( Pass extra flags to make (note the += here). 
    39  * DEB_MAKE_{BUILD,CLEAN,…}_TARGET ( Control what make targets CDBS uses. Note that make install and make check unless you set their corresponding target variable. 
    40  * DEB_MAKE_CLEAN_TARGET ( Often you want to set this to distclean. 
    41  * CFLAGS,CPPFLAGS,LDFLAGS,… ( Control common compiler and linker flags. 
    42  * DEB_CONFIGURE_EXTRA_FLAGS ( Any extra flags you want to pass to configure. 
    43  * DEB_AUTO_UPDATE_AUTOAUTO = version ( Have autotools component AUTOAUTO-version run at build time. 
    44  * DEB_DH_LINK_ARGS: Create symlinks in your installation (or use a .links file, see below) 
    45  * DEB_DH_debhelper-tool_ARGS: Add flags to any of a number of debhelper tools. 
    4719== Other special files in `debian/` ==