Blob Blame History Raw
%global namedreltag .Final
%global namedversion %{version}%{?namedreltag}

Name:             hibernate-jpa-2.0-api
Version:          1.0.1
Release:          2%{?dist}
Summary:          Java Persistence 2.0 (JSR 317) API

Group:            Development/Libraries
License:          EPL and BSD

# svn export hibernate-jpa-2.0-api-1.0.1.Final
# tar -zcvf hibernate-jpa-2.0-api-1.0.1.Final.tar.gz hibernate-jpa-2.0-api-1.0.1.Final
Source0:          %{name}-%{namedversion}.tar.gz

BuildArch:        noarch

Requires:         java
Requires:         jpackage-utils

BuildRequires:    jpackage-utils
BuildRequires:    java-devel
BuildRequires:    maven

BuildRequires:    maven-surefire-provider-junit
BuildRequires:    maven-compiler-plugin
BuildRequires:    maven-install-plugin
BuildRequires:    maven-jar-plugin
BuildRequires:    maven-javadoc-plugin
BuildRequires:    maven-release-plugin
BuildRequires:    maven-resources-plugin
BuildRequires:    maven-surefire-plugin

Hibernate definition of the Java Persistence 2.0 (JSR 317) API.

%package javadoc
Summary:        Javadocs for %{name}
Group:          Documentation
Requires:       jpackage-utils

%description javadoc
This package contains the API documentation for %{name}.

%setup -q -n %{name}-%{namedversion}

mvn-rpmbuild install javadoc:aggregate

# Fixing wrong-file-end-of-line-encoding
sed -i 's/\r//' target/site/apidocs/jdstyle.css

mkdir -p $RPM_BUILD_ROOT%{_javadir}/hibernate
cp -p target/%{name}-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/hibernate/%{name}.jar

mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -rp  target/site/apidocs/ $RPM_BUILD_ROOT%{_javadocdir}/%{name}

install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 pom.xml  \

%add_maven_depmap JPP.hibernate-%{name}.pom hibernate/%{name}.jar

%doc license.txt

%files javadoc
%doc license.txt

* Wed Jul 27 2011 Marek Goldmann <> 1.0.1-2
- Removed unnecessary macros, using new add_maven_depmap
- License fix

* Tue Jul 05 2011 Marek Goldmann <> 1.0.1-1
- Upstream release, license fix

* Fri May 20 2011 Marek Goldmann <> 1.0.0-1
- Initial packaging