helpdocs:builddebs
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
helpdocs:builddebs [2017/01/14 01:19] – created localadmin | helpdocs:builddebs [2017/01/14 01:24] (current) – [For Modifying a deb file] localadmin | ||
---|---|---|---|
Line 16: | Line 16: | ||
* source: http:// | * source: http:// | ||
+ | ===== When you have source and want to compile it with a more complete method ===== | ||
+ | |||
+ | Make sure you have all dependencies: | ||
+ | < | ||
+ | |||
+ | Extract the source file and cd into it. | ||
+ | Then use dh_make to create the DEBIAN control files. You can also pass the source and your email as parameters | ||
+ | < | ||
+ | |||
+ | You will be presented with some options, choose the most appropriate for your case. | ||
+ | Then edit ./ | ||
+ | |||
+ | Then run the following: (this has to be done as root) | ||
+ | < | ||
+ | |||
+ | Then run dpkg-depcheck to get an analysis of the dependencies | ||
+ | < | ||
+ | |||
+ | Now edit the ./ | ||
+ | With the control file created and filled you can start building the .deb file. | ||
+ | < | ||
+ | |||
+ | * source: http:// | ||
+ | |||
+ | ===== For Modifying a deb file ===== | ||
+ | |||
+ | If you have a deb file and want to modify something in it so it is more compatible with the CS repo, we will need to extract the required files and modify them. | ||
+ | First we extract the elements in the deb file and we place them in a temporary location. | ||
+ | < | ||
+ | |||
+ | Then we are going to pull the control file that is located in the tmp/DEBIAN/ folder. This is where you will make your changes. | ||
+ | < | ||
+ | |||
+ | |||
+ | Now to edit the file | ||
+ | < | ||
+ | |||
+ | Once all changes are done, repackage the deb file. | ||
+ | < | ||
+ | |||
+ | source: http:// | ||
+ | |||
+ | ===== Simple deb file ===== | ||
+ | |||
+ | In the case you require to make a simple deb file there is also a very simple way to do it. | ||
+ | Decide on the name of your package. Standard debian notation is all lowercase in the following format: | ||
+ | < | ||
+ | For example, you could name your first package: " | ||
+ | Create a directory to make your package in. The name should be the same as the package name. | ||
+ | #mkdir helloworld_1.0-1 | ||
+ | |||
+ | Pretend that the packaging directory is actually the root of the file system. Put the files of your program where they would be installed to on a system. | ||
+ | #mkdir helloworld_1.0-1/ | ||
+ | #mkdir helloworld_1.0-1/ | ||
+ | #mkdir helloworld_1.0-1/ | ||
+ | #cp " | ||
+ | |||
+ | Now create a special metadata file with which the package manager will install your program... | ||
+ | #mkdir helloworld_1.0-1/ | ||
+ | #gedit helloworld_1.0-1/ | ||
+ | |||
+ | Create a control file. | ||
+ | < | ||
+ | Package: helloworld | ||
+ | Version: 1.0-1 | ||
+ | Section: base | ||
+ | Priority: optional | ||
+ | Architecture: | ||
+ | Depends: libsomethingorrather (>= 1.2.13), anotherDependency (>= 1.2.6) | ||
+ | Maintainer: Your Name < | ||
+ | Description: | ||
+ | When you need some sunshine, just run this | ||
+ | small program! | ||
+ | (the space before each line in the description is important) | ||
+ | </ | ||
+ | |||
+ | Now you just need to make the package: | ||
+ | Code: | ||
+ | < | ||
+ | |||
+ | source: http:// | ||
+ | |||
+ | Have fun making deb files :) | ||
helpdocs/builddebs.1484378381.txt.gz · Last modified: 2017/01/14 01:19 by localadmin