Blob Blame History Raw
#
# spec file for package josm

%global svn_revision 5697


Name:           josm
Version:        0
Release:        0.40.%{svn_revision}svn%{?dist}
Summary:        An editor for  OpenStreetMap (OSM)
Group:          Applications/Internet
License:        GPLv2+
URL:            http://josm.openstreetmap.de/
Source0:        %{name}-%{version}.%{svn_revision}svn.tar.gz
Source1:        %{name}
Source2:        %{name}.desktop
Source3:        %{name}-generate-tarball.sh
Source4:        %{name}.1
#Source built using the following commands : ./josm-generate-tarball.sh 3751

#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 


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
BuildRequires:  javacc
BuildRequires:  signpost-core >= 1.2.1.1
BuildRequires:  metadata-extractor >= 2.3.1
BuildRequires:  svgsalamander
BuildRequires:  apache-commons-codec
BuildRequires:  gnu-getopt
#BuildRequires:  gdata-java
Requires:       java >= 1:1.6.0 
Requires:       jpackage-utils
Requires:       hicolor-icon-theme
Requires:       metadata-extractor >= 2.3.1
Requires:       ant
Requires:       signpost-core >= 1.2.1.1
Requires:       svgsalamander
Requires:       gnu-getopt
#Requires:       gdata-java

%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 -p0

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 gnu-getopt from sources and include it as dependencie
rm -rf ./src/gnu

ln -s $(build-classpath metadata-extractor) lib/metadata-extractor.jar
ln -s $(build-classpath signpost-core) lib/signpost-core.jar
ln -s $(build-classpath svgsalamander) lib/svgsalamander.jar
ln -s $(build-classpath javacc) tools/javacc.jar
ln -s $(build-classpath commons-codec) lib/apache-commons-codec.jar
ln -s $(build-classpath ant) lib/ant.jar
ln -s $(build-classpath gnu-getopt) lib/gnu-getopt.jar
ln -s $(build-classpath gdata/gdata-core) lib/gdata-core.jar

iconv -f iso8859-15 -t utf-8 CONTRIBUTION > CONTRIBUTION.conv && mv -f CONTRIBUTION.conv CONTRIBUTION

%build
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}.jar

install -Dp -m 755 %SOURCE1 %{buildroot}%{_bindir}/%{name}

install -d %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
install -p -m 644 images/logo.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png

install -Dp -m 644 %SOURCE4 %{buildroot}%{_mandir}/man1/%{name}.1

desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ %SOURCE2



%clean
rm -rf %{buildroot}

%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
%defattr(-,root,root,-)
%doc README LICENSE CONTRIBUTION 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/128x128/apps/%{name}.png


%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}



%changelog
* Sun Mar 17 2013 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.40.5697svn
- Remove obsolete gdata-java dependencies

* Wed Feb 06 2013 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.39.5697svn
- Update to 5697 svn revision

* Wed Jan 16 2013 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.38.5608svn
- Update to 5608 svn revision

* Wed Nov 14 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.37.5576svn
- Update to 5576 svn revision

* Sun Oct 21 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.36.5531svn
- Add new libs in launch script classpath

* Fri Oct 19 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.35.5531svn
- Suppress bad code copy in source and include it as lib.

* Mon Oct 08 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.34.5531svn
- Update to 5531 svn revision

* Sun Sep 02 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.33.5485svn
- Change apache-commons-codec to commons-codec in classpath needed by f18+

* Sun Sep 02 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.32.5485svn
- Update to 5485 svn revision

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.31.5210svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jun 02 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.30.5210svn
- Update to 5210 svn revision

* Tue Apr 16 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.29.5181svn
- Update to 5181 svn revision

* Tue Apr 12 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.28.5177svn
- Update to 5177 svn revision

* Sat Mar 10 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.27.5047svn
- Update to 5047 svn revision

* Sat Jan 21 2012 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.26.4667svn
- Update to 4667 svn revision

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.25.4550svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Nov 04 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.24.4550svn
- Update to 4550 svn revision

* Wed Nov 02 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.23.4279svn
- Adding missing svgsalamander in requires

* Sun Aug 14 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.22.4279svn
- Update to 4279 svn revision

* Sun Jul 17 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.21.4223svn
- Update to 4223 svn revision

* Wed May 25 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.20.4064svn
- Update to 4064 svn revision

* Thu May 05 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.19.4032svn
- Update to 4032 svn revision

* Thu Apr 14 2011 Cédric OLIVIER <cedric.olivier@free.fr> 0-0.18.4021svn
- Update to 4021 svn revision

* Wed Mar 09 2011 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.17.3966svn
- Update to 3961 svn revision

* Tue Mar 08 2011 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.16.3961svn
- Update to 3961 svn revision

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.15.3751svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Jan 16 2011 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.14.3751svn
- According to Java packaging guidelines version removed from jar file name
- Enable oauth authentification

* Sun Jan 02 2011 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.13.3751svn
- Update to 3751 svn revision
- The Validator plugin has been integrated into the main program
- Scaling of objects is supported. (Ctrl+Alt in select mode)
  info To rotate an object click Ctrl+Shift
- Layers can be displayed transparently. (new button in layer list dialog)
- Plugins imagery,wmsplugin,slippymap and remotecontrol are integrated into JOSM core

* Fri Nov 19 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.12.3592svn
- Solve Bug 641756 - JOSM chooses wrong Java version on startup

* Tue Oct 07 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.11.3592svn
- Update to 3592 svn revision

* Wed Jul 21 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.10.3514svn
- Update to 3514 svn revision

* Wed Jul 21 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.9.3376svn
- Update to 3376 svn revision

* Tue Jun 22 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.8.3329svn
- According to fedora policies by removing metadata-extractor jar file

* Tue Jun 22 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.7.3329svn
- Svn revision added in welcom page

* Fri Jun 18 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.6.3329svn
- jakarta-commons-codec.jar is deprecated in rawhide to commons-codec.jar

* Wed Jun 16 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.5.3329svn
- Update to 3329 svn revision

* Mon Jun 14 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.4.3208svn
- Convert CONTRIBUTION file from ISO8859-1 to UTF-8 

* Fri Jun 11 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.3.3208svn
- Cosmetic Modifications in SPEC file

* Thu Jun 03 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.2.3208svn
- Remove an incorrect 755 in install -d directive

* Thu May 13 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.1.3208svn
- Update to 3208 svn revision
- Remove oauth waiting fedora include maven > 2.0.8 (needed for oauth build)
- Change license to GPLv2+ and add GPLv3 to %%doc
- Remove bzip2 and codec source to use of ant and jakarta-common-codec package

* Sun Mar 14 2010 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.1.3094svn
- Update to 3094 svn revision

* Sat Nov 21 2009 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.3.2255svn
- Add ScriptletSnippet for Icon Cache
- Change on man page section

* Sat Nov 14 2009 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.2.2255svn
- Update of version number according GuideLines

* Fri Oct 16 2009 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.1.2255svn
- Update to 2255 svn revision

* Fri Oct 09 2009 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.1.2221svn
- Update to 2221 svn revision
- Add doc files

* Tue Aug 17 2009 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.2.1788svn
- Add josm translation

* Sun Aug 02 2009 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.1.1788svn
- Update to 1788 svn revision
- Remove jar files from sources

* Fri Jun 26 2009 Cedric OLIVIER <cedric.olivier@free.fr> 0-0.1.1607svn
- First release