Accepting request 196677 from Java:packages

- use add_maven_depmap from javapackages-tools
- drop repolib part (never built)
- drop pointless jarjar
- unversioned javadoc

OBS-URL: https://build.opensuse.org/request/show/196677
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dom4j?expand=0&rev=12
This commit is contained in:
Stephan Kulow 2013-09-03 20:02:20 +00:00 committed by Git OBS Bridge
commit ea141bedfb
5 changed files with 41 additions and 216 deletions

View File

@ -1,15 +0,0 @@
<project name="dom4j-component-info">
<component id="dom4j"
licenseType="dom4j"
version="@VERSION@"
projectHome="http://dom4j.org/"
description="Library for XML, XPath and XSLT on the Java platform"
scm=":ext:cvs.devel.redhat.com:/cvs/dist/dom4j"
tag="@TAG@">
<!-- Built using JDK 1.4 -->
<artifact id="dom4j.jar"/>
<export>
<include input="dom4j.jar"/>
</export>
</component>
</project>

View File

@ -1,28 +0,0 @@
<project name="Jarjar dom4j" default="patchdom4j">
<!--
A jarjar ant build script to create the jarjard dom4j jar.
-->
<target name="patchdom4j">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="jarjar-0.7.jar"/>
<mkdir dir="output" />
<jarjar jarfile="output/dom4j-jarjar.jar">
<manifest>
<attribute name="Created-by" value="${java.vm.version} ${java.vm.vendor}"/>
<attribute name="Specification-Title" value="Dom4j JarJar(org.jboss.dom4j)"/>
<attribute name="Specification-Version" value="1.6.1"/>
<attribute name="Specification-Vendor" value="http://dom4j.org/"/>
<attribute name="Implementation-Title" value="JarJar Dom4j"/>
<attribute name="Implementation-URL" value="http://repository.jboss.com/jboss/dom4j-jarjar"/>
<attribute name="Implementation-Version" value="1.6.1"/>
<attribute name="Implementation-Vendor" value="JBoss, a division of Red Hat"/>
<attribute name="Implementation-Vendor-Id" value="http://www.jboss.org"/>
</manifest>
<zipfileset src="dom4j-1.6.1.jar"/>
<rule pattern="org.dom4j.**" result="org.jboss.dom4j.@1"/>
<zap pattern="org.dom4j.jaxb.**"/>
<zap pattern="org.dom4j.swing.**"/>
<zap pattern="org.dom4j.xpath.**"/>
<zap pattern="org.dom4j.xpp.**"/>
</jarjar>
</target>
</project>

View File

