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