Skip to content

Commit 6861386

Browse files
Install the XMind fonts
1 parent 4277d62 commit 6861386

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

xmind.spec

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
%define install_dir /opt/xmind-8
88
%define apps_dir /usr/share/applications
9+
%define fonts_dir /usr/share/fonts/truetype/xmind
910

1011
# Disable brp-java-repack-jars which is really slow, and not useful for XMind.
1112
%define __jar_repack 0
@@ -38,20 +39,25 @@ mkdir -p "%{buildroot}%{apps_dir}"
3839
mv "%{downloaded_dir}"/* "%{buildroot}%{install_dir}" # Install the app
3940
cp "%{desktop_file}" "%{buildroot}%{apps_dir}" # Install the desktop file
4041
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
4144

4245
# Package the files
4346
%files
4447
%{install_dir}
4548
%{apps_dir}/* # Important! If the '/*' is removed, the apps_dir will be considered as created by XMind,
4649
# which is not true and problematic, because removing xmind would delete the folder.
50+
%{fonts_dir}
4751

4852
%post
4953
xdg-mime install --mode system --novendor "%{install_dir}/xmind.xml" # Remove the MIME data
5054
xdg-icon-resource install --context mimetypes --size 64 "%{mime_icon}" application-xmind # Remove the file icons
5155
xdg-icon-resource install --context mimetypes --size 256 "%{mime_icon_big}" application-xmind # Remove the HD file icon
5256
update-desktop-database # Update the MIME database
57+
fc-cache -f # Update the font cache
5358

5459
%preun
5560
xdg-mime uninstall --mode system "%{install_dir}/xmind.xml" # Remove the MIME data
5661
xdg-icon-resource uninstall --context mimetypes --size 64 application-xmind # Remove the small file icon
5762
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

Comments
 (0)