Merge remote-tracking branch 'origin/master' into sheet
[pspp] / src / ui / gui / icons / automake.mk
1 # PSPP - a program for statistical analysis.
2 # Copyright (C) 2017 Free Software Foundation, Inc.
3
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 EXTRA_DIST += $(icons) $(icon_srcs) src/ui/gui/icons/COPYING_CCBYSA3
18
19 include $(top_srcdir)/src/ui/gui/icons/manifest
20
21 themedir = $(DESTDIR)$(datadir)/icons/hicolor
22
23 sizes=16x16 22x22  24x24 32x32 48x48 256x256 scalable
24
25 install-ext-icons:
26         for context in apps mimetypes; do \
27                 for size in $(sizes); do \
28                 $(MKDIR_P) $(themedir)/$$size/$$context ; \
29                         if (cd $(top_srcdir)/src/ui/gui/icons/$$size/$$context && \
30                                 (test ! "`printf '%s %s %s' . .. *`" = '. .. *' || test -f '*')) 2> /dev/null ; then \
31                                 $(INSTALL_DATA) $(top_srcdir)/src/ui/gui/icons/$$size/$$context/* $(themedir)/$$size/$$context ; \
32                         fi ; \
33                 done ; \
34         done
35
36
37 uninstall-ext-icons:
38         for context in apps mimetypes; do \
39                 for size in $(sizes); do \
40                         if (cd $(top_srcdir)/src/ui/gui/icons/$$size/$$context && \
41                                 (test ! "`printf '%s %s %s' . .. *`" = '. .. *' || test -f '*')) 2> /dev/null ; then \
42                                   rm -rf $(themedir)/$$size/$$context/application-x-spss-* ; \
43                                   rm -rf $(themedir)/$$size/$$context/pspp* ; \
44                         fi ; \
45                 done ; \
46         done
47
48
49 install-icons:
50         for context in actions categories ; do \
51           $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/$$context; \
52           for size in $(sizes); do \
53                 if (cd $(top_srcdir)/src/ui/gui/icons/$$context/$$size && \
54                         (test ! "`printf '%s %s %s' . .. *`" = '. .. *' || test -f '*')) 2> /dev/null ; then \
55                         $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/$$context/$$size ; \
56                         $(INSTALL_DATA) $(top_srcdir)/src/ui/gui/icons/$$context/$$size/* $(DESTDIR)$(pkgdatadir)/$$context/$$size ; \
57                 fi ; \
58           done ; \
59         done
60
61
62
63 uninstall-icons:
64         for context in actions categories ; do \
65           for size in $(sizes); do \
66                 if (cd $(top_srcdir)/src/ui/gui/icons/$$context/$$size && \
67                         (test ! "`printf '%s %s %s' . .. *`" = '. .. *' || test -f '*')) 2> /dev/null ; then \
68                         rm -rf $(DESTDIR)$(pkgdatadir)/$$context/$$size ; \
69                 fi ; \
70           done ; \
71         done
72
73
74 INSTALL_DATA_HOOKS += install-icons install-ext-icons
75 UNINSTALL_DATA_HOOKS += uninstall-icons uninstall-ext-icons
76
77 if HAVE_GUI
78 nodist_src_ui_gui_psppire_DATA = src/ui/gui/icons/splash.png
79
80 src/ui/gui/icons/splash.png: $(top_srcdir)/src/ui/gui/icons/splash-t.png $(top_srcdir)/src/ui/gui/icons/splash-r.png Makefile
81         @$(MKDIR_P) src/ui/gui/icons
82         @case `echo $(VERSION) | $(SED) -e 's/[0-9][0-9]*\.[0-9]*\([0-9]\)\.[0-9][0-9]*/\1/'` in \
83           [13579]) cp $(top_srcdir)/src/ui/gui/icons/splash-t.png $@ ; \
84         ;;\
85           *) cp $(top_srcdir)/src/ui/gui/icons/splash-r.png $@ ; \
86         ;;\
87 esac
88
89 EXTRA_DIST += $(top_srcdir)/src/ui/gui/artwork/splash.svg $(icons) $(icon_srcs)
90
91 endif
92