%global namedreltag .Alpha5
%global namedversion %{version}%{?namedreltag}
Name: hibernate-hql
Version: 1.0.0
Release: 0.1%{namedreltag}%{dist}
Summary: Hibernate Query Parser
License: LGPLv2
Url: https://github.com/hibernate/hibernate-hql-parser
Source0: https://github.com/hibernate/hibernate-hql-parser/archive/%{namedversion}.tar.gz
Source1: pom.xml
Source2: https://repository.jboss.org/nexus/service/local/repositories/releases/content/org/hibernate/hql/hibernate-hql-parser/%{namedversion}/hibernate-hql-parser-%{namedversion}.pom
Source3: https://repository.jboss.org/nexus/service/local/repositories/releases/content/org/hibernate/hql/hibernate-hql-lucene/%{namedversion}/hibernate-hql-lucene-%{namedversion}.pom
BuildRequires: maven-local
BuildRequires: jboss-logging
BuildRequires: antlr3-java
BuildRequires: antlr3-tool
BuildRequires: junit
BuildRequires: hibernate-jpa-2.0-api
BuildRequires: hibernate-search
BuildRequires: lucene-contrib
BuildArch: noarch
%description
Experimental new parser for HQL and JP-QL queries, to convert these into SQL
and other different targets such as Lucene queries, Map/Reduce queries for
NoSQL stores, make it possible to perform more sophisticated SQL
transformations.
%package javadoc
Summary: Javadocs for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n hibernate-hql-parser-%{namedversion}
cp %{SOURCE1} pom.xml
cp %{SOURCE2} parser/pom.xml
cp %{SOURCE3} lucene/pom.xml
%pom_xpath_set pom:version "%{namedversion}" pom.xml
%pom_add_plugin "org.antlr:antlr3-maven-plugin" parser/pom.xml
%pom_xpath_inject "pom:plugins/pom:plugin[pom:artifactId = 'antlr3-maven-plugin']" "generate-sourcesantlrsrc/main/antlr" parser/pom.xml
%build
%mvn_build -f
%install
%mvn_install
%files -f .mfiles
%dir %{_javadir}/%{name}
%doc license.txt copyright.txt README.md
%files javadoc -f .mfiles-javadoc
%doc license.txt
%changelog
* Thu Oct 10 2013 Marek Goldmann - 1.0.0-0.1.Alpha5
- Initial import