Name: hawtjni Version: 1.1 Release: 3%{?dist} Summary: Code generator that produces the JNI code Group: Development/Libraries License: ASL 2.0 and EPL and BSD URL: http://hawtjni.fusesource.org/ # git clone git://github.com/fusesource/hawtjni.git # cd hawtjni && git checkout hawtjni-1.1 # git archive --format=tar --prefix=hawtjni-1.1/ hawtjni-1.1 | xz > hawtjni-1.1.tar.xz Source0: %{name}-%{version}.tar.xz Patch0: %{name}-%{version}-pom.patch BuildArch: noarch BuildRequires: jpackage-utils BuildRequires: java-devel BuildRequires: maven BuildRequires: maven-compiler-plugin BuildRequires: maven-idea-plugin BuildRequires: maven-plugin-plugin BuildRequires: maven-surefire-report-plugin BuildRequires: maven-project-info-reports-plugin BuildRequires: maven-plugin-jxr BuildRequires: maven-javadoc-plugin BuildRequires: maven-eclipse-plugin BuildRequires: maven-surefire-plugin BuildRequires: maven-clean-plugin BuildRequires: log4j BuildRequires: junit4 BuildRequires: maven-shade-plugin BuildRequires: fusesource-pom BuildRequires: xbean >= 3.7-7 Requires: java Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils Requires: xbean >= 3.7-7 Requires: apache-commons-cli Requires: asm2 %description HawtJNI is a code generator that produces the JNI code needed to implement java native methods. It is based on the jnigen code generator that is part of the SWT Tools project which is used to generate all the JNI code which powers the eclipse platform. %package javadoc Summary: Javadocs for %{name} Group: Documentation Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %package -n maven-%{name}-plugin Summary: Use HawtJNI from a maven plugin Group: Development/Libraries Requires: maven Requires: plexus-utils Requires: plexus-interpolation Requires: maven-archiver Requires: plexus-archiver Requires: plexus-io Requires: hawtjni = %{version}-%{release} %description -n maven-%{name}-plugin This package allows to use HawtJNI from a maven plugin. %prep %setup -q %patch0 -p1 %build mvn-rpmbuild install javadoc:aggregate %install # JAR mkdir -p $RPM_BUILD_ROOT%{_javadir} cp -p %{name}-generator/target/%{name}-generator-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-generator.jar cp -p %{name}-runtime/target/%{name}-runtime-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-runtime.jar cp -p maven-%{name}-plugin/target/maven-%{name}-plugin-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/maven-%{name}-plugin.jar # JAVADOC mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} # POM install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-pom.pom install -pm 644 %{name}-generator/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-generator.pom install -pm 644 %{name}-runtime/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}-runtime.pom install -pm 644 maven-%{name}-plugin/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-maven-%{name}-plugin.pom # DEPMAP %add_to_maven_depmap org.fusesource.hawtjni hawtjni-pom %{version} JPP %{name}-pom %add_to_maven_depmap org.fusesource.hawtjni hawtjni-generator %{version} JPP %{name}-generator %add_to_maven_depmap org.fusesource.hawtjni hawtjni-runtime %{version} JPP %{name}-runtime %add_to_maven_depmap org.fusesource.hawtjni maven-hawtjni-plugin %{version} JPP maven-hawtjni-plugin %post %update_maven_depmap %postun %update_maven_depmap %files %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %{_javadir}/* %doc readme.md license.txt changelog.md %exclude %{_mavenpomdir}/JPP-maven-%{name}-plugin.pom %exclude %{_javadir}/maven-%{name}-plugin.jar %files javadoc %{_javadocdir}/%{name} %doc license.txt %files -n maven-%{name}-plugin %{_mavenpomdir}/JPP-maven-%{name}-plugin.pom %{_javadir}/maven-%{name}-plugin.jar %changelog * Mon May 30 2011 Marek Goldmann 1.1-3 - Split maven-hawtjni-plugin into new package - Fixed license - Fixed summary - Using xz to compress source code * Sun May 29 2011 Marek Goldmann 1.1-2 - Added maven-hawtjni-plugin * Fri May 27 2011 Marek Goldmann 1.1-1 - Initial packaging