Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build debian package without .orig file

I've created packages previously by using a Makefile, the command "dh_make --createorig", then adjusting files in the debian folder generated and finally using the debuild command to generate the .deb. That workflow is simple and works for me, but I was told to adjust it a little in a way that you could build the project from the sources without requiring the orig files and I'm unsure how to do it, but according to this (https://askubuntu.com/questions/17508/how-to-have-debian-packaging-generate-two-packages-given-an-upstream-source-arch) and this structure (http://bazaar.launchpad.net/~andrewsomething/imagination/debian/files) there must be a way. In my case I would have a folder with the sources and all of that and then a debian folder (generated with dh_make) but I'm unsure on how to avoid the debuild command to ask for the .orig files or if I should be using some other command for this.

Sorry for the superlong question, I think I provided all the relevant information, but I can clarify if anything is fuzzy.

like image 566
Kreender Avatar asked Feb 09 '23 23:02

Kreender


2 Answers

The difference is in the version number in the file debian/changelog.

If you use 1.2.3-1 it implied Debian build 1 of an upstream package 1.2.3 --- for which the build programs (dpkg-buildpackage and whichever wrappers on top) --- assume an .orig.tar.gz to exists.

But if you use 1.2.3 it will consider the package 'Debian native' and the archive is just a .tar.gz and not an .orig.tar.gz.

Now the choice should not be driven by your convenience alone. If this has an upstream source, use the first scheme. If not, the second can be fine. In the packages I maintain I have both but way more of the former.

like image 102
Dirk Eddelbuettel Avatar answered Feb 12 '23 14:02

Dirk Eddelbuettel


If you want to create a Debian directory directly in the source package (ie you're packaging your own work, rather than from an upstream release) you could use the --native option to dh_make

like image 22
Stephen Avatar answered Feb 12 '23 12:02

Stephen