| 1 |
# Copyright © 2019 Christian Persch |
| 2 |
# |
| 3 |
# This programme is free software; you can redistribute it and/or modify it |
| 4 |
# under the terms of the GNU General Public License as published by |
| 5 |
# the Free Software Foundation; either version 3 of the License, or (at your |
| 6 |
# option) any later version. |
| 7 |
# |
| 8 |
# This programme is distributed in the hope that it will be useful, but |
| 9 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 11 |
# See the GNU General Public License for more details. |
| 12 |
# |
| 13 |
# You should have received a copy of the GNU General Public License |
| 14 |
# along with this programme. If not, see <https://www.gnu.org/licenses/>. |
| 15 |
|
| 16 |
public_icons_themes = [ |
| 17 |
'hicolor', |
| 18 |
] |
| 19 |
|
| 20 |
public_icons_sources = [ |
| 21 |
'hicolor_apps_16x16_gnome-aisleriot.png', |
| 22 |
'hicolor_apps_16x16_gnome-freecell.png', |
| 23 |
'hicolor_apps_22x22_gnome-aisleriot.png', |
| 24 |
'hicolor_apps_22x22_gnome-freecell.png', |
| 25 |
'hicolor_apps_24x24_gnome-aisleriot.png', |
| 26 |
'hicolor_apps_24x24_gnome-freecell.png', |
| 27 |
'hicolor_apps_256x256_gnome-aisleriot.png', |
| 28 |
'hicolor_apps_256x256_gnome-freecell.png', |
| 29 |
'hicolor_apps_32x32_gnome-aisleriot.png', |
| 30 |
'hicolor_apps_32x32_gnome-freecell.png', |
| 31 |
'hicolor_apps_48x48_gnome-aisleriot.png', |
| 32 |
'hicolor_apps_48x48_gnome-freecell.png', |
| 33 |
'hicolor_apps_symbolic_gnome-aisleriot-symbolic.svg', |
| 34 |
] |
| 35 |
|
| 36 |
private_icons_sources = [ |
| 37 |
'hicolor_actions_16x16_cards-deal.png', |
| 38 |
'hicolor_actions_22x22_cards-deal.png', |
| 39 |
'hicolor_actions_24x24_cards-deal.png', |
| 40 |
'hicolor_actions_32x32_cards-deal.png', |
| 41 |
'hicolor_actions_48x48_cards-deal.png', |
| 42 |
'hicolor_actions_scalable_cards-deal.svg', |
| 43 |
] |
| 44 |
|
| 45 |
public_icons_renames = [] |
| 46 |
private_icons_renames = [] |
| 47 |
|
| 48 |
foreach icon : public_icons_sources |
| 49 |
components = icon.split('_') |
| 50 |
public_icons_renames += components[0] / components[2] / components[1] / components[3] |
| 51 |
endforeach |
| 52 |
|
| 53 |
foreach icon : private_icons_sources |
| 54 |
components = icon.split('_') |
| 55 |
private_icons_renames += components[0] / components[2] / components[1] / components[3] |
| 56 |
endforeach |
| 57 |
|
| 58 |
icondir = ar_datadir / 'icons' |
| 59 |
pkgicondir = ar_pkgdatadir / 'icons' |
| 60 |
|
| 61 |
install_data( |
| 62 |
sources: public_icons_sources, |
| 63 |
rename: public_icons_renames, |
| 64 |
install_dir: icondir, |
| 65 |
) |
| 66 |
|
| 67 |
install_data( |
| 68 |
sources: private_icons_sources, |
| 69 |
rename: private_icons_renames, |
| 70 |
install_dir: pkgicondir, |
| 71 |
) |
| 72 |
|
| 73 |
foreach theme : public_icons_themes |
| 74 |
meson.add_install_script( |
| 75 |
'meson_updateiconcache.py', |
| 76 |
icondir / theme, |
| 77 |
) |
| 78 |
endforeach |