%global githash 8b9cc9089d54cd90c4ef81eee36c8476350c1975
Name: proj4j
Version: 0.1.1
Release: 1%{?dist}
Summary: Java library to transform point coordinates
License: ASL 2.0
# svn export http://svn.osgeo.org/metacrs/proj4j/trunk/ proj4j-0.1.0
# tar -cJf proj4j-0.1.0.tar.xz proj4j-0.1.0
# https://github.com/Proj4J/proj4j
URL: https://github.com/jeo/proj4j
#URL: https://trac.osgeo.org/proj4j/
# Some file are without license headers
# https://github.com/jeo/proj4j/issues/1
# https://trac.osgeo.org/proj4j/ticket/36
Source0: https://github.com/jeo/proj4j/archive/%{githash}/%{name}-%{githash}.tar.gz
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildArch: noarch
%description
Proj4J is a Java library to transform point coordinates from one
geographic coordinate system to another, including datum transformations.
The core of this library is a port of the PROJ.4 C library. The
projection algorithms, concepts and coordinate system definitions
are all taken directly from PROJ.4. These are wrapped in a Java
class model which follows standard Java conventions and OO best
practices.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n %{name}-%{githash}
# Cleanup
find . -name "*.jar" -print -delete
%pom_remove_plugin :maven-source-plugin
mv src/doc/Proj4J\ Version\ History.html src/doc/Proj4JVersionHistory.html
sed -i "s|Version 0.1|Version %{version}|" src/doc/Proj4JVersionHistory.html
sed -i "s|Release Date: ???|Release Date: `date +%Y-%m-%d`|" src/doc/Proj4JVersionHistory.html
sed -i "s|doc/Proj4J \Version \History.html|%{_docdir}/%{name}/Proj4JVersionHistory.html|" src/README.html
sed -i "s|doc/javadoc/index.html|%{_javadocdir}/%{name}/index.html|" src/README.html
# Add OSGi support
%pom_xpath_set "pom:project/pom:packaging" bundle
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 . "
true
org.osgeo.\${project.artifactId}
\${project.artifactId}
\${project.version}
bundle-manifest
process-classes
manifest
"
%mvn_file :%{name} %{name}
%mvn_alias io.jeo: org.osgeo:
%build
%mvn_build
%install
%mvn_install
%files -f .mfiles
%doc README.md src/README.html src/doc/*.html
%license src/LICENSE-2.0.txt
%files javadoc -f .mfiles-javadoc
%license src/LICENSE-2.0.txt
%changelog
* Sun Apr 17 2016 gil cattaneo 0.1.1-1
- update to 0.1.1
- switch to JEO fork
* Sat Jan 23 2016 gil cattaneo 0.1.0-1
- initial rpm