@ -1,25 +0,0 @@
<project name="dom4j-jarjar-component-info">
<!--
$Id: dom4j-jarjar-component-info.xml,v 1.1 2008/08/21 21:25:03 david Exp $
A jarjard version of dom4j that moves the classes to the org.jboss.dom4j package
space and strips the following packages:
org.dom4j.jaxb.*
org.dom4j.swing.*
org.dom4j.xpath.*
org.dom4j.xpp.*
-->
<component id="jboss/dom4j-jarjar"
licenseType="dom4j"
version="@VERSION@"
tag="@TAG@"
projectHome="http://dom4j.org/"
description="JarJar Dom4j(base package = org.jboss.dom4j)">
<artifact id="dom4j-jarjar.jar"/>
<export>
<include input="dom4j-jarjar.jar"/>
</export>
</component>
</project>

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Aug 28 13:57:11 UTC 2013 - mvyskocil@suse.com
- use add_maven_depmap from javapackages-tools
- drop repolib part (never built)
- drop pointless jarjar
- unversioned javadoc
-------------------------------------------------------------------
Fri Mar 23 08:50:16 UTC 2012 - cfarrell@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package dom4j
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,21 +16,13 @@
#
%define _with_repolib 1
%define with_repolib %{?_with_repolib:1}%{!?_with_repolib:0}
%define without_repolib %{!?_with_repolib:1}%{?_with_repolib:0}
%define repodir %{_javadir}/repository.jboss.com/dom4j/1.6.1-brew
%define repodirlib %{repodir}/lib
%define repodirsrc %{repodir}/src
%define section free
Name: dom4j
Version: 1.6.1
Release: 2
Release: 0
Summary: JarJar of dom4j for JBoss
License: Apache-1.1
Url: http://www.dom4j.org/
Group: Development/Libraries/Java
Url: http://www.dom4j.org/
#Source0: dom4j-1.6.1.tar.gz
# Debian sources don't need a proprietary msv for build, so that's why I used them
# svn co svn://svn.debian.org/svn/pkg-java/trunk/dom4j
@ -41,27 +33,21 @@ Group: Development/Libraries/Java
# tar --exclude-vcs -cjf dom4j-1.6.1-debian.tar.bz2 dom4j/
Source0: dom4j-1.6.1-debian.tar.bz2
Source1: dom4j_rundemo.sh
#Source2: dom4j-build.xml
Source3: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom
Source4: dom4j-1.6.1-component-info.xml
# http://repository.jboss.com/jboss/dom4j-jarjar/1.6.1/build/build.xml
Source5: dom4j-jarjar-build.xml
Source6: dom4j-jarjar-component-info.xml
Source2: http://repo1.maven.org/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.pom
Patch0: dom4j-1.6.1-bug1618750.patch
BuildRequires: jpackage-utils >= 1.7.4
BuildRequires: jarjar
BuildRequires: java-devel >= 1.5.0
BuildRequires: ant >= 1.6.5
BuildRequires: junit
BuildRequires: ant-apache-resolver
BuildRequires: ant-junit
BuildRequires: ant-trax
BuildRequires: ant-apache-resolver
BuildRequires: jtidy
BuildRequires: junitperf
BuildRequires: isorelax
BuildRequires: jaxen-bootstrap >= 1.1
BuildRequires: relaxngDatatype
BuildRequires: bea-stax
BuildRequires: isorelax
BuildRequires: java-devel >= 1.5.0
BuildRequires: jaxen-bootstrap >= 1.1
BuildRequires: jpackage-utils >= 1.7.4
BuildRequires: jtidy
BuildRequires: junit
BuildRequires: junitperf
BuildRequires: relaxngDatatype
BuildRequires: stax_1_0_api
BuildRequires: ws-jaxme
BuildRequires: xalan-j2 >= 2.7
@ -69,17 +55,17 @@ BuildRequires: xerces-j2
#BuildRequires: jaxp = 1.2
BuildRequires: xpp2
BuildRequires: xpp3
Requires: java >= 1.5.0
Requires: xpp2
Requires: xpp3
Requires: xerces-j2
Requires: relaxngDatatype
Requires: isorelax
Requires: jaxen >= 1.1
Requires: bea-stax
Requires: isorelax
Requires: java >= 1.5.0
Requires: jaxen >= 1.1
Requires: relaxngDatatype
Requires: stax_1_0_api
Requires: ws-jaxme
Requires: xalan-j2
Requires: xerces-j2
Requires: xpp2
Requires: xpp3
#Requires: jaxp = 1.2
Requires(post): jpackage-utils >= 1.7.4
Requires(postun): jpackage-utils >= 1.7.4
@ -87,58 +73,12 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A jarjard version of dom4j that moves the classes to the
org.jboss.dom4j package space and strips the following packages:
org.dom4j.jaxb.* org.dom4j.swing.* org.dom4j.xpath.* org.dom4j.xpp.*
%if %{with_repolib}
%package repolib
License: Apache-1.1
Summary: XML, XPath and XSLT library for Java
Group: Development/Libraries/Java
%description repolib
dom4j is an easy to use Open Source XML, XPath and XSLT framework for
Java using the Java Collections Framework. dom4j allows you to read,
write, navigate, create and modify XML documents. dom4j integrates with
DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
%package jarjar
License: Apache-1.1
Summary: JarJar of dom4j for JBoss
Group: Development/Libraries/Java
%description jarjar
A jarjared version of dom4j that moves the classes to the
org.jboss.dom4j package space and strips the following packages:
org.dom4j.jaxb.* org.dom4j.swing.* org.dom4j.xpath.* org.dom4j.xpp.*
%package jarjar-repolib
License: Apache-1.1
Summary: JarJar of dom4j for JBoss
Group: Development/Libraries/Java
%description jarjar-repolib
A jarjared version of dom4j that moves the classes to the
org.jboss.dom4j package space and strips the following packages:
org.dom4j.jaxb.* org.dom4j.swing.* org.dom4j.xpath.* org.dom4j.xpp.*
%endif
%package demo
License: Apache-1.1
Summary: XML, XPath and XSLT library for Java
Group: Development/Libraries/Java
Requires: %{name} = %{version}
@ -152,20 +92,17 @@ DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
%package manual
License: Apache-1.1
Summary: JarJar of dom4j for JBoss
Group: Development/Libraries/Java
%description manual
A jarjard version of dom4j that moves the classes to the
org.jboss.dom4j package space and strips the following packages:
org.dom4j.jaxb.* org.dom4j.swing.* org.dom4j.xpath.* org.dom4j.xpp.*
dom4j is an easy to use Open Source XML, XPath and XSLT framework for
Java using the Java Collections Framework. dom4j allows you to read,
write, navigate, create and modify XML documents. dom4j integrates with
DOM, SAX and JAXP and is seamlessly integrated with full XPath support.
%package javadoc
License: Apache-1.1
Summary: XML, XPath and XSLT library for Java
Group: Development/Libraries/Java
@ -194,8 +131,7 @@ rm -f src/test/org/dom4j/ThreadingTest.java
rm -f src/test/org/dom4j/io/StaxTest.java
%patch0 -p1 -b .bug1618750
perl -pi -e 's/\r//g' LICENSE.txt docs/clover/*.css docs/style/*.css docs/xref/*.css docs/xref-test/*.css src/doc/style/*.css docs/benchmarks/xpath/*.java
# jarjar
cp -p %{SOURCE5} dom4j-jarjar-build.xml
pushd lib
ln -sf $(build-classpath xpp2)
ln -sf $(build-classpath relaxngDatatype)
@ -232,25 +168,21 @@ export OPT_JAR_LIST="junit ant/ant-junit"
ant package release-javadoc
#export CLASSPATH=`pwd`/dom4j-1.6.1.jar:$(build-classpath xpp2)
#ant samples
# jarjar
export CLASSPATH=$(build-classpath jarjar)
export OPT_JAR_LIST=:
ant -f dom4j-jarjar-build.xml
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
cp -p build/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
# jarjar
cp -p output/dom4j-jarjar.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-jarjar-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_datadir}/maven2/poms/JPP-%{name}.pom
mkdir -p %{buildroot}/%{_mavenpomdir}
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr build/doc/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# manual
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
rm -rf docs/apidocs
@ -262,52 +194,17 @@ mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/src
cp -pr src/samples $RPM_BUILD_ROOT%{_datadir}/%{name}/src
#cp -pr build/classes/org/dom4j/samples $RPM_BUILD_ROOT%{_datadir}/%{name}/classes/org/dom4j
install -m 0755 run.sh $RPM_BUILD_ROOT%{_datadir}/%{name}
%if %{with_repolib}
install -d -m 755 $RPM_BUILD_ROOT%{repodir}
install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{repodir}/component-info.xml
sed -i "s/@VERSION@/%{version}-brew/g" $RPM_BUILD_ROOT%{repodir}/component-info.xml
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
sed -i "s/@TAG@/$tag/g" build.xml $RPM_BUILD_ROOT%{repodir}/component-info.xml
install -d -m 755 $RPM_BUILD_ROOT%{repodirsrc}
install -p -m 644 %{PATCH0} $RPM_BUILD_ROOT%{repodirsrc}
cp -p $RPM_BUILD_ROOT%{_javadir}/dom4j-%{version}.jar $RPM_BUILD_ROOT%{repodirlib}/dom4j.jar
# jarjar
%define repodir %{_javadir}/repository.jboss.com/jboss/dom4j-jarjar/1.6.1-brew
install -d -m 755 $RPM_BUILD_ROOT%{repodir}
install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{repodir}/component-info.xml
sed -i "s/@VERSION@/%{version}-brew/g" $RPM_BUILD_ROOT%{repodir}/component-info.xml
tag=`echo %{name}-%{version}-%{release} | sed 's|\.|_|g'`
sed -i "s/@TAG@/$tag/g" $RPM_BUILD_ROOT%{repodir}/component-info.xml
install -d -m 755 $RPM_BUILD_ROOT%{repodirsrc}
install -p -m 644 %{PATCH0} $RPM_BUILD_ROOT%{repodirsrc}
install -p -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{repodirsrc}
cp -p $RPM_BUILD_ROOT%{_javadir}/%{name}-jarjar-%{version}.jar $RPM_BUILD_ROOT%{repodirlib}/dom4j-jarjar.jar
%endif
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_datadir}/maven2/*
%{_mavenpomdir}/*
%config %{_mavendepmapfragdir}/*
%files jarjar
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-jarjar.jar
%{_javadir}/%{name}-jarjar-%{version}.jar
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%files manual
@ -317,17 +214,5 @@ install -m 0755 run.sh $RPM_BUILD_ROOT%{_datadir}/%{name}
%files demo
%defattr(-,root,root,0755)
%{_datadir}/%{name}
%if %{with_repolib}
%files repolib
%defattr(0644,root,root,0755)
%dir %{_javadir}/repository.jboss.com
%{_javadir}/repository.jboss.com/dom4j
%files jarjar-repolib
%defattr(0644,root,root,0755)
%dir %{_javadir}/repository.jboss.com
%{_javadir}/repository.jboss.com/jboss
%endif
%changelog