| 1 |
|
| 2 |
icon-naming-utils is a script for maintaining backwards compatibility with |
| 3 |
current desktop icon themes, while migrating to the names specified in the |
| 4 |
Icon Naming Specification [1]. |
| 5 |
|
| 6 |
The recommended method for using icon-naming-utils is via the Makefile |
| 7 |
scripts used to build a project. An example of how to do this, in an |
| 8 |
automake-parsed Makefile.am, is shown below: |
| 9 |
|
| 10 |
size = 32x32 |
| 11 |
context = actions |
| 12 |
|
| 13 |
iconsdir = $(themedir)/$(size)/$(context) |
| 14 |
|
| 15 |
install-data-local: install-iconsDATA |
| 16 |
(cd $(DESTDIR)$(themedir)/$(size) && $(ICONMAP) -c $(context)) |
| 17 |
|
| 18 |
|
| 19 |
And in configure.{in,ac} you should have: |
| 20 |
|
| 21 |
# Define the toplevel path here |
| 22 |
AC_SUBST(themedir, "\${datadir}/icons/Theme") |
| 23 |
|
| 24 |
UTILS_REQUIRED=0.8.2 |
| 25 |
|
| 26 |
AC_MSG_CHECKING([icon-naming-utils >= $UTILS_REQUIRED]) |
| 27 |
PKG_CHECK_EXISTS(icon-naming-utils >= $UTILS_REQUIRED, |
| 28 |
have_utils=yes, have_utils=no) |
| 29 |
if test "x$have_utils" = "xyes"; then |
| 30 |
UTILS_PATH="`$PKG_CONFIG --variable=program_path icon-naming-utils`" |
| 31 |
ICONMAP="$UTILS_PATH/icon-name-mapping" |
| 32 |
AC_SUBST(ICONMAP) |
| 33 |
AC_MSG_RESULT([yes]) |
| 34 |
else |
| 35 |
AC_MSG_RESULT([no]) |
| 36 |
AC_MSG_ERROR([icon-naming-utils >= $UTILS_REQUIRED is required to build |
| 37 |
and install tango-icon-theme]) |
| 38 |
fi |
| 39 |
|
| 40 |
In this example, we define $(themedir) to point to the theme's install |
| 41 |
path, and ICONMAP gets defined as the path to the icon-name-mapping script. |
| 42 |
This script is not installed in a normal $(bindir) path, as it is not intended |
| 43 |
to be run by users by hand, but to be called from scripts, such as Makefiles. |
| 44 |
|
| 45 |
[1] http://www.freedesktop.org/wiki/Standards_2ficon_2dnaming_2dspec |