commit 98158853d713d1d0b57ac379fca139f0633acba8
Author: gil <puntogil(a)libero.it>
Date: Mon Jun 3 17:14:19 2013 +0200
Initial import (#882474).
.gitignore | 1 +
sources | 1 +
spymemcached-2.8.12.pom | 31 +++
spymemcached-2.8.9-build.patch | 415 ++++++++++++++++++++++++++++++++++++++++
spymemcached.spec | 86 +++++++++
5 files changed, 534 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..b2678c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/2.8.12.tar.gz
diff --git a/sources b/sources
index e69de29..f12d989 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+df14ad5cc771329956e4066ed1da7d49 2.8.12.tar.gz
diff --git a/spymemcached-2.8.12.pom b/spymemcached-2.8.12.pom
new file mode 100644
index 0000000..7ce22fd
--- /dev/null
+++ b/spymemcached-2.8.12.pom
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Apache Maven 2 POM generated by Apache Ivy
+
http://ant.apache.org/ivy/
+ Apache Ivy version: 2.2.0 20100923230623
+-->
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>spy</groupId>
+ <artifactId>spymemcached</artifactId>
+ <packaging>jar</packaging>
+ <version>2.8.12</version>
+ <description>A client library for memcached.</description>
+ <
url>http://www.couchbase.org/code/couchbase/java</url>
+ <dependencies>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>3.0.3.RELEASE</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/spymemcached-2.8.9-build.patch b/spymemcached-2.8.9-build.patch
new file mode 100644
index 0000000..b05a98d
--- /dev/null
+++ b/spymemcached-2.8.9-build.patch
@@ -0,0 +1,415 @@
+--- build.xml 2012-12-03 08:23:35.000000000 +0100
++++ build.xml-gil 2012-12-27 03:25:07.169248320 +0100
+@@ -20,14 +20,12 @@
+ SOFTWARE.
+ -->
+
+-<project name="spymemcached" default="package"
+- xmlns:artifact="urn:maven-artifact-ant"
+- xmlns:ivy="antlib:org.apache.ivy.ant">
++<project name="spymemcached" default="package">
+
+ <!-- load ant-contrib tasks to get the "if" task. -->
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">
+ <classpath>
+- <pathelement location="${basedir}/lib/ant-contrib-1.0b3.jar"/>
++ <pathelement location="/usr/share/java/ant/ant-contrib.jar"/>
+ </classpath>
+ </taskdef>
+
+@@ -39,7 +37,7 @@
+ <property name="build.dir" value="${basedir}/build" />
+ <property name="build.src.dir" value="${build.dir}/src" />
+ <property name="etc.dir" value="${basedir}/etc" />
+- <property name="lib.dir" value="${basedir}/lib" />
++ <property name="lib.dir" value="/usr/share/java" />
+ <property name="src.dir" value="${base.src.dir}/main/java"
/>
+ <property name="test.dir" value="${base.src.dir}/test/java"
/>
+ <property name="script.src.dir" value="${base.src.dir}/scripts"
/>
+@@ -62,7 +60,15 @@
+ <path id="test.classpath">
+ <pathelement location="${build.classes}" />
+ <fileset dir="${lib.dir}">
+- <include name="**/*.jar"/>
++ <include name="junit.jar"/>
++ <!--include name="jmock/jmock.jar"/-->
++ </fileset>
++ </path>
++
++ <path id="lib.path">
++ <fileset dir="${lib.dir}">
++ <include name="log4j.jar" />
++ <include name="springframework/spring-beans.jar" />
+ </fileset>
+ </path>
+
+@@ -112,9 +118,6 @@
+ <property name="server.port_number" value="11211"/>
+ <property name="test.type" value="unit"/>
+
+- <!--this is the naming policy for artifacts we want pulled down-->
+- <property name="ivy.artifact.retrieve.pattern"
+- value="${name}/[conf]/[artifact]-[revision](-[classifier]).[ext]"/>
+
+ <!-- paths used for compilation and run -->
+ <path id="lib.path.id">
+@@ -130,7 +133,14 @@
+ <path id="compile.classpath">
+ <pathelement location="${build.classes}"/>
+ <path refid="lib.path"/>
+- <path refid="${name}.common.classpath"/>
++ </path>
++
++ <path id="spymemcached.common.classpath">
++ <path refid="lib.path.id" />
++ <path refid="compile.classpath" />
++ <!--path refid="test.classpath" />
++ <pathelement location="${build.test.classes}" /-->
++ <path location="${build.dir}" />
+ </path>
+
+ <!-- ======================================
+@@ -140,95 +150,30 @@
+ <!-- Path containing third-party libraries deployed directly with spymemcached.
+ This does not include anything that Ivy can retrieve for us.
+ -->
+- <path id="lib.path">
+- <fileset dir="${lib.dir}">
+- <include name="*.jar" />
+- </fileset>
+- </path>
++ <path id="lib.path">
++ <fileset dir="${lib.dir}">
++ <include name="log4j.jar" />
++ <include name="springframework/spring-beans.jar" />
++ </fileset>
++ </path>
+
+ <!-- Classpath for unit tests (superset of compile.classpath) -->
+ <path id="test.classpath">
+ <pathelement location="${build.test.classes}" />
+ <path refid="compile.classpath" />
++ <pathelement location="${build.classes}" />
++ <fileset dir="${lib.dir}">
++ <include name="junit.jar"/>
++ <!--include name="jmock/jmock.jar"/-->
++ </fileset>
+ </path>
+ </target>
+
+- <target name="ivy-probe-antlib" >
+- <condition property="ivy.found">
+- <typefound uri="antlib:org.apache.ivy.ant"
name="cleancache"/>
+- </condition>
+- </target>
+-
+- <target name="ivy-download" unless="offline">
+- <mkdir dir="${lib.dir}" />
+- <get src="${ivy_repo_url}" dest="${ivy.jar}"
usetimestamp="true"/>
+- </target>
+-
+- <target name="ivy-init-antlib"
depends="ivy-download,ivy-probe-antlib"
+- unless="ivy.found">
+- <typedef uri="antlib:org.apache.ivy.ant" onerror="fail"
+- loaderRef="ivyLoader">
+- <classpath>
+- <pathelement location="${ivy.jar}"/>
+- </classpath>
+- </typedef>
+- <fail >
+- <condition >
+- <not>
+- <typefound uri="antlib:org.apache.ivy.ant"
name="cleancache"/>
+- </not>
+- </condition>
+- You need Apache Ivy 2.0 or later from
http://ant.apache.org/
+- It could not be loaded from ${ivy_repo_url}
+- </fail>
+- </target>
+-
+- <target name="ivy-init" depends="ivy-init-antlib"
unless="ivy.configured">
+- <ivy:configure settingsid="${name}.ivy.settings"
file="${ivysettings.xml}"/>
+- <property name="ivy.configured" value="true" />
+- </target>
+-
+- <!-- ======================================
+- Section: Resolving and Retrieving
+- ====================================== -->
+- <target name="ivy-resolve" depends="ivy-init">
+- <ivy:resolve settingsRef="${name}.ivy.settings" conf="common"
/>
+- </target>
+-
+- <target name="ivy-retrieve" depends="ivy-resolve">
+- <ivy:retrieve settingsRef="${name}.ivy.settings"
conf="common"
+- pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}"
sync="true" />
+- <ivy:cachepath pathid="${name}.common.classpath"
conf="common" />
+- </target>
+-
+- <!-- retrieve ivy-managed artifacts for checkstyle -->
+- <target name="ivy-resolve-checkstyle" depends="ivy-init">
+- <ivy:resolve settingsRef="${name}.ivy.settings"
conf="checkstyle" />
+- </target>
+-
+- <target name="ivy-retrieve-checkstyle"
depends="ivy-resolve-checkstyle">
+- <ivy:retrieve settingsRef="${name}.ivy.settings"
+- pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}"
sync="true" />
+- <ivy:cachepath pathid="${name}.checkstyle.classpath"
conf="checkstyle" />
+- </target>
+-
+- <!-- retrieve ivy-managed artifacts for checkstyle -->
+- <target name="ivy-resolve-findbugs" depends="ivy-init">
+- <ivy:resolve settingsRef="${name}.ivy.settings"
conf="findbugs" />
+- </target>
+-
+- <target name="ivy-retrieve-findbugs"
depends="ivy-resolve-findbugs">
+- <ivy:retrieve settingsRef="${name}.ivy.settings"
+- pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}"
sync="true" />
+- <ivy:cachepath pathid="${name}.findbugs.classpath"
conf="findbugs" />
+- </target>
+-
+ <!-- ======================================
+ Section: Testing and Reporting
+ ====================================== -->
+- <target name="report" depends="ivy-retrieve"
++ <target name="report"
+ description="Generates a report of dependencies">
+- <ivy:report todir="${build.dir}"/>
+ </target>
+
+ <target name="test" depends="compile, compile-test"
+@@ -281,7 +226,8 @@
+ srcdir="${test.dir}"
+ includes="**/*.java"
+ destdir="${build.test.classes}"
+- debug="${javac.debug}">
++ debug="${javac.debug}"
++ source="1.6" target="1.6">
+ <classpath>
+ <path refid="test.classpath"/>
+ </classpath>
+@@ -309,7 +255,7 @@
+ <arg value="+%Y" />
+ </exec>
+ <javadoc
+- packagenames="src"
++ packagenames="spy.*"
+ sourcepath="${src.dir}"
+ destdir="${build.javadoc}"
+ author="true"
+@@ -317,19 +263,20 @@
+ use="true"
+ windowtitle="${name} ${version} API"
+ doctitle="${name} ${version} API"
+- bottom="Copyright &copy; 2006-2009 Dustin Sallings, 2009-2012
Couchbase, Inc.">
++ bottom="Copyright &copy; 2006-2009 Dustin Sallings, 2009-2012
Couchbase, Inc."
++ source="1.6">
+ <packageset dir="${src.dir}">
+ <include name="**" />
+ </packageset>
+ <classpath>
+- <path refid="${name}.common.classpath" />
++ <path refid="compile.classpath" />
+ </classpath>
+ </javadoc>
+ </target>
+
+ <target name="docsjar" depends="docs"
+ description="Create the documentation jar">
+- <zip destfile="${build.dir}/javadocs/${name}-${version}.jar"
++ <zip destfile="${build.dir}/javadocs/${name}-2.8.9.jar"
+ basedir="${build.javadoc}" />
+ </target>
+
+@@ -342,12 +289,7 @@
+ <arg value="describe" />
+ <arg value="--abbrev=0" />
+ </exec>
+- <if>
+- <equals arg1="${err}" arg2="0"/>
+- <then>
+- <var name="version" value="${result}"/>
+- </then>
+- </if>
++ <var name="version" value="2.8.9"/>
+ <exec executable="${script.src.dir}/write-version-info.sh"
+ dir="${basedir}" failonerror="true">
+ <arg value="${build.dir}" />
+@@ -356,7 +298,7 @@
+ </exec>
+ </target>
+
+- <target name="compile" depends="ivy-init, gen-version,
ivy-retrieve"
++ <target name="compile" depends="gen-version"
+ description="Compile and run the project">
+ <mkdir dir="${build.classes}" />
+ <javac
+@@ -365,7 +307,8 @@
+ includes="**/*.java"
+ destdir="${build.classes}"
+ debug="${javac.debug}"
+- deprecation="${javac.deprecation}">
++ deprecation="${javac.deprecation}"
++ source="1.6" target="1.6">
+ <classpath refid="${name}.common.classpath" />
+ </javac>
+
+@@ -375,7 +318,8 @@
+ includes="**/*.java"
+ destdir="${build.classes}"
+ debug="${javac.debug}"
+- deprecation="${javac.deprecation}">
++ deprecation="${javac.deprecation}"
++ source="1.6" target="1.6">
+ <classpath refid="${name}.common.classpath"/>
+ </javac>
+ <move file="${build.src.dir}/net/spy/memcached/changelog.txt"
+@@ -385,26 +329,26 @@
+ <target name="srcjar" depends="init,jar"
+ description="Create source jars">
+ <mkdir dir="${build.dir}" />
+- <jar jarfile="${build.dir}/sources/${name}-${version}.jar">
++ <jar jarfile="${build.dir}/sources/${name}-2.8.9.jar">
+ <fileset dir="${src.dir}" />
+ <fileset dir="${build.src.dir}" />
+ </jar>
+- <jar jarfile="${build.dir}/sources/${name}-test-${version}.jar">
++ <jar jarfile="${build.dir}/sources/${name}-test-2.8.9.jar">
+ <fileset dir="${test.dir}" />
+ </jar>
+ </target>
+
+- <target name="jar" depends="compile,compile-test"
description="Creates a jar file for the library">
+- <jar jarfile="${build.dir}/jars/${name}-${version}.jar"
basedir="${build.classes}">
++ <target name="jar" depends="compile" description="Creates
a jar file for the library">
++ <jar jarfile="${build.dir}/jars/${name}-2.8.9.jar"
basedir="${build.classes}">
+ <manifest>
+ <attribute name="Implementation-Title" value="java memcached
client" />
+- <attribute name="Implementation-Version"
value="${version}" />
++ <attribute name="Implementation-Version" value="2.8.9"
/>
+ <attribute name="Implementation-Vendor"
value="${copyright}" />
+ <attribute name="Copyright" value="${copyright}" />
+ <attribute name="Main-Class"
value="net.spy.memcached.BuildInfo" />
+ </manifest>
+ </jar>
+- <jar jarfile="${build.dir}/jars/${name}-test-${version}.jar"
basedir="${build.test.classes}"/>
++ <!--jar jarfile="${build.dir}/jars/${name}-test-2.8.9.jar"
basedir="${build.test.classes}"/-->
+ </target>
+
+ <target name="package" depends="jar,srcjar,docsjar"
+@@ -413,7 +357,7 @@
+ <!-- ======================================
+ Section: Checkstyle Integration
+ ====================================== -->
+- <target name="checkstyle" depends="ivy-retrieve-checkstyle,
compile"
++ <target name="checkstyle" depends="compile"
+ description="Check source code conventions">
+ <taskdef resource="checkstyletask.properties">
+ <classpath refid="${name}.checkstyle.classpath" />
+@@ -433,90 +377,12 @@
+ </target>
+
+ <!-- ======================================
+- Section: Maven Support
+- ====================================== -->
+-
+- <target name="mvn-download" unless="offline">
+- <mkdir dir="${build.dir}" />
+- <get src="${mvn_repo_url}" dest="${mvn.jar}"
usetimestamp="true" />
+- </target>
+-
+- <target name="mvn-prep" depends="ivy-init, gen-version,
mvn-download"
+- description="Creates maven files">
+- <!-- prepare for mvn tasks. -->
+- <property name="spymemcached.pom"
value="${mvn.build.dir}/poms/spymemcached-${version}.pom" />
+- <property name="spymemcached-test.pom"
value="${mvn.build.dir}/poms/spymemcached-test-${version}.pom" />
+-
+- <!-- Register mvn tasks -->
+- <path id="mvn-ant-task.classpath" path="${mvn.jar}" />
+- <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
+- uri="urn:maven-artifact-ant"
+- classpathref="mvn-ant-task.classpath"/>
+-
+- <!-- generate our poms from our ivy files. -->
+- <mkdir dir="${mvn.build.dir}/poms" />
+- <ivy:makepom ivyfile="ivy/spymemcached.xml"
+- pomfile="${spymemcached.pom}"
+- settingsRef="${name}.ivy.settings">
+- <mapping conf="default" scope="compile" />
+- <mapping conf="runtime" scope="runtime" />
+- <dependency group="log4j" artifact="log4j"
version="${log4j.version}" optional="true" />
+- <dependency group="org.springframework"
artifact="spring-beans" version="${spring-beans.version}"
optional="true" />
+- </ivy:makepom>
+-
+- <ivy:makepom ivyfile="ivy/spymemcached-test.xml"
+- pomfile="${spymemcached-test.pom}"
+- settingsRef="${name}.ivy.settings">
+- <mapping conf="default" scope="compile" />
+- <mapping conf="runtime" scope="runtime" />
+- <dependency group="log4j" artifact="log4j"
version="${log4j.version}" optional="true" />
+- <dependency group="org.springframework"
artifact="spring-beans" version="${spring-beans.version}"
optional="true" />
+- </ivy:makepom>
+-
+- <!-- Change the version in the pom file to reflect our claimed version. -->
+- <replaceregexp>
+- <regexp pattern="<version>.*</version>"
/>
+- <substitution
expression="<version>${version}</version>" />
+- <fileset dir="${mvn.build.dir}/poms">
+- <include name="*.pom" />
+- </fileset>
+- </replaceregexp>
+- </target>
+-
+- <target name="mvn-install"
depends="jar,srcjar,package,mvn-prep"
+- description="Install Spymemcached in local m2 repository">
+- <!-- @todo: change to use ivy publish -->
+- <artifact:pom id="spymemcached" file="${spymemcached.pom}"
/>
+- <artifact:install file="${build.dir}/jars/${name}-${version}.jar">
+- <pom refid="${name}" />
+- <attach file="${build.dir}/sources/${name}-${version}.jar"
+- classifier="sources" />
+- <attach file="${build.dir}/javadocs/${name}-${version}.jar"
+- classifier="javadocs" />
+- </artifact:install>
+- <artifact:pom id="spymemcached-test"
file="${spymemcached-test.pom}" />
+- <artifact:install
file="${build.dir}/jars/${name}-test-${version}.jar">
+- <pom refid="${name}-test" />
+- <attach file="${build.dir}/sources/${name}-test-${version}.jar"
+- classifier="sources" />
+- </artifact:install>
+- </target>
+- <!-- ======================================
+- Section: Stage Maven locally
+- ====================================== -->
+- <target name="mvn-stage" depends="package,ivy-init,mvn-prep"
description="publish jar/source to maven repo mounted at ~/mvn-stage">
+- <ivy:publish resolver="share-m2" forcedeliver="true"
overwrite="true" publishivy="false">
+- <artifacts pattern="build/[type]s/[artifact]-[revision].[ext]" />
+- </ivy:publish>
+- </target>
+-
+- <!-- ======================================
+ Section: Findbugs Integration
+ ====================================== -->
+ <target name="findbugs" depends="check-for-findbugs, jar"
+ description="Run FindBugs">
+ <taskdef name="findbugs"
classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
+- classpath="${findbugs.home}/lib/findbugs-ant.jar" />
++ classpath="${lib.dir}/ant/ant-findbugs.jar" />
+ <mkdir dir="${findbugs.out.dir}"/>
+ <findbugs home="${findbugs.home}" output="xml:withMessages"
+ outputFile="${findbugs.output.xml.file}" effort="max"
+@@ -539,13 +405,13 @@
+
+ <target name="check-for-findbugs"
depends="warn-findbugs-unset">
+ <available property="findbugs.present"
+- file="${findbugs.home}/lib/findbugs.jar" />
++ file="${lib.dir}/findbugs.jar" />
+ </target>
+ <!-- ======================================
+ Section: IDE Integration
+ ====================================== -->
+ <target name="eclipse" description="Generate Eclipse project"
+- depends="init, ivy-retrieve">
++ depends="init">
+ <taskdef name="eclipse"
classname="prantl.ant.eclipse.EclipseTask"
+ classpath="${lib.dir}/ant-eclipse-1.0-jvm1.2.jar" />
+ <eclipse failonerror="true" updatealways="true">
diff --git a/spymemcached.spec b/spymemcached.spec
new file mode 100644
index 0000000..e970501
--- /dev/null
+++ b/spymemcached.spec
@@ -0,0 +1,86 @@
+Name: spymemcached
+Version: 2.8.12
+Release: 1%{?dist}
+Summary: Java client for memcached
+Group: Development/Libraries
+# ASL src/scripts/write-version-info.sh
+License: ASL 2.0 and MIT
+Url:
http://code.google.com/p/spymemcached/
+Source0:
https://github.com/dustin/java-memcached-client/archive/%{version}.tar.gz
+Source1:
http://files.couchbase.com/maven2/spy/%{name}/%{version}/%{name}-%{versio...
+# disable ivy and maven-ant-tasks support
+# use system libraries
+Patch0: %{name}-2.8.9-build.patch
+
+BuildRequires: java-devel
+
+BuildRequires: ant
+BuildRequires: ant-contrib
+BuildRequires: log4j
+BuildRequires: springframework-beans
+
+BuildRequires: git
+# test deps
+#BuildRequires: ant-junit
+#BuildRequires: jmock 1.x
+#BuildRequires: junit
+
+Requires: log4j
+Requires: springframework-beans
+
+Requires: java
+BuildArch: noarch
+
+%description
+A simple, asynchronous, single-threaded memcached client written in java.
+
+%package javadoc
+Group: Documentation
+Summary: Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n java-memcached-client-%{version}
+find -name '*.jar' -delete
+find -name '*.class' -delete
+
+%patch0 -p0
+sed -i "s|2.8.9|%{version}|" build.xml
+
+%build
+# test require jmock 1.x
+%ant jar docs
+
+%install
+
+mkdir -p %{buildroot}%{_javadir}
+install -pm 644 build/jars/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar -a "spy:memcached"
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr build/docs/* %{buildroot}%{_javadocdir}/%{name}
+
+%files
+%{_javadir}/%{name}*.jar
+%{_mavenpomdir}/JPP-%{name}*.pom
+%{_mavendepmapfragdir}/%{name}
+%doc LICENSE.txt README.markdown
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc LICENSE.txt
+
+%changelog
+* Sun May 12 2013 gil cattaneo <puntogil(a)libero.it> 2.8.12-1
+- update to 2.8.12
+
+* Thu Dec 27 2012 gil cattaneo <puntogil(a)libero.it> 2.8.9-1
+- update to 2.8.9
+
+* Fri Nov 16 2012 gil cattaneo <puntogil(a)libero.it> 2.8.8-1
+- initial rpm
\ No newline at end of file