0

I would like to build an existing Ubuntu package (let's say the firefox package for example), but instead of using the Ubuntu version of the Firefox source code, I want to use a compiled Firefox binaries provided from the Firefox website. How can I do this? I'm experienced with building and compiling applications from source code, but I'm pretty unfamiliar with packaging them into a .deb.

I saw this answer for a similar question, and thought I would try my hand at it, but I'm curious if the answer is relevant to my use case.

wheeler
  • 2,823
  • 3
  • 27
  • 43

1 Answers1

0

In the trivial case, the package just needs to install the binaries in the correct place. There is no requirement for the packaging logic to compile anything, though most tutorials you find will assume you want to. Maybe look at how some script packages are structured, like various tools written in Perl, Ruby, shell script, or Python.

equivs comes to mind as particularly simple example (though it has some oddities), but also as a simple tool which will allow you to easily build a package whose sole task is to drop a few already-built binaries in /usr/bin and /usr/lib. (It is written in Perl, and the entire package consists of a couple of scripts and some data files.)

tripleee
  • 175,061
  • 34
  • 275
  • 318
  • So far, the overarching theme for most (if not all) of the documentation and tutorials I have read thus far is precisely that: most advanced use cases for a .deb could be solved with the trivial case. I guess the reason for my question was rooted in a search for an existing solution or best practice (if one exists) that is specific for the Ubuntu packages. Solving my problem seems easy enough if I just apply the trivial case as a solution, but I wanted to try to solve it with a similar pattern that the official `firefox` package uses, which seemed like a little bit beyond the trivial case. – wheeler May 17 '18 at 18:46
  • I don't remember exactly what the Firefox source package looks like, but I imagine that if you remove the build part, not much will remain which isn't closer to the trivial case. On the other hand, understanding all the intricacies of the official Firefox package is probably too broad for Stack Overflow. – tripleee May 17 '18 at 19:09