commit 65f3ab9452a5bd16944a206fab37e0a4792ace57
Author: Peter MacKinnon <pmackinn(a)redhat.com>
Date: Tue Dec 10 17:20:14 2013 -0500
Initial import (#1011705)
.gitignore | 1 +
datanucleus-core.spec | 165 +++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 167 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..c6eea94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/datanucleus-core-3.2.9.tar.xz
diff --git a/datanucleus-core.spec b/datanucleus-core.spec
new file mode 100644
index 0000000..0348ecc
--- /dev/null
+++ b/datanucleus-core.spec
@@ -0,0 +1,165 @@
+%global debug_package %nil
+Name: datanucleus-core
+Version: 3.2.9
+Release: 3%{?dist}
+Summary: DataNucleus Core
+License: ASL 2.0
+URL:
http://www.datanucleus.org
+# svn export
http://svn.code.sf.net/p/datanucleus/code/platform/core/tags/datanucleus-...
+# tar cJf datanucleus-core-3.2.9.tar.xz datanucleus-core-3.2.9
+Source0: %{name}-%{version}.tar.xz
+
+BuildRequires: java-devel
+BuildRequires: mvn(javax.time:time-api)
+BuildRequires: mvn(javax.jdo:jdo-api)
+BuildRequires: mvn(javax.transaction:jta)
+BuildRequires: mvn(log4j:log4j)
+BuildRequires: mvn(mx4j:mx4j)
+BuildRequires: mvn(mx4j:mx4j-tools)
+BuildRequires: mvn(org.apache.ant:ant)
+BuildRequires: mvn(org.apache.geronimo.specs:geronimo-validation_1.0_spec)
+BuildRequires: mvn(org.ow2.asm:asm)
+BuildRequires: mvn(org.sonatype.oss:oss-parent)
+
+# eclipse stuff
+BuildRequires: eclipse-platform
+BuildRequires: mvn(org.eclipse.osgi:org.eclipse.osgi)
+
+# Test deps
+BuildRequires: mvn(junit:junit)
+BuildRequires: maven-local
+BuildRequires: maven-install-plugin
+
+# use Fedora base64 pkg
+BuildRequires: mvn(biz.source_code:base64coder)
+
+BuildArch: noarch
+
+%description
+DataNucleus Core provides the primary components
+of a heterogeneous Java persistence solution.
+It supports persistence API's being layered on
+top of the core functionality.
+
+%package javadoc
+Summary: Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n %{name}-%{version}
+
+# Not available
+%pom_remove_dep org.eclipse.core:org.eclipse.core.runtime.compatibility.auth
+
+CONTENTTYPE=$(ls %{_libdir}/eclipse/plugins | grep org.eclipse.core.contenttype_ )
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.core.contenttype']"
"<systemPath>%{_libdir}/eclipse/plugins/$CONTENTTYPE</systemPath>"
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.core.contenttype']"
"<scope>system</scope>"
+JOBS=$(ls %{_libdir}/eclipse/plugins | grep org.eclipse.core.jobs_ )
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.core.jobs']"
"<systemPath>%{_libdir}/eclipse/plugins/$JOBS</systemPath>"
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.core.jobs']"
"<scope>system</scope>"
+RUNTIME=$(ls %{_libdir}/eclipse/plugins | grep org.eclipse.core.runtime_ )
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.core.runtime']"
"<systemPath>%{_libdir}/eclipse/plugins/$RUNTIME</systemPath>"
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.core.runtime']"
"<scope>system</scope>"
+REGISTRY=$(ls %{_libdir}/eclipse/plugins | grep org.eclipse.equinox.registry_ )
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.equinox.registry']"
"<systemPath>%{_libdir}/eclipse/plugins/$REGISTRY</systemPath>"
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.equinox.registry']"
"<scope>system</scope>"
+COMMON=$(ls %{_libdir}/eclipse/plugins | grep org.eclipse.equinox.common_ )
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.equinox.common']"
"<systemPath>%{_libdir}/eclipse/plugins/$COMMON</systemPath>"
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.equinox.common']"
"<scope>system</scope>"
+PREFERENCES=$(ls %{_libdir}/eclipse/plugins | grep org.eclipse.equinox.preferences_ )
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.equinox.preferences']"
"<systemPath>%{_libdir}/eclipse/plugins/$PREFERENCES</systemPath>"
+%pom_xpath_inject
"pom:dependencies/pom:dependency[pom:artifactId='org.eclipse.equinox.preferences']"
"<scope>system</scope>"
+
+# Use system jvm apis
+%pom_remove_dep javax.management:jmx
+# Use system asm4 apis
+rm -r src/java/org/datanucleus/asm
+%pom_add_dep org.ow2.asm:asm
+sed -i "s|org.datanucleus.asm|org.objectweb.asm|" $(find . -name
"*.java")
+
+%pom_xpath_remove "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId =
'maven-bundle-plugin' ]/pom:configuration/pom:manifestLocation"
+%pom_xpath_remove "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId =
'maven-bundle-plugin' ]/pom:configuration/pom:dumpInstructions"
+%pom_xpath_inject "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId =
'maven-bundle-plugin' ]/pom:configuration/pom:instructions" '
+<Require-Bundle>org.eclipse.equinox.registry;resolution:=optional,org.eclipse.core.runtime;resolution:=optional</Require-Bundle>
+<Bundle-Name>${project.name}</Bundle-Name>
+<Bundle-Vendor>DataNucleus</Bundle-Vendor>
+<Premain-Class>org.datanucleus.enhancer.DataNucleusClassFileTransformer</Premain-Class>
+<Export-Package>org.datanucleus*;version="${project.version}"</Export-Package>'
+%pom_xpath_inject "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId =
'maven-bundle-plugin' ]" "
+<executions>
+ <execution>
+ <id>bundle-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+</executions>"
+%pom_xpath_set "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId =
'maven-jar-plugin' ]/pom:configuration/pom:archive/pom:manifestFile"
'${project.build.outputDirectory}/META-INF/MANIFEST.MF'
+
+# cache-api unavailable and used for an optional L2 pluggable cache
+%pom_remove_dep javax.cache:cache-api
+find -name 'JavaxCache*.java' -delete
+sed -i".orig" "/javax.cache/d" plugin.xml
+
+# swap out embedded base64 codec
+find -name 'Base64.java' -delete
+sed -i "s|org.datanucleus.util.Base64|biz.source_code.base64Coder.Base64Coder|"
$(find . -name "*.java")
+sed -i "s|\.Base64;|\.Base64Coder;|" $(find . -name "*.java")
+sed -i "s|Base64\.|Base64Coder\.|" $(find . -name "*.java")
+%pom_add_dep biz.source_code:base64coder
+
+sed -i 's/\r//' META-INF/LICENSE.txt META-INF/NOTICE.txt META-INF/README.txt
+cp -p META-INF/LICENSE.txt .
+cp -p META-INF/NOTICE.txt .
+cp -p META-INF/README.txt .
+
+%build
+
+%mvn_file : %{name}
+xmvn -B -o -Dmaven.test.skip=true install javadoc:aggregate
+
+%install
+
+mkdir -p %{buildroot}%{_javadir}
+install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+
+%files
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+%doc LICENSE.txt NOTICE.txt README.txt
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc LICENSE.txt NOTICE.txt
+
+%changelog
+* Tue Dec 10 2013 Peter MacKinnon <pmackinn(a)redhat.com> 3.2.9-3
+- use incumbent base64coder pkg instead of supplied Base64
+
+* Mon Dec 2 2013 Peter MacKinnon <pmackinn(a)redhat.com> 3.2.9-2
+- switched to manual build/install to resolve system scope issues
+
+* Wed Nov 20 2013 Peter MacKinnon <pmackinn(a)redhat.com> 3.2.9-1
+- update to latest 3.2.9 prior to review
+- removed dangling cache-api dep
+- disable tests
+
+* Fri Oct 18 2013 Peter MacKinnon <pmackinn(a)redhat.com> 3.2.7-3
+- disable cache-api due to license questions
+
+* Fri Sep 20 2013 Peter MacKinnon <pmackinn(a)redhat.com> 3.2.7-2
+- add cache-api BR
+
+* Thu Sep 19 2013 gil cattaneo <puntogil(a)libero.it> 3.2.7-1
+- initial rpm
diff --git a/sources b/sources
index e69de29..c0059c2 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+4e309073b4746f46b60bc35095d216d0 datanucleus-core-3.2.9.tar.xz