Name: hawtbuf Version: 1.9 Release: 1%{?dist} Summary: A rich byte buffer library Group: Development/Libraries License: ASL 2.0 URL: https://github.com/fusesource/hawtbuf/ # git clone git://github.com/fusesource/hawtbuf.git hawtbuf-1.9 # cd hawtbuf-1.9/ && git archive --format=tar --prefix=hawtbuf-1.9/ hawtbuf-project-1.9 | xz > hawtbuf-1.9.tar.xz Source0: hawtbuf-1.9.tar.xz BuildRequires: fusesource-pom BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: apache-commons-logging # test deps BuildRequires: junit BuildRequires: log4j BuildRequires: maven BuildRequires: javacc-maven-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-install-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-bundle BuildRequires: maven-plugin-plugin BuildRequires: maven-resources-plugin BuildRequires: maven-surefire-plugin BuildRequires: maven-surefire-provider-junit4 Requires: apache-commons-logging Requires: java Requires: jpackage-utils BuildArch: noarch %description This library implements a simple interface with working with byte arrays. It is a shame that the Java SDK did not come with a built in class that was just simply a byte[], int offset, int length class which provided a rich interface similar to what the String class does for char arrays. This library fills in that void by providing a Buffer class which does provide that rich interface. %package proto Group: Development/Libraries Summary: A protobuf library Requires: %{name} = %{version}-%{release} %description proto HawtBuf Proto: A protobuf library. %package protoc Group: Development/Libraries Summary: A protobuf compiler as a maven plugin Requires: %{name}-proto = %{version}-%{release} Requires: maven %description protoc HawtBuf Protoc: A protobuf compiler as a maven plugin. %package javadoc Group: Documentation Summary: Javadoc for %{name} Requires: jpackage-utils %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n hawtbuf-%{version} %build mvn-rpmbuild install javadoc:aggregate %install mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-project.pom %add_maven_depmap JPP.%{name}-project.pom mkdir -p %{buildroot}%{_javadir}/%{name} install -m 644 %{name}/target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar install -m 644 %{name}/target/%{name}-%{version}-tests.jar %{buildroot}%{_javadir}/%{name}/%{name}-tests.jar install -pm 644 %{name}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}.pom %add_maven_depmap JPP.%{name}-%{name}.pom %{name}/%{name}.jar for m in \ proto \ protoc;do install -m 644 %{name}-${m}/target/%{name}-${m}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}-${m}.jar install -pm 644 %{name}-${m}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-${m}.pom %add_maven_depmap -f ${m} JPP.%{name}-%{name}-${m}.pom %{name}/%{name}-${m}.jar done mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %files %{_javadir}/%{name}/%{name}.jar %{_javadir}/%{name}/%{name}-tests.jar %{_mavenpomdir}/JPP.%{name}-project.pom %{_mavenpomdir}/JPP.%{name}-%{name}.pom %{_mavendepmapfragdir}/%{name} %doc license.txt notice.md readme.md %files proto %{_javadir}/%{name}/%{name}-proto.jar %{_mavenpomdir}/JPP.%{name}-%{name}-proto.pom %{_mavendepmapfragdir}/%{name}-proto %doc license.txt notice.md %{name}-proto/readme.md %files protoc %{_javadir}/%{name}/%{name}-protoc.jar %{_mavenpomdir}/JPP.%{name}-%{name}-protoc.pom %{_mavendepmapfragdir}/%{name}-protoc %doc license.txt notice.md %{name}-protoc/readme.md %files javadoc %{_javadocdir}/%{name} %doc license.txt notice.md %changelog * Tue May 22 2012 gil cattaneo 1.9-1 - initial rpm