# # spec file for package josm %global svn_revision 13576 Name: josm Version: 0 Release: 0.91.%{svn_revision}svn%{?dist} Summary: An editor for OpenStreetMap (OSM) Group: Applications/Internet License: GPLv2+ URL: https://josm.openstreetmap.de/ # The source for this package was pulled from upstream's vcs. Use the # following commands to generate the tarball: # ./josm-generate-tarball.sh SVN_REVISION Source0: %{name}-%{version}.%{svn_revision}svn.tar.gz Source2: %{name}-generate-tarball.sh # patch to remove metadata-extractor and signpost-core of final jar Patch1: %{name}-%{version}-add_classpath.patch #remove call to "svn info" and fix in build.xml revision and commit date Patch2: %{name}-%{version}-remove_svn_call.patch # remove static analysis compiler error prone: Patch3: %{name}-%{version}-remove_errorprone.patch BuildArch: noarch BuildRequires: jpackage-utils BuildRequires: desktop-file-utils BuildRequires: ant BuildRequires: java-devel >= 1:1.7.0 BuildRequires: gettext BuildRequires: javacc BuildRequires: signpost-core >= 1.2.1.1 BuildRequires: metadata-extractor2 >= 2.9.0 BuildRequires: svgsalamander BuildRequires: apache-commons-codec BuildRequires: apache-commons-compress BuildRequires: apache-commons-logging BuildRequires: apache-commons-jcs-core BuildRequires: jsonp BuildRequires: openjfx-devel %if 0%{?fedora} BuildRequires: libappstream-glib %endif Requires: java >= 1:1.7.0 Requires: jpackage-utils Requires: hicolor-icon-theme Requires: metadata-extractor2 >= 2.9.0 Requires: ant Requires: signpost-core >= 1.2.1.1 Requires: svgsalamander Requires: xmpcore Requires: apache-commons-compress Requires: apache-commons-codec Requires: apache-commons-logging Requires: apache-commons-jcs-core Requires: jsonp Requires: openjfx # We still bundle some libraries Provides: bundled(gnu-getopt) = 1.0.5 %description JOSM is an editor for OpenStreetMap (OSM) written in Java Currently it supports loading stand alone GPX track data from the OSM database, loading and editing existing nodes, ways, metadata tags and relations. OpenStreetMap is a project aimed squarely at creating and providing free geographic data such as street maps to anyone who wants them. The project was started because most maps you think of as free actually have legal or technical restrictions on their use, holding back people from using them in creative, productive or unexpected ways. %package javadoc Summary: Javadocs for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %prep %setup -q %patch1 -p0 %patch2 -p1 %patch3 -p1 -b .error_prone find . -name '*.jar' -exec rm -f '{}' \; find . -name '*.class' -exec rm -f '{}' \; # removing signpost source files and include signpost-core in buildrequires and requires rm -rf ./src/oauth # removing metadata-extractor and svgSalamander sources files and include metadata-extractor and svgSalamander dependencies rm -rf ./src/com # removing jsonp from sources and include it as dep rm -rf ./src/org/glassfish # removing apache-commons-compress and jcs rm -rf ./src/org/apache/commons/compress #rm -rf ./src/org/apache/commons/jcs # removing jsonp rm -rf ./src/javax mkdir -p lib build-jar-repository -s lib \ metadata-extractor2-2 \ signpost-core \ svgsalamander \ commons-codec \ ant \ apache-commons-compress \ jsonp ln -s $(build-classpath javacc) tools/javacc.jar iconv -f iso8859-15 -t utf-8 CONTRIBUTION > CONTRIBUTION.conv && mv -f CONTRIBUTION.conv CONTRIBUTION %build ant javadoc ant %install mkdir -p %{buildroot}%{_javadir} mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -rp javadoc \ %{buildroot}%{_javadocdir}/%{name} install -p -m 644 dist/%{name}-custom.jar %{buildroot}%{_javadir}/%{name}.jar %jpackage_script org.openstreetmap.josm.gui.MainApplication "" "" josm:metadata-extractor2-2:ant:signpost-core:apache-commons-codec:svgsalamander:xmpcore:apache-commons-compress:apache-commons-jcs:apache-commons-logging:jsonp josm true install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/apps install -p -m 644 images/logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg install -d %{buildroot}%{_datadir}/icons/hicolor/48x48/apps install -p -m 644 images/logo_48x48x32.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png install -Dp -m 644 linux/tested/usr/share/man/man1/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %if 0%{?fedora} install -Dp -m 644 linux/tested/usr/share/metainfo/%{name}.appdata.xml %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml %endif desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ linux/tested/usr/share/applications/%{name}.desktop %if 0%{?fedora} appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml %endif %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %doc README CONTRIBUTION %license LICENSE gpl-2.0.txt gpl-3.0.txt %{_mandir}/man1/%{name}.1.gz %{_javadir}/%{name}.jar %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/48x48/apps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %if 0%{?fedora} %{_datadir}/appdata/%{name}.appdata.xml %endif %files javadoc %defattr(-,root,root,-) %{_javadocdir}/%{name} %changelog * Fri Apr 20 2018 Jakub Jelen - 0-0.89.13576svn - New upstream release (#1569873) * Tue Mar 27 2018 Jakub Jelen - 0-0.88.13500svn - Update to latest version (#1500778) * Wed Feb 07 2018 Fedora Release Engineering - 0-0.85.11427svn - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 0-0.84.11427svn - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 0-0.83.11427svn - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Jan 03 2017 Cédric OLIVIER 0-0.82.11427svn - Update to 11427 svn revision * Sun Nov 13 2016 Cédric OLIVIER 0-0.81.11223svn - Update to 11223 svn revision * Tue Sep 13 2016 Cédric OLIVIER 0-0.80.10966svn - Update to 10966 svn revision * Fri Jul 15 2016 Cédric OLIVIER 0-0.79.10526svn - Update to 10526 svn revision * Sun Jun 19 2016 Cédric OLIVIER 0-0.78.10327svn - Update to 10327 svn revision * Mon Mar 21 2016 Cédric OLIVIER 0-0.77.9979svn - Update to 9979 svn revision * Sat Mar 12 2016 Cédric OLIVIER 0-0.76.9963svn - Update to 9963 svn revision * Mon Feb 29 2016 Cédric OLIVIER 0-0.75.9900svn - Update to 9900 svn revision * Mon Feb 15 2016 Cédric OLIVIER 0-0.74.9329svn - Update Requirement (#1308516) * Wed Feb 10 2016 Cédric OLIVIER 0-0.73.9329svn - Update classpath in josm launcher * Tue Feb 09 2016 Cédric OLIVIER 0-0.72.9329svn - unset executable bits on appdata file * Tue Feb 09 2016 Cédric OLIVIER 0-0.71.9329svn - Remove jsonp from source * Thu Feb 04 2016 Fedora Release Engineering - 0-0.70.9329svn - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sat Jan 16 2016 Matěj Cepl - 0-0.69.9329svn - Update to 9329 svn revision (#1299047) * Thu Dec 03 2015 Cédric OLIVIER 0-0.69.9060svn - Update to 9060 svn revision * Sun Oct 25 2015 Cédric OLIVIER 0-0.68.8800svn - Update to 8800 svn revision * Wed Jun 17 2015 Fedora Release Engineering - 0-0.67.8109svn - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Mar 3 2015 Cédric OLIVIER 0-0.66.8109svn - Update to 8109 svn revision * Thu Feb 12 2015 Cédric OLIVIER 0-0.65.7995svn - Update to 7995 svn revision * Sat Jan 24 2015 Cédric OLIVIER 0-0.64.7906svn - Fix bug in launcher * Sat Jan 17 2015 Cédric OLIVIER 0-0.63.7906svn - Adding dependency apache-commons-compress * Sat Jan 17 2015 Cédric OLIVIER 0-0.62.7906svn - Update to 7906 svn revision * Wed Dec 24 2014 Cédric OLIVIER 0-0.61.7777svn - Update to 7777 svn revision * Mon Nov 17 2014 Cédric OLIVIER 0-0.60.7643svn - Include appdata * Mon Oct 27 2014 Cédric OLIVIER 0-0.59.7643svn - Change commons-codec to apache-commons-codec * Sat Oct 25 2014 Cédric OLIVIER 0-0.58.7643svn - Update to 7643 svn revision * Thu Oct 02 2014 Cédric OLIVIER 0-0.57.7588svn - Fix bug with geolocal picture import * Tue Sep 30 2014 Cédric OLIVIER 0-0.56.7588svn - Update to 7588 svn revision * Tue Sep 02 2014 Cédric OLIVIER 0-0.55.7480svn - Update to 7480 svn revision * Fri Aug 01 2014 Cédric OLIVIER 0-0.54.7347svn - Update to 7347 svn revision