[mojo-signatures] Initial version of the package

Stanislav Ochotnicky sochotni at fedoraproject.org
Thu Sep 30 07:43:38 UTC 2010


commit 00655f66733357367c92ba319d3bccee43ce4c4c
Author: Stanislav Ochotnicky <sochotnicky at redhat.com>
Date:   Thu Sep 30 09:43:38 2010 +0200

    Initial version of the package

 .gitignore               |    1 +
 0001-pom.xml-files.patch |   61 +++++++++++++++++++++++++
 mojo-signatures.spec     |  112 ++++++++++++++++++++++++++++++++++++++++++++++
 sources                  |    1 +
 4 files changed, 175 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..fb853f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/mojo-signatures-1.1.tar.xz
diff --git a/0001-pom.xml-files.patch b/0001-pom.xml-files.patch
new file mode 100644
index 0000000..6c36b76
--- /dev/null
+++ b/0001-pom.xml-files.patch
@@ -0,0 +1,61 @@
+From df0ebd29fd174b558134572a45856cc28bc868c6 Mon Sep 17 00:00:00 2001
+From: Stanislav Ochotnicky <sochotnicky at redhat.com>
+Date: Fri, 17 Sep 2010 16:21:40 +0200
+Subject: [PATCH] pom.xml files
+
+---
+ java15/pom.xml |    7 ++++++-
+ java16/pom.xml |    5 ++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/java15/pom.xml b/java15/pom.xml
+index dbee49a..b9cd0c4 100644
+--- a/java15/pom.xml
++++ b/java15/pom.xml
+@@ -27,7 +27,7 @@
+   <parent>
+     <groupId>org.codehaus.mojo.signature</groupId>
+     <artifactId>signatures-parent</artifactId>
+-    <version>1.0</version>
++    <version>1.1</version>
+     <relativePath>../signatures-parent</relativePath>
+   </parent>
+ 
+@@ -68,6 +68,11 @@
+               <goal>build</goal>
+             </goals>
+             <configuration>
++                <javaHome>
++                    <!-- this should be gcj sdk, but alas..it
++                    doesn't work properly -->
++                    /etc/alternatives/java_sdk_1.6.0
++                </javaHome>
+               <jdk>
+                 <version>[1.5,1.6)</version>
+               </jdk>
+diff --git a/java16/pom.xml b/java16/pom.xml
+index 2a28463..f9cc759 100644
+--- a/java16/pom.xml
++++ b/java16/pom.xml
+@@ -27,7 +27,7 @@
+   <parent>
+     <groupId>org.codehaus.mojo.signature</groupId>
+     <artifactId>signatures-parent</artifactId>
+-    <version>1.0</version>
++    <version>1.1</version>
+     <relativePath>../signatures-parent</relativePath>
+   </parent>
+ 
+@@ -68,6 +68,9 @@
+               <goal>build</goal>
+             </goals>
+             <configuration>
++              <javaHome>
++                /etc/alternatives/java_sdk
++              </javaHome>
+               <jdk>
+                 <version>[1.6,1.7)</version>
+               </jdk>
+-- 
+1.7.2.3
+
diff --git a/mojo-signatures.spec b/mojo-signatures.spec
new file mode 100644
index 0000000..0c7caf3
--- /dev/null
+++ b/mojo-signatures.spec
@@ -0,0 +1,112 @@
+Name:           mojo-signatures
+Version:        1.1
+Release:        0.1.svn11457%{?dist}
+Summary:        Mojo API signatures project
+
+Group:          Development/Libraries
+License:        MIT
+URL:            http://mojo.codehaus.org/
+
+# we are using svn because upstream doesn't provide source tarballs
+# and we want to have all available signatures together anyway (just
+# in case)
+# svn export http://svn.codehaus.org/mojo/trunk/signatures -r11457 mojo-signatures-1.1
+# tar caf mojo-signatures-1.1.tar.xz mojo-signatures-1.1
+Source0:        %{name}-%{version}.tar.xz
+
+Patch0:         0001-pom.xml-files.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+
+# specific release required for objectweb-asm dependency in pom.xml
+BuildRequires:  animal-sniffer >= 1.6-3
+BuildRequires:  jpackage-utils
+BuildRequires:  maven2
+BuildRequires:  maven-enforcer-plugin
+BuildRequires:  maven-site-plugin
+BuildRequires:  maven-install-plugin
+BuildRequires:  maven-plugin-cobertura
+BuildRequires:  objectweb-asm
+
+# we should probably generate java15 signature with 1.5 jdk, but this
+# doesn't work with gcj. The signatures are probably incorrect because
+# of this, but at least they exist and noone complained yet :-)
+
+
+# specific release required for handling "signature" packaging
+Requires:       maven2 >= 2.2.1-12
+
+Requires:       jpackage-utils
+Requires(post):       jpackage-utils
+Requires(postun):     jpackage-utils
+
+%description
+The API Signatures project contains a number of projects which
+generate signatures of various APIs, such as the Java Runtime. These
+signatures are generated by and consumed by the Animal Sniffer
+project.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
+
+pushd signatures-parent
+mvn-jpp \
+        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+        install
+popd
+
+for sig in java15 java16;do
+    pushd $sig
+    mvn-jpp \
+            -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+            install
+    popd
+done
+
+%install
+rm -rf %{buildroot}
+
+install -d -m 755 %{buildroot}%{_mavenpomdir}
+install -d -m 755 %{buildroot}%{_javadir}/%{name}
+
+install -pm 644 signatures-parent/pom.xml \
+    %{buildroot}%{_mavenpomdir}/JPP.%{name}-parent.pom
+
+for sig in java15 java16;do
+   pushd $sig
+      install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-$sig.pom
+      install -pm 644 target/*signature %{buildroot}%{_javadir}/%{name}/$sig-%{version}.signature
+      %add_to_maven_depmap org.codehaus.mojo.signature $sig %{version} JPP/%{name} $sig
+   popd
+done
+
+(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for sig in *-%{version}*; do ln -sf ${sig} `echo $sig| sed "s|-%{version}||g"`; done)
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%update_maven_depmap
+
+%postun
+%update_maven_depmap
+
+
+%files
+%defattr(-,root,root,-)
+%{_mavenpomdir}/*
+%{_mavendepmapfragdir}/*
+%{_javadir}/%{name}
+
+
+
+%changelog
+* Fri Sep 17 2010 Stanislav Ochotnicky <sochotnicky at redhat.com> - 1.1-0.1.svn11457
+- Initial version of package
+
diff --git a/sources b/sources
index e69de29..0a611ae 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+7823a0075f876b04f18195ac1ddd474d  mojo-signatures-1.1.tar.xz


More information about the scm-commits mailing list