Blob Blame History Raw
#
# spec file for package josm

%global svn_revision 4223


Name:           josm
Version:        0
Release:        0.21.%{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 add javadoc generation in build.xml
Patch1:         %{name}-%{version}-add_javadoc.patch

#patch to remove metadata-extractor and signpost-core of final jar
Patch2:         %{name}-%{version}-remove_external_lib.patch

#remove call to "svn info" and fix in build.xml revision and commit date 
Patch3:         %{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:  metadata-extractor >= 2.3.1
BuildRequires:  signpost-core >= 1.2.1.1
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

%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
%patch3 -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 signpost-core) lib/signpost-core-1.2.1.1.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 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