Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tutorial/Guide to create a classic, small Linux application in a package (Debian)

I've made a small script in my machine, and an alias in .bashrc that calls it. It's a bash script with 3 lines, but it can grow.

Now, some people in my team found it useful, and want to use it.

Instead of saying "copy this alias, do this, do that, install that lib" I was thinking about creating a simple package to be a little more professional. Fact is, I've never done something like this before. And the problem to me is not creating a package, is trying to decide what usually do you put in a package.

Suppose I want to take my script, and create myapplication. I want to create a .deb file that my team would install and:

  • Have a /usr/bin/myapplication or /usr/sbin/myapplication (what's the difference between them?), so they would just call myapplication at their terminal and it would work;
  • Have a man page; (Where are usually located man pages in a debian system?);
  • Have a possibility to read a .myapplicationrc in home folder with some configurations;
  • Have an entry for shortcuts in a gnome installation (is it possible to have an universal shortcut "format" that's is available to KDE and Gnome as well?);
  • Install dependencies.

I'm new to all that stuff. I usually code simple scripts and create an alias in my bashrc. I've never done a package before. Which guides do you know of that can help me accomplish what I thinking of above?

like image 871
Somebody still uses you MS-DOS Avatar asked Aug 05 '26 22:08

Somebody still uses you MS-DOS


1 Answers

Here is a place to start, though I welcome a more succinct answer.

like image 172
Rooke Avatar answered Aug 07 '26 12:08

Rooke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!