|
6 | 6 |
|
7 | 7 | %define install_dir /opt/xmind-8 |
8 | 8 | %define apps_dir /usr/share/applications |
| 9 | +%define fonts_dir /usr/share/fonts/truetype/xmind |
9 | 10 |
|
10 | 11 | # Disable brp-java-repack-jars which is really slow, and not useful for XMind. |
11 | 12 | %define __jar_repack 0 |
@@ -38,20 +39,25 @@ mkdir -p "%{buildroot}%{apps_dir}" |
38 | 39 | mv "%{downloaded_dir}"/* "%{buildroot}%{install_dir}" # Install the app |
39 | 40 | cp "%{desktop_file}" "%{buildroot}%{apps_dir}" # Install the desktop file |
40 | 41 | chmod +x "%{buildroot}%{install_dir}/start-xmind.sh" # Make the launch script executable |
| 42 | +mkdir -p "%{buildroot}%{fonts_dir}" |
| 43 | +cp "%{buildroot}%{install_dir}/fonts"/* "%{buildroot}%{fonts_dir}" # Install the fonts |
41 | 44 |
|
42 | 45 | # Package the files |
43 | 46 | %files |
44 | 47 | %{install_dir} |
45 | 48 | %{apps_dir}/* # Important! If the '/*' is removed, the apps_dir will be considered as created by XMind, |
46 | 49 | # which is not true and problematic, because removing xmind would delete the folder. |
| 50 | +%{fonts_dir} |
47 | 51 |
|
48 | 52 | %post |
49 | 53 | xdg-mime install --mode system --novendor "%{install_dir}/xmind.xml" # Remove the MIME data |
50 | 54 | xdg-icon-resource install --context mimetypes --size 64 "%{mime_icon}" application-xmind # Remove the file icons |
51 | 55 | xdg-icon-resource install --context mimetypes --size 256 "%{mime_icon_big}" application-xmind # Remove the HD file icon |
52 | 56 | update-desktop-database # Update the MIME database |
| 57 | +fc-cache -f # Update the font cache |
53 | 58 |
|
54 | 59 | %preun |
55 | 60 | xdg-mime uninstall --mode system "%{install_dir}/xmind.xml" # Remove the MIME data |
56 | 61 | xdg-icon-resource uninstall --context mimetypes --size 64 application-xmind # Remove the small file icon |
57 | 62 | xdg-icon-resource uninstall --context mimetypes --size 256 application-xmind # Remove the HD file icon |
| 63 | +rm -rf /usr/share/fonts/truetype/xmind # Remove fonts |
0 commit comments