summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules')
-rw-r--r--rules/jaxen-bootstrap/delete.list3
-rw-r--r--rules/jdom-bootstrap/00-only-core.patch47
-rw-r--r--rules/jdom-bootstrap/01-no-gpg.patch36
-rw-r--r--rules/jdom-bootstrap/Makefile38
-rw-r--r--rules/jdom-bootstrap/delete.list2
5 files changed, 126 insertions, 0 deletions
diff --git a/rules/jaxen-bootstrap/delete.list b/rules/jaxen-bootstrap/delete.list
new file mode 100644
index 0000000..c8178d5
--- /dev/null
+++ b/rules/jaxen-bootstrap/delete.list
@@ -0,0 +1,3 @@
+src/java/main/org/jaxen/dom4j
+src/java/main/org/jaxen/jdom
+src/java/main/org/jaxen/xom
diff --git a/rules/jdom-bootstrap/00-only-core.patch b/rules/jdom-bootstrap/00-only-core.patch
new file mode 100644
index 0000000..5022706
--- /dev/null
+++ b/rules/jdom-bootstrap/00-only-core.patch
@@ -0,0 +1,47 @@
+diff -ruN jdom-core.orig/build.properties jdom-core/build.properties
+--- jdom-core.orig/build.properties 1969-12-31 19:00:00.000000000 -0500
++++ jdom-core/build.properties 2014-06-03 18:37:41.048699776 -0400
+@@ -0,0 +1,7 @@
++ant.jar=/opt/apache-ant/lib/ant.jar
++junit.jar=/usr/share/java/junit.jar
++serializer.jar=/usr/share/java/serializer.jar
++xalan.jar=/usr/share/java/xalan.jar
++xercesImpl.jar=/usr/share/java/xercesImpl.jar
++jaxen.jar=/home/luke/src/maven-dist/build/packages/jaxen-bootstrap/usr/share/maven/repository/jaxen/jaxen/1.1.6/jaxen-1.1.6.jar
++version=2.0.5
+diff -ruN jdom-core.orig/build.xml jdom-core/build.xml
+--- jdom-core.orig/build.xml 2014-06-03 17:32:11.428184214 -0400
++++ jdom-core/build.xml 2014-06-03 18:38:25.357844783 -0400
+@@ -296,7 +296,7 @@
+ <!-- =================================================================== -->
+ <!-- Creates the jars -->
+ <!-- =================================================================== -->
+- <target name="jars" depends="compile, javadoc"
++ <target name="jars" depends="compile.core, javadoc"
+ description="Builds the Jars">
+ <fixcrlf srcdir="." includes="**/*.bat" excludes="build*.*" eol="crlf"/>
+ <fixcrlf srcdir="." includes="**/*.sh" excludes="build*.*" eol="lf"/>
+@@ -316,14 +316,6 @@
+ <fileset dir="${core.build}" includes="**/*.class" />
+ <fileset dir="${metainf.build}" excludes="**/MANIFEST.MF" />
+ </jar>
+- <jar jarfile="${package}/${jarbase}-contrib.jar" >
+- <fileset dir="${contrib.build}" includes="**/*" />
+- <fileset dir="${metainf.build}" excludes="**/MANIFEST.MF" />
+- </jar>
+- <jar jarfile="${package}/${jarbase}-junit.jar" >
+- <fileset dir="${junit.build}" includes="**/*" />
+- <fileset dir="${metainf.build}" excludes="**/MANIFEST.MF" />
+- </jar>
+ <jar destfile="${package}/${jarbase}-javadoc.jar"
+ basedir="${build.javadocs}" includes="**/*" />
+ <jar jarfile="${package}/${jarbase}-sources.jar" >
+@@ -371,7 +363,7 @@
+ <!-- =================================================================== -->
+ <!-- Creates the class package -->
+ <!-- =================================================================== -->
+- <target name="package" depends="coverage, jars"
++ <target name="package" depends="jars"
+ description="Creates the class package">
+ <zip destfile="${package}/${jarbase}.zip">
+ <fileset dir="${package}" includes="${jarbase}*.jar" />
diff --git a/rules/jdom-bootstrap/01-no-gpg.patch b/rules/jdom-bootstrap/01-no-gpg.patch
new file mode 100644
index 0000000..0ff4889
--- /dev/null
+++ b/rules/jdom-bootstrap/01-no-gpg.patch
@@ -0,0 +1,36 @@
+--- jdom-core.orig/build.xml 2014-06-03 18:42:32.389743827 -0400
++++ jdom-core/build.xml 2014-06-03 18:42:49.346083190 -0400
+@@ -36,9 +36,6 @@
+ <property name="version.impl" value="${version}"/>
+ <property name="version.spec" value="2.0.0"/>
+
+- <property name="gpg" value="gpg"
+- description="Path to the GNU gpg program for maven target"/>
+-
+ <property name="jarbase" value="${name}-${version}" />
+
+ <property name="instrument" value="true" />
+@@ -520,23 +517,6 @@
+ </filterset>
+ </copy>
+
+- <exec dir="${mavendir}/core" executable="${gpg}">
+- <arg value="-abv"/>
+- <arg value="${mavenbase}.pom"/>
+- </exec>
+- <exec dir="${mavendir}/core" executable="${gpg}">
+- <arg value="-abv"/>
+- <arg value="${mavenbase}.jar"/>
+- </exec>
+- <exec dir="${mavendir}/core" executable="${gpg}">
+- <arg value="-abv"/>
+- <arg value="${mavenbase}-sources.jar"/>
+- </exec>
+- <exec dir="${mavendir}/core" executable="${gpg}">
+- <arg value="-abv"/>
+- <arg value="${mavenbase}-javadoc.jar"/>
+- </exec>
+-
+ <jar destfile="${mavendir}/${mavenbase}-maven-bundle.jar"
+ basedir="${mavendir}/core"
+ includes="${mavenbase}*" excludes="*maven-bundle*" />
diff --git a/rules/jdom-bootstrap/Makefile b/rules/jdom-bootstrap/Makefile
new file mode 100644
index 0000000..2b42a87
--- /dev/null
+++ b/rules/jdom-bootstrap/Makefile
@@ -0,0 +1,38 @@
+DESTDIR ?=
+MAVEN_LOCAL_REPO ?= ~/.m2
+
+ANT = ant
+FIND = find
+INSTALL = install
+RM = rm -f
+SED = sed
+TR = tr
+
+artifactId = jdom2
+version = 2.0.5
+groupId = org.jdom
+
+all: PHONY build
+
+build: build.properties $(shell $(FIND) core/src/java)
+ $(ANT) maven || { $(RM) -r build; exit 1; }
+
+build.properties: $(MAKEFILE_LIST)
+ { \
+ echo $$CLASSPATH | tr : '\n' | sed -rn 's|.*/([A-Za-z]*)(-[0-9.]*)?[.]jar$$|\1.jar=&|p' && \
+ echo version=$(version); \
+ } > $@
+
+install-dir = $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(groupId))/$(artifactId)/$(version)
+install-targets = $(addprefix $(install-dir)/$(artifactId)-$(version),.pom .jar -sources.jar -javadoc.jar)
+install: PHONY $(install-targets)
+
+$(install-targets): $(install-dir)/%: build/maven/core/%
+ $(INSTALL) -Dm644 $< $@
+
+$(patsubst $(install-dir)/%,build/maven/core/%,$(install-targets)): build/maven/core/%: build
+
+clean: PHONY
+ $(RM) -r build
+
+.PHONY: PHONY
diff --git a/rules/jdom-bootstrap/delete.list b/rules/jdom-bootstrap/delete.list
new file mode 100644
index 0000000..854dcff
--- /dev/null
+++ b/rules/jdom-bootstrap/delete.list
@@ -0,0 +1,2 @@
+contrib/lib/*.jar
+lib/*.jar