Name: josm Version: 0 Release: 0.3.2255svn%{?dist} Summary: An editor for OpenStreetMap (OSM) Group: Applications/Internet License: GPLv2 URL: http://josm.openstreetmap.de/ Source0: %{name}.tar.gz Source1: %{name} Source2: %{name}.desktop Source3: generate-tarball.sh Source4: %{name}.1 #Source built using the following commands : ./generate-tarball.sh 2255 17946 #remove call to "svn info" and fix in build.xml revision and commit date Patch0: patch_remove_svn_call.patch #patch to use gettext-commons and metadata-extractor in /usr/share/java and not include them in final josm.jar Patch1: patch_not_include_dependencies_in_target.patch #patch to change location of josm source needed for i18n compilation. Patch2: patch_change_path_to_build_i18n.patch #remove call to "svn info" and fix in build.xml revision and commit date Patch3: patch_remove_svn_call_i18n.patch #patch to add javadoc generation in build.xml Patch4: patch_add_javadoc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: jpackage-utils BuildRequires: desktop-file-utils BuildRequires: ant BuildRequires: java-devel >= 1:1.6.0 BuildRequires: gettext-commons >= 0.9.6 BuildRequires: gettext BuildRequires: metadata-extractor >= 2.3.1 Requires: java >= 1:1.6.0 Requires: jpackage-utils Requires: hicolor-icon-theme Requires: gettext-commons >= 0.9.6 Requires: metadata-extractor >= 2.3.1 %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}. %package manual Summary: Manual for %{name} Group: Documentation Requires: jpackage-utils Requires: %{name} = %{version}-%{release} %description manual The manual for %{name}. %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 || : %prep %setup -q %patch0 -p0 %patch1 -p0 %patch2 -p0 %patch3 -p0 %patch4 -p0 find . -name '*.jar' -exec rm -f '{}' \; find . -name '*.class' -exec rm -f '{}' \; ln -s $(build-classpath metadata-extractor) lib/metadata-extractor-2.3.1-nosun.jar ln -s $(build-classpath gettext-commons) lib/gettext-commons-0.9.6.jar ln -s $(build-classpath ant) lib %build ant -buildfile ../i18n/build.xml ant javadoc ant %install rm -rf %{buildroot} 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}-%{version}.jar ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar mkdir -p %{buildroot}%{_bindir} install -p %SOURCE1 %{buildroot}%{_bindir}/%{name} chmod +x %{buildroot}%{_bindir}/%{name} install -d 755 %{buildroot}%{_datadir}/icons/hicolor/128x128/apps install -p -m 644 images/logo.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png mkdir -p %{buildroot}%{_mandir}/man1 install -p %SOURCE4 %{buildroot}%{_mandir}/man1/ chmod -x %{buildroot}%{_mandir}/man1/%{name}.1 desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ %SOURCE2 %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README LICENSE gpl-2.0.txt %{_mandir}/man1/%{name}.1.gz %{_javadir}/%{name}-%{version}.jar %{_javadir}/%{name}.jar %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/128x128/apps/%{name}.png %files javadoc %defattr(-,root,root,-) %{_javadocdir}/%{name} %changelog * Sat Nov 21 2009 Cedric OLIVIER 0-0.3.2255svn - Add ScriptletSnippet for Icon Cache - Change on man page section * Sat Nov 14 2009 Cedric OLIVIER 0-0.2.2255svn - Update of version number according GuideLines * Fri Oct 16 2009 Cedric OLIVIER 0-0.1.2255svn - Update to 2255 svn revision * Fri Oct 09 2009 Cedric OLIVIER 0-0.1.2221svn - Update to 2221 svn revision - Add doc files * Tue Aug 17 2009 Cedric OLIVIER 0-0.2.1788svn - Add josm translation * Sun Aug 02 2009 Cedric OLIVIER 0-0.1.1788svn - Update to 1788 svn revision - Remove jar files from sources * Fri Jun 26 2009 Cedric OLIVIER 0-0.1.1607svn - First release