-
Notifications
You must be signed in to change notification settings - Fork 1
OpenIccDirectoryProposal
Revision History | |||
---|---|---|---|
Revision 0.1 | 2007-09-17 | Kai-Uwe Behrmann | A write down of OpenICC email discussions. |
Revision 0.1.1 | 2007-09-27 | Kai-Uwe Behrmann | hint at xdg about ~/.config and XDG variables |
Revision 0.1.2 | 2007-10-17 | Kai-Uwe Behrmann | hint from bug#77 freestandards.org |
Revision 0.1.3 | 2007-10-17 | Stanislav Brabec | clear about XDG variable scope |
Revision 0.1.4 | 2007-11-14 | Kai-Uwe Behrmann | slightly modified formulations |
Revision 0.1.5 | 2007-12-19 | Kai-Uwe Behrmann | coexisting XDG and CMS paths, add XDG_CONFIG_PATH, Installation |
Revision 0.1.6 | 2008-04-22 | Kai-Uwe Behrmann | clarify about faculty to use subdirectories |
Revision 0.1.7 | 2008-05-17 | Kai-Uwe Behrmann | remove cmms configuration paths |
Revision 0.1.8 | 2008-06-04 | Kai-Uwe Behrmann | remove "Subdirectory naming rules" subsection from "Colour Profile Paths" |
Revision 0.2 | 2010-05-30 | Richard Hughes, Kai-Uwe Behrmann | add /var/lib/color for local machine data |
ICC profiles and characterisation data, settings and registration files need a proper place in the directory hierarchy. This proposal describes common practise and new suggestions.
Each directory contains a substructure to hold different data. The naming should provide a hint what it contains.
The proposal is primarily suggested for Unix alike systems, such as the BSD's and Linux.
Systems like osX and Solaris will probably provide different places or means to register ICC profiles and settings. A programming interface, like the path API's in Oyranos, should cover these specific cases.
A top Users colour path should be located in:
$XDG_CONFIG_HOME/color and
$HOME/.config/color for a top directory to store human readable configuration files in its subdirectories.
$XDG_DATA_HOME/color and
$HOME/.local/share/color shall be used as a top directory to store data files in it's subdirectories like ICC profiles.
For the XDG* variables see [1].
$HOME/.color can be considered deprecated and should fade out.
As system wide installation paths exist the XDG_DATA_DIRS and XDG_CONFIG_DIRS variables, which itself can contain several directory entries:
$XDG_DATA_DIRS[0]/color, $XDG_DATA_DIRS[1]/color and so on, plus
three system paths, due to different system directory layouts, exist and should always be searched for:
/usr/local/share/color
,
/usr/share/color
and
/val/lib/color as typical for Linux packages.
These above paths are considered top level entry points and should contain almost no files. Each specific data path, containing the actual data, is each located below these general OpenICC paths.
Typical colour configuration data is architecture independent. The configuration can therefore stay in one place as further described below. Architecture dependent CMM modules and utilities should reside below the usual system paths for libraries and binary executables. They are here not described in detail.
The colour management systems should provide various locations for storing common place colour profiles. The directory name is
icc/
The directory expands then for the /usr/share/color case to /usr/share/color/icc. Put then the ICC profiles into this or below /usr/share/color/icc. /usr/share/color should contain only directories and no ICC profiles. The icc subdirectory should be scanned recursively, to allow some future features.
So far, installing in a flat hierarchy is ok.
Profiles may be grouped by different purposes. Therefor some directory names are reserved for future expansion. Candidates are mentioned below:
'editing' 'device' 'camera' 'scanner' 'monitor' 'printer' 'output' 'input' 'abstract' 'named_color_list' 'colorspace' 'file' 'standard'
The above names are not yet in use. Don not rely on them, just avoid using. They can be activated easily after further discussion at the OpenICC email list.
Settings may contain presets of single settings. The location is at:
settings/
Binary blobs should be preferedly go the _DATA_ and clear text ones the _CONFIG_ route.
It is recommended to ask for the XDG variables befor installing globaly visible data on a system.
In contrary to create packages with static file locations, like RPM, use the provided static paths only.
For ICC profiles this would be:
- /usr/local/share/color/icc
- /usr/share/color/icc
- /var/lib/color/icc
- ~/.local/share/icc
The profile paths exist on system level in the file hierarchy.
For the XDG variables see [1].
Linking is allowed, as long as the system supports this, only inside the a OpenICC top entry path. So it is allowed to set a link from a special profile file name to a more general one.
XYZ.icc => VENDOR/Vendor_XYZ.icc
It's not required and not recommended that a file outside a single top OpenICC path can be reached.
!XYZ.icc => /etc/XYZ.icc! or !/usr/local/share/color/icc/XYZ.icc => ../../../../share/color/icc/XYZ.icc!
The presented concepts where discussed on the OpenICC email list at fd.o, or reached this document by a bug entry comment [2].
[1] XDG Environment variables specification
The /var/lib/color path is required to store system wide local machine data by a administrator. /usr/share/color is not suitable for machine specific data, as this may be shared between different computers or mounted read only.