[codemodel/f17] First import after review (#789602)

Juan Hernandez jhernand at fedoraproject.org
Wed Feb 15 14:38:23 UTC 2012


commit 2771f3764e7384ed4d9e77b521ed06168e412a79
Author: Juan Hernandez <juan.hernandez at redhat.com>
Date:   Wed Feb 15 15:37:36 2012 +0100

    First import after review (#789602)

 .gitignore              |    1 +
 codemodel-2.6-pom.patch |   15 ++++++
 codemodel.spec          |  114 +++++++++++++++++++++++++++++++++++++++++++++++
 sources                 |    1 +
 4 files changed, 131 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e84965e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/codemodel-2.6.tar.gz
diff --git a/codemodel-2.6-pom.patch b/codemodel-2.6-pom.patch
new file mode 100644
index 0000000..bc4b0ef
--- /dev/null
+++ b/codemodel-2.6-pom.patch
@@ -0,0 +1,15 @@
+diff -Naur codemodel-2.6/pom.xml codemodel-2.6-work/pom.xml
+--- codemodel-2.6/pom.xml	2011-12-02 09:06:31.000000000 -0500
++++ codemodel-2.6-work/pom.xml	2012-01-16 10:25:52.096000047 -0500
+@@ -49,11 +49,6 @@
+     <url>http://codemodel.java.net/</url>
+     <version>2.6</version>
+     <packaging>pom</packaging>
+-    <parent>
+-        <groupId>net.java</groupId>
+-        <artifactId>jvnet-parent</artifactId>
+-        <version>1</version>
+-    </parent>
+     <modules>
+         <module>codemodel</module>
+         <module>codemodel-annotation-compiler</module>
diff --git a/codemodel.spec b/codemodel.spec
new file mode 100644
index 0000000..2634cbe
--- /dev/null
+++ b/codemodel.spec
@@ -0,0 +1,114 @@
+Name: codemodel
+Version: 2.6
+Release: 3%{?dist}
+Summary: Java library for code generators
+Group: Development/Libraries
+License: CDDL and GPLv2
+URL: http://codemodel.java.net
+
+# svn export https://svn.java.net/svn/codemodel~svn/tags/codemodel-project-2.6/ codemodel-2.6
+# tar -zcvf codemodel-2.6.tar.gz codemodel-2.6
+Source0: %{name}-%{version}.tar.gz
+
+# Remove the reference to the parent from the POM:
+Patch0: %{name}-%{version}-pom.patch
+
+BuildArch: noarch
+
+BuildRequires: jpackage-utils
+BuildRequires: java-devel
+BuildRequires: maven
+BuildRequires: istack-commons
+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
+BuildRequires: maven-surefire-provider-junit4
+
+Requires: istack-commons
+Requires: jpackage-utils
+Requires: java
+
+
+%description
+CodeModel is a Java library for code generators; it provides a way to
+generate Java programs in a way much nicer than PrintStream.println().
+This project is a spin-off from the JAXB RI for its schema compiler
+to generate Java source files.
+
+
+%package javadoc
+Summary: Javadocs for %{name}
+Group: Documentation
+Requires: jpackage-utils
+
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+
+%prep
+
+# Unpack and patch the original source:
+%setup -q
+%patch0 -p1
+
+# Remove bundled jar files:
+find . -name '*.jar' -print -delete
+
+
+%build
+mvn-rpmbuild \
+  -Dproject.build.sourceEncoding=UTF-8 \
+  install \
+  javadoc:aggregate
+
+
+%install
+install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
+install -d -m 755 %{buildroot}%{_javadir}
+install -d -m 755 %{buildroot}%{_mavenpomdir}
+
+# JAR
+cp -p codemodel/target/codemodel-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+cp -p codemodel-annotation-compiler/target/codemodel-annotation-compiler-%{version}.jar %{buildroot}%{_javadir}/%{name}-annotation-compiler.jar
+
+# JAVADOC
+cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+
+# POM
+cp -p pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}-project.pom
+cp -p codemodel/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+cp -p codemodel-annotation-compiler/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}-annotation-compiler.pom
+
+# DEPMAP
+%add_maven_depmap JPP-%{name}-project.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+%add_maven_depmap JPP-%{name}-annotation-compiler.pom %{name}-annotation-compiler.jar
+
+
+%files
+%{_mavenpomdir}/*
+%{_mavendepmapfragdir}/*
+%{_javadir}/*
+%doc LICENSE.html
+
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc LICENSE.html
+
+
+%changelog
+* Tue Feb 14 2012 Juan Hernandez <juan.hernandez at redhat.com> 2.6-3
+- Added build requirement for maven-surefire-provider-junit4
+
+* Tue Feb 14 2012 Juan Hernandez <juan.hernandez at redhat.com> 2.6-2
+- Cleanup of the spec file
+
+* Mon Jan 16 2012 Marek Goldmann <mgoldman at redhat.com> 2.6-1
+- Initial packaging
+
diff --git a/sources b/sources
index e69de29..d453abe 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+02e5f6fe1485779233e4dc31f09d9cad  codemodel-2.6.tar.gz


More information about the scm-commits mailing list