How do I publish my library to a linux repository?

Asked

Viewed 62 times

3

I have developed a C library and I want to make it available to other developers. I wish this library could be installed using the command apt-get, for example:

sudo apt-get install minhalib

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

#include <minhalib.h>

and compile linking the library:

gcc -o main.c -lminhalib main


How do I make the library available in this way?

1 answer

1

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

This is a really vast subject - just the Wikipedia page about software automation systems (ptbr)is quite old. As expected, each has its own pros and cons.

But to cut your search short, I would give three recommendations: Waf, Meson and cmake. They are versatile and easy to learn, and major distributions and software installation channels have good support. The Waf I would recommend for small projects, and the Cmake for larger ones. (The GNU Autotools are famous and widely used, but I find them too complicated. I do not recommend.)

After that, well, you can already open an account on Github, Gitlab, Sourceforge, Bitbucket or whatever, and release your software to the world! (Here’s when you’ll think about what furlough choose...).

P.S.: As for the 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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.