-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Currently you install everything under $(PREFIX)/viewtouch/. This isn't how software is installed on unix-like systems. About every package there is installs binaries into $(PREFIX)/bin, data into $(PREFIX)/share/{name}. These two are read-only. The writable data can't go under $(PREFIX), it normally goes either into /var/db/{name}/, or is written into the home directory, or is written into some specifically designated, separate directory.
The above discrepancy is why no linux distros created a package for ViewTouch - it doesn't fit the way how they do things.
Here's what you can do to adjust:
- Expose the variable VIEWTOUCH_INSTALL_PATH as a cmake option, have "/usr/viewtouch" as a default. Install all read-only files under it, with data going into ${VIEWTOUCH_INSTALL_PATH}/share/ViewTouch, and executables - into ${VIEWTOUCH_INSTALL_PATH}/bin,
- Expose the variable
VIEWTOUCH_DB_PATHfor writable files. Keep the default of "/usr/viewtouch/dat", but this would allow people to set it to "/var/db/ViewTouch", for example. - It writes into bin/.vtpos_command, this also should go under the writeable directory VIEWTOUCH_DB_PATH, etc.
- Ideally, you could also have a variable
USE_HOME_DIR_FOR_DB, in which case it would just write the DB into a home directory.
If you make alterations that I am suggesting in the above instructions, it would be possible to install it into a single directory, like before, and in a way how unix-like systems install software.
I've ported ViewTouch, but encountered these discrepancies that prevent me from creating a port at this point.