Name: jedit Version: 5.6.0 Release: 1%{?dist} Summary: Programmer's text editor License: GPL-2.0-or-later AND GFDL-1.1-no-invariants-or-later URL: http://www.jedit.org/ Source0: https://sourceforge.net/projects/jedit/files/jedit/%{version}/jedit%{version}source.tar.bz2 BuildRequires: ant apache-ivy ant-junit ivy-local junit bsf bsh ant-contrib ant-apache-bsf mockito hamcrest jsr-305 desktop-file-utils docbook-style-xsl xerces-j2 xalan-j2 Requires: java >= 1:11 Requires: javapackages-filesystem Requires: which BuildArch: noarch ExclusiveArch: %{java_arches} noarch %description jEdit is an Open Source, cross platform text editor written in Java. It has an extensive feature set that includes syntax highlighting, auto indent, folding, word wrap, abbreviation expansion, multiple clipboards, powerful search and replace, and much more. Futhermore, jEdit is extremely customizable, and extensible, using either macros written in the BeanShell scripting language, or plugins written in Java. %prep %setup -q -n jEdit # remove unnecessary dependencies (not required for default build) sed -i '//d' ivy.xml sed -i '//d' ivy.xml sed -i '//,/<[/]script>/d' build.xml sed -i 's;;&\n;g' build.xml # fix docs generation # docbook-xsl not available as xmvn artifact in fedora, supply zip manually ln -s /usr/share/sgml/docbook/xsl-stylesheets docbook zip -rq docbook-xsl-resources.zip docbook sed -i 's;${lib.dir}/docbook/docbook-xsl-resources.zip;docbook-xsl-resources.zip;g' build.xml # saxon not available in fedora, use xalan instead sed -i 's;org="saxon" name="saxon" rev="[0-9.]*";org="xalan" name="xalan" rev="2.7.2";g' ivy.xml sed -i 's;com.icl.saxon.TransformerFactoryImpl;org.apache.xalan.processor.TransformerFactoryImpl;g' build.xml # use system ivy configuration rm -f ivysettings.xml sed -i '//d' build.xml %build ant -Divy.mode=local -Divy.jar.present=true build docs-html %install mkdir -p %{buildroot}%{_javadir} cp -pR build/%{name}.jar %{buildroot}%{_javadir}/ mkdir -p %{buildroot}%{_datadir}/%{name} cp -pR build/{doc,jars,keymaps,macros,modes,properties,startup} %{buildroot}%{_datadir}/%{name} ln -s ../java/%{name}.jar %{buildroot}%{_datadir}/%{name}/%{name}.jar mkdir -p %{buildroot}%{_bindir} cp -p package-files/linux/jedit %{buildroot}%{_bindir}/jedit sed -i 's;/usr/share/jEdit/@jar.filename@;%{_datadir}/%{name}/%{name}.jar;g' %{buildroot}%{_bindir}/jedit chmod +x %{buildroot}%{_bindir}/jedit mkdir -p %{buildroot}%{_mandir}/man1 cp -p package-files/linux/jedit.1 %{buildroot}%{_mandir}/man1/jedit.1 sed -i 's;@jedit.version@;%{version};g' %{buildroot}%{_mandir}/man1/jedit.1 mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --dir=%{buildroot}%{_datadir}/applications --set-icon=%{_datadir}/%{name}/doc/%{name}.png package-files/linux/deb/%{name}.desktop %files %{_javadir}/%{name}.jar %{_datadir}/%{name} %{_bindir}/%{name} %{_mandir}/man1/jedit.1* %{_datadir}/applications/jedit.desktop %doc doc/README.txt %license doc/COPYING.txt %license doc/COPYING.DOC.txt %license doc/COPYING.PLUGINS.txt %license doc/Apache.LICENSE.txt %changelog * Thu Aug 03 2023 Zdenek Zambersky - 5.6.0-1 - Initial package