Changes between Version 2 and Version 3 of HowtoCDBS


Ignore:
Timestamp:
Jun 12, 2009, 4:39:39 AM (15 years ago)
Author:
Thanatermesis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowtoCDBS

    v2 v3  
    1515On this example we will create a debian package for '''enna''', first of all, create the directory ''debian'' (if is already created and has files mean that is already ready for create debian packages, or supposed to... in any case, if is created, just remove it in order to follow this howto).
    1616
    17 On it you need to have 2 files, '''control.in''' and '''rules''', the control.in file has the description of the package, we can fill up with something like:
     17On it, you need to have 2 files, '''control.in''' and '''rules'''
     18
     19In the '''debian/control.in''' file has the description of the package, we can fill up with something like:
    1820{{{
    1921Source: enna
     
    3234The first block is for the source packages (so that you can ''apt-get source enna'' in the future in order to recompile it), it also contains the information about which dependencies you need to have in order to compile it. The second block is for the binary end package.
    3335
    34 About the rules file, you need to fill up with something like:
     36In the '''debian/rules''' file, you need to fill up with something like:
    3537{{{
    3638#!/usr/bin/make -f
     
    4446}}}
    4547
    46 The first line means that the control file will be updated automatically (it was really needed to explain this point ? anyways...), the next lines means which pieces of cdbs we want to have, like a dependency, if we don't include them, we don't have its support, like, debhelper contains all the needed things for build the package, autotools contains the needed things for compile a simple C/C++ program that has its makefiles structure and such... so, the basic needed ones. The final line includes the option of compilation
     48The first line means that the control file will be updated automatically (it was really needed to explain this point ? anyways...), the next lines means which pieces of cdbs we want to have, like a dependency, if we don't include them, we don't have its support, like, debhelper contains all the needed things for build the package, autotools contains the needed things for compile a simple C/C++ program that has its makefiles structure and such... so, the basic needed ones. The final line includes the option of compilation.
     49
     50'''Note''': You need to made the rules file executable, so run: '''chmod +x debian/rules'''
    4751
    4852You are almost ready, altough these are the only ''real'' needed files, you need a few last tricks... but they are almost automatic:
    4953
    50 You need the '''changelog''' file, since we are lazy, we use the tool '''debchange''' to create/update it, see that there's a warning saying that there's no any changelog found and so on we need to use the option '''---create''' for create a new one
     54You need the '''changelog''' file, since we are lazy, we use the tool '''debchange''' to create/update it, see that there's a warning saying that there's no any changelog found and so on we need to use the option '''---create''' for create a new one, so, from the directory of the source code (out of the ''debian'' dir), run: '''debchange --create'''
    5155
    52 Also, you need the ''real'' control file, control.in is a kind of base, for generate the ''real'' control file we just run '''debian/rules clean''' and we have it :)
     56Also, you need the ''real'' control file, control.in is a kind of base, for generate the ''real'' control file we just run '''fakeroot debian/rules clean''' and we have it :)
    5357
    5458Your ''debian'' directory is ready, you can add a lot more of options and tricks for your package but for that, just follow the official documentation at /usr/share/doc/cdbs, im not going to write all the features because im lazy too :)
     
    5761== Time to build the package ! ==
    5862
     63Since we are a user and no root, some commands needs to be prepend with the command '''fakeroot''':
     64
    5965Before to compile you need to see if you have all the dependencies for the compilation, for that, just run the command '''dpkg-checkbuilddeps'''
    6066
    61 When you have installed all the needed dependencies, run the command '''dpkg-buildpackage'''
     67When you have installed all the needed dependencies, run the command '''fakeroot dpkg-buildpackage'''
    6268
    6369You have it !
     
    6975You are free to edit this document in order to fix any thing, making it better, or to add a few nice tricks to know, for that just fill up a collaborator thingy at http://www.elivecd.org/Help/Collaborate
    7076
    71 This Howto is tested step by step on a clean Elive system, live mode, version (1.9.29), the package builds without problems :D
     77You can see some nice and small examples of CDBS in the EFL svn, for example in evas, it use it for build the packages (at least to the date of today)
     78
     79This Howto is tested step by step on a clean Elive system, live mode, version (1.9.29), the package builds without problems :)