File jedit.spec of Package jedit
#
# spec file for package jedit
#
# 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/
#
# icecream 0
%define section free
Name: jedit
Version: 4.5.1
Release: 0
Summary: Programmer's Text Editor Written in Java
License: GPL-2.0+
Group: Productivity/Editors/Other
Url: http://www.jedit.org/
# SourceURL: http://download.sourceforge.net/jedit/jedit%{version}source.tar.bz2
Source0: jedit%{version}source.tar.bz2
Source1: %{name}-16.png
Source2: %{name}-32.png
Source3: %{name}-48.png
Source4: %{name}.desktop
Source5: %{name}.in
Patch0: 00build.xml.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: ant
BuildRequires: ant-contrib
BuildRequires: ant-nodeps
BuildRequires: bsh2
BuildRequires: desktop-file-utils
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: ivy
BuildRequires: java-devel >= 1.6.0
%description
jEdit is a cross-platform programmer's text editor written in Java.
Some of jEdit's features include:
* Built-in macro language (BeanShell).
* Extensible plug-in architecture with more than 80 plug-ins
available.
* Plug-ins can be downloaded and installed from within jEdit using
the plug-in manager feature.
* Syntax highlighting for more than 80 languages.
* Supports a large number of character encodings including UTF8 and
Unicode.
* Auto-indenting of source code.
* Folding (indent and marker based).
* Word wrap.
* Unlimited undo and redo.
* Highly configurable and customizable.
* Every other feature, both basic and advanced, that you would expect
to find in a text editor.
%prep
%setup -q -D -n jEdit
# Patch the buildfile
%patch0 -p0
%build
mkdir -p lib/ivy; ln -sf $(build-classpath ivy) lib/ivy/ivy-2.2.0.jar
mkdir -p lib/ant-contrib; ln -sf $(build-classpath ant-contrib) lib/ant-contrib/
mkdir -p lib/scripting; ln -sf $(build-classpath bsh2/bsh) lib/scripting/
mkdir -p lib/scripting; ln -sf $(build-classpath bsh2/bsh-engine) lib/scripting/
mkdir -p lib/default-plugins/
# Run the build
ant \
build
%install
# dirs
%__install -d -m 0755 %{buildroot}%{_bindir}
%__install -d -m 0755 %{buildroot}%{_javadir}
%__install -d -m 0755 %{buildroot}%{_datadir}/%{name}
%__install -d -m 0755 %{buildroot}%{_datadir}/applications
%__install -d -m 0755 %{buildroot}%{_mandir}/man1/
# jar
%__install build/%{name}.jar %{buildroot}%{_datadir}/%{name}/%{name}.jar
ln -sf %{_datadir}/%{name}/%{name}.jar %{buildroot}/%{_javadir}/
# Install the /usr/share/jedit subdirectories
%__cp -ar build/{jars,macros,modes,properties,startup} %{buildroot}%{_datadir}/%{name}
# Man page
%__install -m 0644 package-files/linux/%{name}.1 %{buildroot}%{_mandir}/man1/
# Icons
%__install -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%__install -D -m 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%__install -D -m 644 %{SOURCE3} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
# Desktop file
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE4}
# Launcher script
%__cat %{SOURCE5} | sed 's|@@DATADIR@@|%{_datadir}/%{name}|g' > %{name}
%__install %{name} %{buildroot}%{_bindir}
%fdupes -s %{buildroot}
%clean
%__rm -rf %{buildroot}
%post
%desktop_database_post
%postun
%desktop_database_postun
%files
%defattr(0644,root,root,0755)
%attr(0755,root,root) %{_bindir}/%{name}
%doc doc/*
%{_javadir}/*
%{_datadir}/%{name}/
%{_datadir}/applications/*
%{_mandir}/man1/%{name}.1*
%{_datadir}/icons/hicolor/
%changelog