![]() Note: Make sure you use hard tabs here, since it uses the same format as Makefile #!/usr/bin/make -f ![]() The most basic implementation just passes all calls to the original Makefile created above: This file tells debian specifically how to build your package. Check out the dch man page and the debian changelog policy for more details. Make sure you change UNRELEASED to unstable. This will bring up your $EDITOR and let you edit the fields. To initially create the changelog, type: $ dch -i -create The syntax of this file is tricky, so while you can create this file by hand, it’s recommended to use the debchange tool, or dch. You need a minimum of one entry to build a package. This file tracks all the changes to the package. ![]() Below we have defined a binary package and a corresponding source package (from which the binary package can be repackaged): Source: helloworldĭepends: $ This file describes your package using debian control fields. This is where all of our debian specific packaging files will go. Now that we’ve verified everything works, let’s create a debian package for it: 1. Note: debuild will make use of symlinks in it’s build process, so if you are using a Virtualbox or VMware Shared folder to build your package, it will not work. Remove our test binary before continuing: $ sudo rm -rf /usr/local/bin/helloworld Then, try installing the binary: run sudo make install and now helloworld should be in /usr/local/bin. ![]() You should see “Hi” printed to the screen. This should create a helloworld binary you can execute by running. Let’s make sure everything works before we package it up. Install -m 0755 helloworld /usr/local/bin It consists of the source file main.c: #include Let’s use it to package a simple “helloworld” program. It handles all the packaging linting, and signing for us. On a debian-based system, install the following programs: $ sudo apt-get install devscripts build-essential lintianĭebuild is a convenient wrapper around dpkg-buildpackage, fakeroot, lintian, and debsign. This post will walk you through creating a debian package from a simple hello world C program using debuild. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |