[hawtbuf] switch to XMvn
gil
gil at fedoraproject.org
Fri Jul 5 22:39:18 UTC 2013
commit ef236d447f6d5e52720437d1a112ef1a1b310541
Author: gil <puntogil at libero.it>
Date: Sat Jul 6 00:38:41 2013 +0200
switch to XMvn
.gitignore | 1 +
hawtbuf.spec | 84 ++++++++++++++--------------------------------------------
sources | 2 +-
3 files changed, 22 insertions(+), 65 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 60e8316..80fc853 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/hawtbuf-1.9.tar.xz
+/hawtbuf-project-1.9.tar.gz
diff --git a/hawtbuf.spec b/hawtbuf.spec
index 968db3a..4e4f050 100644
--- a/hawtbuf.spec
+++ b/hawtbuf.spec
@@ -1,18 +1,17 @@
Name: hawtbuf
Version: 1.9
-Release: 5%{?dist}
+Release: 6%{?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-%{version}.tar.xz
-BuildRequires: fusesource-pom
+Source0: https://github.com/fusesource/hawtbuf/archive/%{name}-project-%{version}.tar.gz
+
BuildRequires: java-devel
-BuildRequires: jpackage-utils
-BuildRequires: apache-commons-logging
+BuildRequires: mvn(org.fusesource:fusesource-pom)
+BuildRequires: mvn(commons-logging:commons-logging)
+BuildRequires: mvn(org.apache.maven:maven-plugin-api)
+BuildRequires: mvn(org.apache.maven:maven-project)
# test deps
BuildRequires: junit
@@ -20,24 +19,14 @@ BuildRequires: log4j
BuildRequires: maven-local
BuildRequires: javacc-maven-plugin
-BuildRequires: maven-compiler-plugin
-BuildRequires: maven-install-plugin
BuildRequires: maven-invoker-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
# B/R for maven-archiver
BuildRequires: mvn(org.apache.maven.shared:maven-shared-components)
-Requires: apache-commons-logging
-
-Requires: java
-Requires: jpackage-utils
BuildArch: noarch
%description
@@ -50,85 +39,52 @@ 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
-%pom_remove_plugin org.apache.maven.plugins:maven-assembly-plugin
+%setup -q -n %{name}-%{name}-project-%{version}
+%pom_remove_plugin :maven-assembly-plugin
%build
+%mvn_package ":%{name}-project" %{name}
+%mvn_build -s
-mvn-rpmbuild install javadoc:aggregate
-# -Prun-its
%install
+%mvn_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 -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
+%files -f .mfiles-%{name}
%dir %{_javadir}/%{name}
-%{_javadir}/%{name}/%{name}.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
+%files proto -f .mfiles-%{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
+%files protoc -f .mfiles-%{name}-protoc
%doc license.txt notice.md %{name}-protoc/readme.md
-%files javadoc
-%{_javadocdir}/%{name}
+%files javadoc -f .mfiles-javadoc
%doc license.txt notice.md
%changelog
+* Fri Jul 05 2013 gil cattaneo <puntogil at libero.it> 1.9-6
+- switch to XMvn
+- minor changes to adapt to current guideline
+
* Tue Feb 19 2013 gil cattaneo <puntogil at libero.it> 1.9-5
- disabled integration tests
diff --git a/sources b/sources
index c52abe3..e1ded98 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-baf514c2e9c636c805b76408ec11b0fb hawtbuf-1.9.tar.xz
+4b9a5b4992ea7b93952d85691e1ce708 hawtbuf-project-1.9.tar.gz
More information about the scm-commits
mailing list