Changes between Version 2 and Version 3 of HowtoCDBS
- Timestamp:
- Jun 12, 2009, 4:39:39 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowtoCDBS
v2 v3 15 15 On 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). 16 16 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: 17 On it, you need to have 2 files, '''control.in''' and '''rules''' 18 19 In the '''debian/control.in''' file has the description of the package, we can fill up with something like: 18 20 {{{ 19 21 Source: enna … … 32 34 The 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. 33 35 34 About the rulesfile, you need to fill up with something like:36 In the '''debian/rules''' file, you need to fill up with something like: 35 37 {{{ 36 38 #!/usr/bin/make -f … … 44 46 }}} 45 47 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 48 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. 49 50 '''Note''': You need to made the rules file executable, so run: '''chmod +x debian/rules''' 47 51 48 52 You are almost ready, altough these are the only ''real'' needed files, you need a few last tricks... but they are almost automatic: 49 53 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 54 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, so, from the directory of the source code (out of the ''debian'' dir), run: '''debchange --create''' 51 55 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 :)56 Also, 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 :) 53 57 54 58 Your ''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 :) … … 57 61 == Time to build the package ! == 58 62 63 Since we are a user and no root, some commands needs to be prepend with the command '''fakeroot''': 64 59 65 Before to compile you need to see if you have all the dependencies for the compilation, for that, just run the command '''dpkg-checkbuilddeps''' 60 66 61 When you have installed all the needed dependencies, run the command ''' dpkg-buildpackage'''67 When you have installed all the needed dependencies, run the command '''fakeroot dpkg-buildpackage''' 62 68 63 69 You have it ! … … 69 75 You 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 70 76 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 77 You 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 79 This Howto is tested step by step on a clean Elive system, live mode, version (1.9.29), the package builds without problems :)