Name: jedit Version: 5.6.0 Release: 1%{?dist} Summary: Programmer's text editor License: GPLv2+ 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 Requires: java >= 1:11 Requires: which BuildArch: noarch ExclusiveArch: %{java_arches} noarch %description Programmer's text editor %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 # use system ivy configuration rm -f ivysettings.xml sed -i '//d' build.xml %build ant -Divy.mode=local -Divy.jar.present=true build %install mkdir -p %{buildroot}%{_javadir}/%{name} cp -pR build/{%{name}.jar,keymaps,macros,modes,properties,startup,jars} %{buildroot}%{_javadir}/%{name} # basic docs, without generated part (which needs deps unavaliable in fedora atm) # rest can be found online on project's site: http://www.jedit.org/index.php?page=docs cp -pR doc %{buildroot}%{_javadir}/%{name} find %{buildroot}%{_javadir}/%{name}/doc -name '*.xml' -delete find %{buildroot}%{_javadir}/%{name}/doc -name '*.xsl' -delete mkdir -p %{buildroot}%{_bindir} cp -p package-files/linux/jedit %{buildroot}%{_bindir}/jedit sed -i 's;/usr/share/jEdit/@jar.filename@;%{_javadir}/%{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 gzip %{buildroot}%{_mandir}/man1/jedit.1 mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --dir=%{buildroot}%{_datadir}/applications --set-icon=%{_javadir}/%{name}/doc/%{name}.png package-files/linux/deb/%{name}.desktop %files %dir %{_javadir}/%{name} %{_javadir}/%{name}/** %{_bindir}/%{name} %{_mandir}/man1/jedit.1.gz %{_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