How to publish my library to a linux repository?

3

I've developed a C library and want to make it available to other developers. I would like this library to be installed using the apt-get command, for example:

sudo apt-get install minhalib

and in the code the developers would include the headers ...

#include <minhalib.h>

and would compile linking to the library:

gcc -o main.c -lminhalib main

How do I make the library available in this way?

    
asked by anonymous 23.05.2018 / 05:29

1 answer

1

What you need then is a software automation system . There are several ways this can be done, but I have never dealt with any of them seriously, hehe!

This is a really vast subject - just the Wikipedia page on software automation systems () is already a very big one. As you might expect, each one has its pros and cons.

But to shorten your search, I'd give you two recommendations: waf and cmake . They are versatile and easy to learn, and the major distributions and software installation channels are well supported. Waf I would recommend for small projects, and Cmake for the larger ones. ( GNU Autotools are famous and widely used, but I find them too complicated.)

After that, well, you can already open an account at Github , Gitlab , Sourceforge , Bitbucket or whatever, and Release your software to the world! (Here's the time you'll think of license to choose ...).

Q.: As for apt-get , this is specifically a package installation command. Each distribution handles this in its own way. Because of this, I would recommend leaving this package creation to the developers of each distro.

    
23.09.2018 / 02:44