File mkgmap.spec of Package mkgmap
#
# spec file for package mkgmap
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define splitter_vers 299
Name: mkgmap
Version: 2540
Release: 0
Url: http://www.mkgmap.org.uk/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ant
BuildRequires: java-devel >= 1.6
BuildRequires: protobuf-java
Requires: protobuf-java
BuildArch: noarch
# kind of official snapshot
Source: http://www.mkgmap.org.uk/snapshots/%{name}-r%{version}-src.tar.gz
Source1: %name
Source2: http://www.mkgmap.org.uk/splitter/splitter-r%{splitter_vers}-src.tar.gz
Source3: tilesplitter
Source10: fastutil-6.5.2-mkg.1.jar
Source11: osmpbf-1.1.1-754a33af.jar
Patch1: no_ivy_download.diff
Requires: java >= 1.6
Summary: OpenStreetMap to GARMIN converter
License: GPL-2.0+
Group: Productivity/Databases/Tools
%description
This program converts OpenStreetMap data into a map that can be loaded
onto a Garmin GPS device. It does the conversion in one step without
depending on any other program.
%prep
%setup -q -n %{name}-r%{version} -a 2
%patch1 -p0
mkdir -p lib/compile
cp %{SOURCE10} lib/compile
cp %{SOURCE11} lib/compile
ln -s /usr/share/java/protobuf-java.jar lib/compile
%build
ant dist
pwd
pushd splitter-r%{splitter_vers}
ant dist
popd
%install
%if 0%{?sles_version} == 11
# skip /usr/lib/rpm/brp-check-bytecode-version on SLES11
export NO_BRP_CHECK_BYTECODE_VERSION=true
%endif
mkdir -p %{buildroot}%{_javadir}
install -m 644 dist/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
install -m 644 splitter-r%{splitter_vers}/dist/splitter.jar %{buildroot}%{_javadir}/
mkdir -p %{buildroot}%{_bindir}
install %SOURCE1 %{buildroot}%{_bindir}/
install %SOURCE3 %{buildroot}%{_bindir}/
install %SOURCE10 %{buildroot}%{_javadir}/
install %SOURCE11 %{buildroot}%{_javadir}/
gzip doc/%{name}.1
mkdir -p %{buildroot}%{_mandir}/man1
install doc/%{name}.1.gz %{buildroot}%{_mandir}/man1/
%clean
rm -rf "%{buildroot}"
%files
%defattr(0644,root,root,0755)
%doc doc/*.txt doc/Credits LICENCE README resources
%{_javadir}/*
%attr(0755,root,root) %{_bindir}/%{name}
%attr(0755,root,root) %{_bindir}/tilesplitter
%{_mandir}/man1/%{name}.1*
%changelog