LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

#
# spec file for package freemind
#
# Copyright (c) 2012 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:        0.9.0
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
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  ant
BuildRequires:  ant-nodeps
BuildRequires:  fdupes
BuildRequires:  java-devel >= 1.4.2
# this is just to satisfy rpmlint
BuildRequires:  hicolor-icon-theme
BuildArch:      noarch
Requires:       jre >= 1.4.2
PreReq:         shared-mime-info

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

Website: http://freemind.sourceforge.net/

%package plugins-svg
Summary:        Java Plugin for FreeMind to export Mindmaps to SVG and PDF
Group:          Productivity/Office/Other
Requires:       %{name} >= %{version}
Requires:       java >= 1.4

%description plugins-svg
This plugin will add two menu points 'File -> Export -> SVG-Export' and
'File -> Export -> PDF-Export'.

%package plugins-help
Summary:        Java Plugin for FreeMind to show an extended online help
Group:          Productivity/Office/Other
Requires:       %{name} >= %{version}
Requires:       java >= 1.4

%description plugins-help
This package contains the help content for FreeMind.
This plugin will add a menu point 'Help -> Online Help'.

%package plugins-script
Summary:        Java Plugin for FreeMind to write scripts in Groovy
Group:          Productivity/Office/Other
Requires:       %{name} >= %{version}
Requires:       java >= 1.4

%description plugins-script
This plugin will add Groovy based scripting support to freemind

%prep
%setup -n %{name}
%patch0

%build
ant

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

install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/applications
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/applications
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/mime/packages
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/mime/packages
install -d -m 755 $RPM_BUILD_ROOT%{_iconsbasedir}/32x32/apps
install -m 644 images/FreeMindWindowIcon.png $RPM_BUILD_ROOT%{_iconsbasedir}/32x32/apps/freemind.png

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

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

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

%fdupes -s $RPM_BUILD_ROOT%{_datadir}
%fdupes

%clean
rm -rf $RPM_BUILD_ROOT

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

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

%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_bindir}/urlsee
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/%{name}.sh
%{_datadir}/%{name}/accessories
%{_datadir}/%{name}/browser
%{_datadir}/%{name}/lib
%{_datadir}/%{name}/doc
%dir %{_datadir}/%{name}/plugins
%{_mandir}/man1/%{name}.1.gz
%{_mandir}/man1/urlsee.1.gz
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/packages/x-%{name}.xml
%{_iconsbasedir}/32x32/apps/freemind.png
%doc license history.txt doc/*
%config %{_sysconfdir}/%{name}

%files plugins-svg
%defattr(-,root,root)
%{_datadir}/%{name}/plugins/ExportSvg.xml
%{_datadir}/%{name}/plugins/svg

%files plugins-help
%defattr(-,root,root)
%{_datadir}/%{name}/plugins/FreemindHelp.xml
%{_datadir}/%{name}/plugins/help

%files plugins-script
%defattr(-,root,root)
%{_datadir}/%{name}/plugins/ScriptingEngine.xml
%{_datadir}/%{name}/plugins/script

%changelog