2

I am trying to create a program, let's call it abcd like http://linux.die.net/man/6/fortune that can simply be installed like $ sudo apt-get install abcd. Now for the specifics, my program simply is fetching data from and API and printing it.

The API is already built. I can write a script in any language viable to access the API, extract data and print it.

Now, I want my script to function as follows. Anyone who wishes to install it should do sudo apt-get install abcd. After this, the user only has to type in $ abcd in the shell and the output will appear. Also, it can accept 3-4 parameters like $ abcd -typeA which will print different data.

What is the process to create such a program and get it up and running?

I am new to linux. I really want this done. Thanks for help in advance.

tsaebeht
  • 121
  • To have it available in the default software repositorites, you'd have to package your application as described in the Ubuntu Packaging Guide: http://packaging.ubuntu.com/html/ and then submit it for consideration for inclusion in the Ubuntu or Debian software repos. An easier way would be to create your own PPA (Personal Package Archive) on launchpad.net, which would allow you to have direct control over your software repository without the "gatekeepers" of Ubuntu's main software repositories. – Nick Weinberg Jul 07 '16 at 14:38

1 Answers1

4

You need to learn how to package your program (no matter whether it's a script or binary executable) in the .deb format.

Then you can sign up to Launchpad and create a PPA (personal package archive) where you can upload the package.

Users may then add your PPA to their software sources (sudo add-apt-repository ppa:USERNAME/PPANAME && sudo apt-get update) and install it (sudo apt-get install abcd) afterwards.

To allow direct installation without having to add a PPA first, your package would have to be added to Canonical's official Ubuntu repositories, but that this is a rather long process which is probably not worth the effort in your case.


Useful links:

Packaging:

Creating a PPA:

Official repositories:

Byte Commander
  • 107,489