LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File freemind.spec of Package freemind (Project Office)

# spec file for package freemind
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:           freemind
Version:        1.0.1
Release:        0
Summary:        Java Program for creating and viewing Mindmaps
License:        GPL-2.0+
Group:          Productivity/Office/Other
Url:            http://freemind.sourceforge.net/
Source0:        http://sourceforge.net/projects/freemind/files/freemind/%{version}/%{name}-src-%{version}.tar.gz
Source1:        %{name}.desktop
Source2:        x-%{name}.xml
Source3:        %{name}.1
Source4:        urlsee
Source5:        urlsee.1
Patch0:         %{name}_properties.patch
Patch1:         %{name}_encoding.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  ImageMagick
BuildRequires:  ant
BuildRequires:  ant-nodeps
BuildRequires:  fdupes
BuildRequires:  java-devel >= 1.5.0
# this is just to satisfy rpmlint
BuildRequires:  hicolor-icon-theme
BuildArch:      noarch
Requires:       java >= 1.5.0
PreReq:         shared-mime-info
# these used to be separate packages
Obsoletes:      %{name}-plugins-help < %{version}
Obsoletes:      %{name}-plugins-script < %{version}
Obsoletes:      %{name}-plugins-svg < %{version}
Provides:       %{name}-plugins-help = %{version}
Provides:       %{name}-plugins-script = %{version}
Provides:       %{name}-plugins-svg = %{version}

FreeMind is a premier free mind-mapping software written in Java.
The recent development has hopefully turned it into high productivity tool.

%setup -n %{name} -q
chmod +x check_for_duplicate_resources.sh


install -d %{buildroot}%{_datadir}/%{name}
install -d %{buildroot}%{_docdir}/%{name}
(cd ../bin/dist && cp -R accessories browser lib plugins %{buildroot}%{_datadir}/%{name})
install -m 755 freemind.sh %{buildroot}%{_datadir}/%{name}
ln -sf %{_docdir}/%{name} %{buildroot}%{_datadir}/%{name}/doc

install -d -m 755 %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications
install -d -m 755 %{buildroot}%{_datadir}/mime/packages
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/mime/packages

install -d -m 755 %{buildroot}%{_datadir}/pixmaps
%{_bindir}/convert -scale 32 images/FreeMindWindowIcon.png %{buildroot}%{_datadir}/pixmaps/%{name}.png

for i in 16 32 48
	install -d -m 755 %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
	%{_bindir}/convert -scale ${i} images/FreeMindWindowIcon.png %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png

install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
install -m 644 patterns.xml %{buildroot}%{_sysconfdir}/%{name}

install -d -m 755 %{buildroot}%{_bindir}
ln -s %{_datadir}/%{name}/%{name}.sh %{buildroot}%{_bindir}/%{name}
install -m 755 %{SOURCE4} %{buildroot}%{_bindir}

install -d -m 755 %{buildroot}%{_mandir}/man1
install -m 644 %{SOURCE3} %{buildroot}%{_mandir}/man1
install -m 644 %{SOURCE5} %{buildroot}%{_mandir}/man1

%fdupes -s %{buildroot}%{_datadir}

if [ -x $(which update-mime-database) ]
then # FREEDESKTOP.ORG integration
	update-mime-database %{_datadir}/mime

if [ -x $(which update-mime-database) ]
then # FREEDESKTOP.ORG integration
	update-mime-database %{_datadir}/mime

%dir %{_datadir}/%{name}
%doc license history.txt doc/*
%config %{_sysconfdir}/%{name}