aboutsummaryrefslogtreecommitdiffstats
path: root/data/icons/Makefile.am
blob: b5bde31e272a66d2c3e2a09b8f971840645538ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
NULL =

public_icons_themes = \
    hicolor \
    HighContrastLargePrint \
    HighContrastLargePrintInverse \
    LowContrastLargePrint \
    $(NULL)

public_icons = \
    hicolor_apps_16x16_gnome-web-browser.png \
    hicolor_apps_22x22_gnome-web-browser.png \
    hicolor_apps_24x24_gnome-web-browser.png \
    hicolor_apps_32x32_gnome-web-browser.png \
    hicolor_apps_scalable_gnome-web-browser.svg \
    HighContrastLargePrint_apps_48x48_gnome-web-browser.png \
    HighContrastLargePrintInverse_apps_48x48_gnome-web-browser.png \
    LowContrastLargePrint_apps_48x48_gnome-web-browser.png \
    $(NULL)

private_icons = \
    hicolor_actions_16x16_bookmark-view.png \
    hicolor_actions_16x16_history-view.png \
    hicolor_actions_16x16_location-entry.png \
    hicolor_actions_22x22_bookmark-view.png \
    hicolor_actions_22x22_history-view.png \
    hicolor_actions_22x22_location-entry.png \
    hicolor_actions_24x24_bookmark-view.png \
    hicolor_actions_24x24_history-view.png \
    hicolor_actions_24x24_location-entry.png \
    hicolor_actions_32x32_bookmark-view.png \
    hicolor_actions_32x32_history-view.png \
    hicolor_actions_32x32_location-entry.png \
    hicolor_actions_32x32_location-entry.svg \
    hicolor_actions_scalable_bookmark-view.svg \
    hicolor_actions_scalable_history-view.svg \
    hicolor_actions_scalable_location-entry.svg \
    hicolor_places_16x16_bookmark-web.png \
    hicolor_places_22x22_bookmark-web.png \
    hicolor_places_24x24_bookmark-web.png \
    hicolor_status_16x16_lock-broken.png \
    hicolor_status_16x16_lock-insecure.png \
    hicolor_status_16x16_lock-secure-checked.png \
    hicolor_status_16x16_lock-secure.png \
    hicolor_status_16x16_popup-hidden.png \
    hicolor_status_22x22_popup-hidden.png \
    hicolor_status_24x24_lock-broken.png \
    hicolor_status_24x24_lock-insecure.png \
    hicolor_status_24x24_lock-secure-checked.png \
    hicolor_status_24x24_lock-secure.png \
    hicolor_status_24x24_popup-hidden.png \
    hicolor_status_32x32_popup-hidden.png \
    hicolor_status_48x48_lock-broken.png \
    hicolor_status_48x48_lock-insecure.png \
    hicolor_status_48x48_lock-secure-checked.png \
    hicolor_status_48x48_lock-secure.png \
    hicolor_status_scalable_popup-hidden.svg \
    $(NULL)

noinst_DATA = \
    hicolor_actions_16x16_history-view.svg \
    hicolor_actions_22x22_history-view.svg \
    hicolor_actions_32x32_bookmark-view.svg \
    hicolor_actions_32x32_history-view.svg \
    hicolor_actions_16x16_bookmark-view.xcf \
    hicolor_actions_22x22_bookmark-view.xcf \
    hicolor_apps_16x16_gnome-web-browser.svg \
    hicolor_apps_22x22_gnome-web-browser.svg \
    hicolor_apps_32x32_gnome-web-browser.svg \
    hicolor_places_16x16_bookmark-web.svg \
    hicolor_places_22x22_bookmark-web.svg \
    hicolor_status_16x16_popup-hidden.xcf \
    hicolor_status_22x22_popup-hidden.xcf \
    hicolor_status_32x32_popup-hidden.svg \
    $(NULL)

EXTRA_DIST = \
    $(public_icons)     \
    $(private_icons)    \
    $(noinst_DATA)      \
    $(NULL)

###############################################################################

gtk_update_icon_cache = gtk-update-icon-cache -f -t

update-icon-cache:
    @-if test -z "$(DESTDIR)"; then \
        echo "Updating Gtk icon cache."; \
        for theme in $(public_icons_themes); do \
            $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \
        done; \
    else \
        echo "*** Icon cache not updated.  After (un)install, run this:"; \
        for theme in $(public_icons_themes); do \
            echo "***   $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \
        done; \
    fi

install-icons:
    for icon in $(public_icons); do \
        THEME=`echo $$icon | cut -d_ -f1`; \
        CONTEXT=`echo $$icon | cut -d_ -f2`; \
        SIZE=`echo $$icon | cut -d_ -f3`; \
        ICONFILE=`echo $$icon | cut -d_ -f4`; \
        mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
        $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
    done; \
    for icon in $(private_icons); do \
        THEME=`echo $$icon | cut -d_ -f1`; \
        CONTEXT=`echo $$icon | cut -d_ -f2`; \
        SIZE=`echo $$icon | cut -d_ -f3`; \
        ICONFILE=`echo $$icon | cut -d_ -f4`; \
        mkdir -p $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
        $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
    done

uninstall-icons:
    -for icon in $(public_icons); do \
        THEME=`echo $$icon | cut -d_ -f1`; \
        CONTEXT=`echo $$icon | cut -d_ -f2`; \
        SIZE=`echo $$icon | cut -d_ -f3`; \
        ICONFILE=`echo $$icon | cut -d_ -f4`; \
        rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
    done; \
    for icon in $(private_icons); do \
        THEME=`echo $$icon | cut -d_ -f1`; \
        CONTEXT=`echo $$icon | cut -d_ -f2`; \
        SIZE=`echo $$icon | cut -d_ -f3`; \
        ICONFILE=`echo $$icon | cut -d_ -f4`; \
        rm -f $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
    done

install-data-local: install-icons update-icon-cache

uninstall-local: uninstall-icons update-icon-cache