Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating .deb packages from prebuilt binaries?

I would like to create a Debian/Ubuntu .deb package from a set of prebuilt binaries. I don't have any access to the source code. The only tutorials I've found on creating debs require source code access, and so do all the convenient and easy tools for creating Debian packages.

So how can I create a deb from a folder of binaries?

like image 497
Jonathan Prior Avatar asked Oct 18 '09 14:10

Jonathan Prior


People also ask

Is Debian a binary package?

A Debian package is a file that ends in . deb and contains software for your Debian system. A . deb is also known as a binary package.

What tool should you use to install a .deb package file?

Install deb Files Using the GDebi Package Installer GDebi is a simple tool for installing local deb packages. Apart from installing the specified file, it also identifies all the required dependencies and automatically downloads and installs them using apt. Now you can use GDebi for installing deb packages.


3 Answers

1) you need to know where to put those binaries: in /usr/bin?

2) Then, you need you create yourself a temp directory for packaging e.g. /tmp/package

3) You need to write yourself DEBIAN control files e.g. control, postrm, preinst etc.

4) You put those DEBIAN control files in /tmp/package/DEBIAN

5) You run 'dpkg-deb'

This is just a quick overview; some steps are missing. Have a look at how I do this with my makefiles here under /trunk/project.

This should get you started anyhow. Hope this helps.

like image 69
jldupont Avatar answered Nov 06 '22 00:11

jldupont


I've found fpm to be very useful for creating binary .deb packages.

like image 40
ashkulz Avatar answered Nov 05 '22 23:11

ashkulz


you should have a look here (part 4 and 6 for basic stuffs)

like image 1
chub Avatar answered Nov 05 '22 23:11

chub