I'm creating a Linux version of a Windows program and among other tasks, I need to create a package to allow users to install the software easily.
In Windows, the program has some files in the following folders:
- Program files: c:\Program Files\company_name\my_app
- Program data: c:\ProgramData\company_name\my_app
- User content: c:\Users\TheUserName\Documents\company_name\my_app
In Linux, I know that User-related content should be placed in "/home/TheUserName/Documents/company_name/my_app" But I don't know exactly where to place "Program files" and "Program data": /usr/share, /usr/bin, /var, /etc/...?
What is the most appropriate location to place the files? Should I copy the binary files to the specific folder or should I create a folder for the program?
There are also some shared SO libraries, so should I copy them to /usr/lib? /usr/share? To any other location?
Finally, I would mainly work with Debian or Ubuntu distributions, so what do you recommend, a DEB, a flatpack package or something else?
I hope anyone can help with this. Any clue, document, guide, etc will be much appreciated.
.debpackage) all of the files should go into system locations. The Debian packaging documentation has all the details (maybe start at wiki.debian.org/Packaging) but in brief, the binary would go in/usr/bin/my_app, binary library files in/usr/lib, and the data in/usr/share/lib/my-appor some such.debhelperetc and you don't even have to know very much about this./usr/binin order to be available on thePATHfor all users. Some nontrivial packages might install their files somewhere else and then just install symlinks to the executables in/usr/bin