Bump gEDA version
[geda-gaf.git] / gschem / data / Makefile.am
blobb5859be7ee0f02d9ed41109b4edb03c967af6d1c
1 theme=hicolor
3 # --------------------------------------------------------------------
4 # These icons get installed to a gEDA-specific icons
5 # directory. They're used within gschem.
6 icondir = $(GEDADATADIR)/icons/$(theme)
7 iconsvg = gschem-icons.svg
9 action_icons = \
10         insert-box \
11         insert-line \
12         insert-circle \
13         insert-arc \
14         insert-path \
15         insert-symbol \
16         insert-net \
17         insert-bus \
18         insert-pin \
19         insert-attribute \
20         insert-text \
21         select \
22         symbol-datasheet \
23         attribute-attach \
24         attribute-detach \
25         attribute-show-value \
26         attribute-show-name \
27         attribute-show-both \
28         clone \
29         multi-clone \
30         deselect
32 action_icon_files = \
33         $(action_icons:%=%-16.png) \
34         insert-symbol-22.png \
35         insert-net-22.png \
36         insert-bus-22.png \
37         insert-text-22.png \
38         select-22.png
40 regen-svg-icons: $(iconsvg)
41         if test -x "`which inkscape`"; then \
42           for f in $(action_icon_files); do \
43             id=`echo $$f | sed -e's:.png::'`; \
44             size=`echo $$id | sed -e's:.*-::'`; \
45             inkscape --export-id=$$id \
46                      --export-png=$$id.out \
47                      $(srcdir)/$(iconsvg) | tee $$id.log; \
48             if grep "exported to $${size} x $${size} pixels" $$id.log >/dev/null; then \
49               mv $$id.out $(srcdir)/$$f; \
50             else \
51               echo "*** ERROR: Exported pixmap has wrong size ***" >&2; \
52             fi; \
53             rm $$id.log; \
54           done; \
55         fi
57 icons = \
58         $(action_icon_files:%=actions,%)
60 # --------------------------------------------------------------------
61 # The application icon gets installed to the system icons
62 # directory. It's used by e.g. the desktop environment to make buttons
63 # that launch gEDA look nice.
64 themedir=$(xdgdatadir)/icons/$(theme)
66 app_icon = geda-gschem
68 app_icon_files = \
69         $(app_icon:%=%-48.png) \
70         $(app_icon:%=%.svg)
71 #       $(app_icon:%=%-16.png)
72 #       $(app_icon:%=%-22.png)
73 #       $(app_icon:%=%-24.png)
74 #       $(app_icon:%=%-32.png)
77 theme_icons = \
78         $(app_icon_files:%=apps,%)
80 # --------------------------------------------------------------------
81 # We also install a .desktop file.
82 xdgdatadir=@XDGDATADIR@
84 desktopdir=$(xdgdatadir)/applications
85 desktop_in_files = geda-gschem.desktop.in
86 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
88 DOMAIN=geda-gschem
90 @DESKTOP_I18N_LANGS_RULE@
91 @DESKTOP_I18N_DESKTOP_RULE@
93 metainfodir = $(datadir)/metainfo
94 dist_metainfo_DATA = geda-gschem.metainfo.xml
96 # --------------------------------------------------------------------
97 # Special rules for installing icon files
98 install_icons_exec = \
99         $(ICON_THEME_INSTALLER) \
100         -t $(theme) \
101         -s $(srcdir) \
102         -d "x$(DESTDIR)" \
103         -b $(icondir) \
104         -m "$(mkinstalldirs)" \
105         -x "$(INSTALL_DATA)"
106 install_theme_icons_exec = \
107         $(ICON_THEME_INSTALLER) \
108         -t $(theme) \
109         -s $(srcdir) \
110         -d "x$(DESTDIR)" \
111         -b $(themedir) \
112         -m "$(mkinstalldirs)" \
113         -x "$(INSTALL_DATA)"
115 install-data-local:
116         $(install_icons_exec) -i $(icons)
117         $(install_theme_icons_exec) -i $(theme_icons)
120 install-data-hook:
121 if ENABLE_UPDATE_XDG_DATABASE
122         $(UPDATE_DESKTOP_DATABASE) "$(DESTDIR)$(desktopdir)"
123 endif
125 uninstall-hook:
126 if ENABLE_UPDATE_XDG_DATABASE
127         $(UPDATE_DESKTOP_DATABASE) "$(DESTDIR)$(desktopdir)"
128 endif
129         $(install_icons_exec) -u $(icons)
130         $(install_theme_icons_exec) -u $(theme_icons)
132 MAINTAINERCLEANFILES = *.log core FILE *~ Makefile.in
133 DISTCLEANFILES = $(desktop_DATA)
134 EXTRA_DIST = $(iconsvg) $(action_icon_files) \
135              $(app_icon_files) \
136              $(desktop_in_files) $(desktop_DATA)