Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to package a Linux binary for my Open Source application?

I have an Open Source app and I currently only post the binary for the Windows build. At this point Linux users have to get the source and compile it. Is there a standard way for posting a Linux binary?

My app is in c / c++ and compiled with gcc, the only external Linux code I use is X Windows and CUPS.

like image 609
KPexEA Avatar asked Sep 24 '08 22:09

KPexEA


People also ask

What is a Linux binary package?

What is a binary package? A binary package in a linux context is an application package which contains (pre-built) executables, as opposed to source code. Note that this does not mean a package file is itself an executable.

How do I distribute an application in Linux?

You can distribute your program for Linux just as you would for Windows, by shipping your compiled code with any resources it will use. You don't need to include the source (unless your product is derived from GPL code). Just build without symbols and distribute the binaries.

What is Linux binary installation?

By Jithin on March 4th, 2017. Binaries are files that contain compiled source code (or machine code). Binary files are the files which contain compiled source code (or machine code). They are also called executable files because they can be executed on the computer.


5 Answers

The most common way would be to package it in a .rpm file for RedHat-based distros like Fedora, or a .deb file for Debian-based distros like Ubuntu.

like image 182
PiedPiper Avatar answered Nov 14 '22 22:11

PiedPiper


Find someone skilled with Debian and get their help to set up a build process to build .deb packages for Debian and Ubuntu.

like image 35
Dan Udey Avatar answered Nov 14 '22 23:11

Dan Udey


Of course: take a look at this tutorial from IBM. Its only for RPMs, but it at least would get you going. DEB files are similar - see this tutorial.

Basically, once you've built your binaries, you write a control file describing what files the package ships, and where it puts them. Then you build everything into a package using the packaging tools. Its a lot like Windows where you write an installer file, then run it through Wix or Intellishield or whatever to create a .msi file.

like image 40
gbjbaanb Avatar answered Nov 14 '22 22:11

gbjbaanb


Don't hesitate to file a Request For Package (RFP) bug on Debian's bug tracking system. A debian developer may be interested by your software and package it.

http://www.debian.org/Bugs/Reporting

like image 30
Nowhere man Avatar answered Nov 15 '22 00:11

Nowhere man


You could provide the packages yourself, but that's not the ideal way to distribute your application. Users won't be able to find your software in their distribution's package repository and will have to hit your website to download the latest version.

IMO the best thing to do is solicit the help of package maintainers for the distributions of your choice. Get one of them who is interested in your application to adopt it and bring it in to the distro, then they can take care of the distro-specific details of packaging it.

Your role will be to assist them as much as possible in getting your software to build on their platform and work out any bugs related to interactions with other package versions, etc.

like image 28
Kamil Kisiel Avatar answered Nov 14 '22 22:11

Kamil Kisiel