File xmind.spec of Package XMind

#spec file for the program XMind
#This spec file is based on Tomas Tomecek repository at Github (
#I based almost all the commands he wrote here. The credit goes to him.
#The purpose of this repo is to give XMind support to most RPM-based systems, without depending of copr, which gives me problems
#on Korora, for example.

Name:           xmind
Version:        3.7.7
Release:        1%{?dist}
Summary:        Software to develop mind mapping and brainstorming diagrams
Group:          Productivity/Office/Other
License:        LGPL-3.0 or EPL-1.0
Source0:        %{name}
Source1:        %{name}.desktop
Source2:        %{name}.png
Source3:        %{name}.xml
Source4:        %{name}
Patch0:         gtk3-java-modules.patch
BuildRequires:  unzip
BuildRequires:  hicolor-icon-theme
%if 0%{?suse_version} || 0%{?fedora}
BuildRequires:  fdupes

Requires:       java
Requires:       gtk3
Requires:       glibc

XMind is a mind mapping and brainstorming software, that can capture ideas, clarify thinking,
manage complex information, and promote team collaboration for higher productivity

# unpack sources and patch
%setup -q -c

# remove unneeded architecture
%ifarch x86_64 amd64
    %define archdir XMind_amd64
    rm -rf XMind_i386
    %define archdir XMind_i386
    rm -rf XMind_amd64

# Change pathes in start script
sed -i 's@==LIBEXEC==@%{_libexecdir}@g' %{SOURCE4}
sed -i 's@==NAME==@%{name}@g' %{SOURCE4}
sed -i 's@==ARCH==@%{archdir}@g' %{SOURCE4}

mkdir -p %{buildroot}%{_libexecdir}/%{name}

install -Dm 755 %{SOURCE4} %{buildroot}%{_bindir}/%{name}
install -Dm 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
install -Dm 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
install -Dm 644 %{SOURCE3} %{buildroot}%{_datadir}/mime/packages/%{name}.xml

# Remove fonts from binary package, also remove original installation script
rm -r ./fonts
rm ./

# copy remaining stuff to binary package
cp -af ./* %{buildroot}%{_libexecdir}/%{name}

%if 0%{?suse_version} || 0%{?fedora}
%fdupes %{buildroot}%{_libexecdir}


%attr(755,root,root) %{_bindir}/%{name}
%doc *.txt *.html

* Mon Jul 09 2018 Martin Winter - 3.7.7
- remove fonts from binary package (should go to a separate package)
- remove that unneeded script

* Sun Jul 08 2018 Martin Winter - 3.7.7
- copied from open build service
- Updated to XMind 8 (3.7.7)
- Use original Linux download package for source instead of portable

* Sat Sep 10 2016 Pedro Rodríguez-de Oliveira <> - 6.0.4-1
- Added a "find and replace" to xmind, to make it work on OpenSUSE

* Tue Sep 06 2016 Pedro Rodríguez-de Oliveira <> - 3.6.1-1
- XMind repo is now opened
openSUSE Build Service is sponsored by