Accepting request 124675 from Java:packages
- update to 2.2 * MethodProxy thread race patch * Upgrade to ASM 3.1 - remove useless repolib, nohook and demo packages - fix build with jdk7 OBS-URL: https://build.opensuse.org/request/show/124675 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cglib?expand=0&rev=9
This commit is contained in:
parent
743abb51de
commit
94f1d862dc
@ -1,80 +0,0 @@
|
||||
--- src/test/net/sf/cglib/proxy/TestEnhancer.java.sav 2005-10-11 10:13:32.000000000 +0200
|
||||
+++ src/test/net/sf/cglib/proxy/TestEnhancer.java 2006-02-17 18:10:16.000000000 +0100
|
||||
@@ -634,35 +634,35 @@
|
||||
public void testRegisterCallbacks()
|
||||
throws InterruptedException
|
||||
{
|
||||
- Enhancer e = new Enhancer();
|
||||
- e.setSuperclass(ArgInit.class);
|
||||
- e.setCallbackType(MethodInterceptor.class);
|
||||
- e.setUseFactory(false);
|
||||
- final Class clazz = e.createClass();
|
||||
-
|
||||
- assertTrue(!Factory.class.isAssignableFrom(clazz));
|
||||
- assertEquals("test", newArgInit(clazz, "test").toString());
|
||||
-
|
||||
- Enhancer.registerCallbacks(clazz, new Callback[]{ new StringValue("fizzy") });
|
||||
- assertEquals("fizzy", newArgInit(clazz, "test").toString());
|
||||
- assertEquals("fizzy", newArgInit(clazz, "test").toString());
|
||||
-
|
||||
- Enhancer.registerCallbacks(clazz, new Callback[]{ null });
|
||||
- assertEquals("test", newArgInit(clazz, "test").toString());
|
||||
-
|
||||
- Enhancer.registerStaticCallbacks(clazz, new Callback[]{ new StringValue("soda") });
|
||||
- assertEquals("test", newArgInit(clazz, "test").toString());
|
||||
-
|
||||
- Enhancer.registerCallbacks(clazz, null);
|
||||
- assertEquals("soda", newArgInit(clazz, "test").toString());
|
||||
-
|
||||
- Thread thread = new Thread(){
|
||||
- public void run() {
|
||||
- assertEquals("soda", newArgInit(clazz, "test").toString());
|
||||
- }
|
||||
- };
|
||||
- thread.start();
|
||||
- thread.join();
|
||||
+// Enhancer e = new Enhancer();
|
||||
+// e.setSuperclass(ArgInit.class);
|
||||
+// e.setCallbackType(MethodInterceptor.class);
|
||||
+// e.setUseFactory(false);
|
||||
+// final Class clazz = e.createClass();
|
||||
+//
|
||||
+// assertTrue(!Factory.class.isAssignableFrom(clazz));
|
||||
+// assertEquals("test", newArgInit(clazz, "test").toString());
|
||||
+//
|
||||
+// Enhancer.registerCallbacks(clazz, new Callback[]{ new StringValue("fizzy") });
|
||||
+// assertEquals("fizzy", newArgInit(clazz, "test").toString());
|
||||
+// assertEquals("fizzy", newArgInit(clazz, "test").toString());
|
||||
+//
|
||||
+// Enhancer.registerCallbacks(clazz, new Callback[]{ null });
|
||||
+// assertEquals("test", newArgInit(clazz, "test").toString());
|
||||
+//
|
||||
+// Enhancer.registerStaticCallbacks(clazz, new Callback[]{ new StringValue("soda") });
|
||||
+// assertEquals("test", newArgInit(clazz, "test").toString());
|
||||
+//
|
||||
+// Enhancer.registerCallbacks(clazz, null);
|
||||
+// assertEquals("soda", newArgInit(clazz, "test").toString());
|
||||
+//
|
||||
+// Thread thread = new Thread(){
|
||||
+// public void run() {
|
||||
+// assertEquals("soda", newArgInit(clazz, "test").toString());
|
||||
+// }
|
||||
+// };
|
||||
+// thread.start();
|
||||
+// thread.join();
|
||||
}
|
||||
|
||||
public void perform(ClassLoader loader) throws Exception{
|
||||
@@ -672,9 +672,9 @@
|
||||
}
|
||||
|
||||
public void testFailOnMemoryLeak() throws Throwable{
|
||||
- if( leaks() ){
|
||||
- fail("Memory leak caused by Enhancer");
|
||||
- }
|
||||
+// if( leaks() ){
|
||||
+// fail("Memory leak caused by Enhancer");
|
||||
+// }
|
||||
}
|
||||
|
||||
public void testCallbackHelper() {
|
@ -1,63 +0,0 @@
|
||||
--- build.xml.sav 2005-10-13 11:31:30.000000000 +0200
|
||||
+++ build.xml 2006-02-17 17:48:16.000000000 +0100
|
||||
@@ -29,7 +29,7 @@
|
||||
<property name="source.test" value="src/test"/>
|
||||
<property name="source.asm" value="../asm-src"/>
|
||||
|
||||
- <property name="compile.target" value="1.2"/>
|
||||
+ <property name="compile.target" value="1.5"/>
|
||||
<property name="compile.bootclasspath" value=""/>
|
||||
<property name="compile.extdirs" value=""/>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<pathelement location="${build.home}/classes"/>
|
||||
<fileset dir="./lib">
|
||||
<include name="*.jar"/>
|
||||
+ <exclude name="asm2*.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
@@ -123,14 +124,18 @@
|
||||
<exclude name="samples/**" />
|
||||
</jar>
|
||||
|
||||
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="compile.classpath"/>
|
||||
- <jarjar basedir="${build.home}/classes" jarfile="${dist.home}/${component.name}-nodep-${component.version}.jar" >
|
||||
- <zipfileset dir="lib" includes="asm*.txt"/>
|
||||
- <zipfileset src="lib/asm.jar" excludes="META-INF"/>
|
||||
- <zipfileset src="lib/asm-attrs.jar" excludes="META-INF"/>
|
||||
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/jarjar.jar:lib/asm2_asm2.jar"/>
|
||||
+ <echo message="${dist.home}/${component.name}-nodep-${component.version}.jar" />
|
||||
+ <echo message="${build.home}/classes"/>
|
||||
+ <jarjar destfile="${dist.home}/${component.name}-nodep-${component.version}.jar" >
|
||||
+ <fileset dir="lib" includes="asm*.txt"/>
|
||||
+ <zipfileset src="lib/asm_asm.jar" excludes="META-INF"/>
|
||||
+ <zipfileset src="lib/asm_asm-attrs.jar" excludes="META-INF"/>
|
||||
<rule pattern="org.objectweb.asm.**" result="net.sf.cglib.asm.@1"/>
|
||||
- <include name="**/*"/>
|
||||
- <exclude name="samples/**"/>
|
||||
+ <fileset dir="${build.home}/classes">
|
||||
+ <include name="**/*"/>
|
||||
+ <exclude name="samples/**"/>
|
||||
+ </fileset>
|
||||
</jarjar>
|
||||
</target>
|
||||
|
||||
@@ -237,8 +242,7 @@
|
||||
name="test">
|
||||
<java classname="net.sf.cglib.TestAll"
|
||||
failonerror="${test.failonerror}"
|
||||
- fork="yes"
|
||||
- >
|
||||
+ fork="yes" >
|
||||
|
||||
<!-- jvmarg value="-Xrunhprof:heap=all,file=debug.txt"/ -->
|
||||
<!-- <jvmarg value="-verbose:gc"/> -->
|
||||
@@ -259,6 +263,7 @@
|
||||
<pathelement path="${samples.build.home}/classes" />
|
||||
<fileset dir="./lib">
|
||||
<include name="*.jar"/>
|
||||
+ <exclude name="asm2*.jar"/>
|
||||
</fileset>
|
||||
</classpath>
|
||||
</java>
|
38
cglib-2.2.pom
Normal file
38
cglib-2.2.pom
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0"?>
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib</artifactId>
|
||||
<name>Code Generation Library</name>
|
||||
<version>2.2</version>
|
||||
<url>http://cglib.sourceforge.net/</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>ASF 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<url>http://cglib.cvs.sourceforge.net/cglib</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>asm</groupId>
|
||||
<artifactId>asm-util</artifactId>
|
||||
<version>3.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.6.2</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -1,10 +0,0 @@
|
||||
--- src/test/net/sf/cglib/transform/hook/ExamplePreProcessor.java.sav 2005-11-12 12:53:28.000000000 +0100
|
||||
+++ src/test/net/sf/cglib/transform/hook/ExamplePreProcessor.java 2005-11-12 12:56:04.000000000 +0100
|
||||
@@ -39,4 +39,7 @@
|
||||
}
|
||||
};
|
||||
}
|
||||
+
|
||||
+ public void initialize() {
|
||||
+ }
|
||||
}
|
17
cglib-build_xml.patch
Normal file
17
cglib-build_xml.patch
Normal file
@ -0,0 +1,17 @@
|
||||
--- cglib/build.xml.orig 2008-08-14 13:37:22.000000000 +0200
|
||||
+++ cglib/build.xml 2008-08-14 13:35:51.000000000 +0200
|
||||
@@ -124,14 +124,6 @@
|
||||
<exclude name="samples/**" />
|
||||
</jar>
|
||||
|
||||
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="compile.classpath"/>
|
||||
- <jarjar basedir="${build.home}/classes" jarfile="${dist.home}/${component.name}-nodep-${component.version}.jar" >
|
||||
- <zipfileset dir="lib" includes="asm*.txt"/>
|
||||
- <zipfileset src="lib/asm-3.1.jar" excludes="META-INF"/>
|
||||
- <rule pattern="org.objectweb.asm.**" result="net.sf.cglib.asm.@1"/>
|
||||
- <include name="**/*"/>
|
||||
- <exclude name="samples/**"/>
|
||||
- </jarjar>
|
||||
</target>
|
||||
|
||||
<target depends="compile,javadoc" description="Create docs and source distribution" name="srcjar">
|
@ -1,16 +0,0 @@
|
||||
<project name="cglib-component-info">
|
||||
<component id="cglib"
|
||||
licenseType="apache-2.0"
|
||||
version="@VERSION@"
|
||||
projectHome="http://cglib.sourceforge.net/"
|
||||
description="Code Generation Library with no dependencies"
|
||||
scm=":ext:cvs.devel.redhat.com:/cvs/dist/cglib"
|
||||
tag="@TAG@">
|
||||
<!-- Built using JDK 1.4 -->
|
||||
<!-- These are equivalent to cglib-nodep.jar -->
|
||||
<artifact id="cglib.jar"/>
|
||||
<export>
|
||||
<include input="cglib.jar"/>
|
||||
</export>
|
||||
</component>
|
||||
</project>
|
@ -1,50 +0,0 @@
|
||||
Casuarinaceae
|
||||
hylomorphic
|
||||
granitize
|
||||
biddably
|
||||
repulsive
|
||||
amphimictical
|
||||
trio
|
||||
toxodont
|
||||
nonreigning
|
||||
dragbar
|
||||
Moronidae
|
||||
unlanguishing
|
||||
metabolizable
|
||||
Osmerus
|
||||
goran
|
||||
spiritfulness
|
||||
tetrachloromethane
|
||||
baobab
|
||||
caroline
|
||||
radioconductor
|
||||
imband
|
||||
crinoline
|
||||
circummundane
|
||||
incontractile
|
||||
forerank
|
||||
modernization
|
||||
meal
|
||||
fishman
|
||||
underbuy
|
||||
pertain
|
||||
equiped
|
||||
cockal
|
||||
unshrined
|
||||
Harb
|
||||
heterotaxis
|
||||
commensurableness
|
||||
baggy
|
||||
sarcophilous
|
||||
tankard
|
||||
acervuline
|
||||
unverifiably
|
||||
premidnight
|
||||
strangles
|
||||
vitellus
|
||||
Socratean
|
||||
flock
|
||||
scourage
|
||||
feverlike
|
||||
citharist
|
||||
harn
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:652c7533f5c6d4bf66ba13871f70133e9ffdca648e49354cff7f39824282739e
|
||||
size 1610524
|
3
cglib-src-2.2.jar
Normal file
3
cglib-src-2.2.jar
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:762e0214f0d31f224e712a7a5b4768c16ad24741ba98fc2e94715ae390d07fcb
|
||||
size 1520971
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri May 18 13:30:41 UTC 2012 - mvyskocil@suse.cz
|
||||
|
||||
- update to 2.2
|
||||
* MethodProxy thread race patch
|
||||
* Upgrade to ASM 3.1
|
||||
- remove useless repolib, nohook and demo packages
|
||||
- fix build with jdk7
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 28 08:59:32 CEST 2009 - mvyskocil@suse.cz
|
||||
|
||||
|
303
cglib.spec
303
cglib.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package cglib (Version 2.1.3)
|
||||
# spec file for package cglib
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 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,122 +16,35 @@
|
||||
#
|
||||
|
||||
|
||||
%define _with_repolib 1
|
||||
%define _without_hook 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/cglib/%{version}-brew
|
||||
%define repodirlib %{repodir}/lib
|
||||
%define repodirsrc %{repodir}/src
|
||||
# If you don't want to build the aspectwerkz hook,
|
||||
# while aspectwerkz isn't available yet,
|
||||
# give rpmbuild option '--without hook'
|
||||
# A cglib without net.sf.cglib.transform.hook.* is useful to
|
||||
# build jmock which is an indirect dependency of cglib itself (through
|
||||
# aspectwerkz).
|
||||
%define with_hook %{!?_without_hook:1}%{?_without_hook:0}
|
||||
%define without_hook %{?_without_hook:1}%{!?_without_hook:0}
|
||||
%define section free
|
||||
%define uscver 2.1_3
|
||||
Summary: Code Generation Library
|
||||
|
||||
Name: cglib
|
||||
Version: 2.1.3
|
||||
Release: 2
|
||||
Summary: Code Generation Library
|
||||
License: Apache-2.0
|
||||
Url: http://cglib.sourceforge.net/
|
||||
Group: Development/Libraries/Java
|
||||
Source0: cglib-src-2.1_3.jar
|
||||
Source1: cglib-missing-words.txt
|
||||
Patch0: cglib-2.1.3-build_xml.patch
|
||||
Patch1: cglib-ExamplePreProcessor.patch
|
||||
# FIXME
|
||||
# Testcase "testFailOnMemoryLeak" fails with java-1.4.2-bea-1.4.2.08-2jpp
|
||||
# producing a LinkageError.
|
||||
# Testcase "testRegisterCallbacks" also fails.
|
||||
# java-1.4.2-sun-1.4.2.10-1jpp and # java-1.4.2-ibm-1.4.2.3-1jpp don't
|
||||
Patch2: cglib-2.1.3-TestEnhancer.patch
|
||||
#Patch3: cglib-2.1.3-TestAll.patch
|
||||
Source2: cglib-component-info.xml
|
||||
BuildRequires: jpackage-utils >= 1.6
|
||||
BuildRequires: ant >= 1.6
|
||||
BuildRequires: ant-junit >= 1.6
|
||||
BuildRequires: jarjar
|
||||
BuildRequires: junit
|
||||
BuildRequires: asm >= 1.5.3
|
||||
BuildRequires: asm2
|
||||
%if %{with_hook}
|
||||
BuildRequires: aspectwerkz >= 1.0
|
||||
%endif
|
||||
BuildRequires: unzip
|
||||
BuildRequires: java-devel
|
||||
Requires: asm >= 1.5.3
|
||||
%if %{with_hook}
|
||||
#Optional: aspectwerkz >= 0:1.0
|
||||
%endif
|
||||
Provides: %{name}-nohook = %{version}-%{release}
|
||||
Version: 2.2
|
||||
Release: 0
|
||||
Url: http://cglib.sourceforge.net/
|
||||
Source0: %{name}-src-%{version}.jar
|
||||
Source1: /%{name}-%{version}.pom
|
||||
# Remove the repackaging step that includes other jars into the final thing
|
||||
Patch0: %{name}-build_xml.patch
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
BuildRequires: ant >= 1.6
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: java-devel >= 1.6.0
|
||||
BuildRequires: objectweb-asm
|
||||
BuildRequires: unzip
|
||||
|
||||
Provides: %{name}-nohook = %{version}-%{release}
|
||||
Obsoletes: %{name}-nohook <= %{version}-%{release}
|
||||
|
||||
%description
|
||||
cglib is a powerful, high performance and quality Code Generation
|
||||
Library, It is used to extend JAVA classes and implements interfaces at
|
||||
runtime.
|
||||
|
||||
NOTE: To use the Aspectwerks hook (net.sf.cglib.transform.hook.*), make
|
||||
sure aspectwerks.jar is in the Classpath (from the 'aspectwerks' RPM)
|
||||
NOTE: If you use the cglib.jar you may need to add asm.jar to your
|
||||
ClassPath (from the 'asm' RPM). The cglib-nodep.jar includes the ASM
|
||||
classes already.
|
||||
|
||||
|
||||
|
||||
%if %{with_repolib}
|
||||
|
||||
%package repolib
|
||||
License: Apache-2.0
|
||||
Summary: Code Generation Library
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description repolib
|
||||
cglib is a powerful, high performance and quality Code Generation
|
||||
Library, It is used to extend JAVA classes and implements interfaces at
|
||||
runtime.
|
||||
|
||||
NOTE: To use the Aspectwerks hook (net.sf.cglib.transform.hook.*), make
|
||||
sure aspectwerks.jar is in the Classpath (from the 'aspectwerks' RPM)
|
||||
NOTE: If you use the cglib.jar you may need to add asm.jar to your
|
||||
ClassPath (from the 'asm' RPM). The cglib-nodep.jar includes the ASM
|
||||
classes already.
|
||||
|
||||
|
||||
|
||||
%endif
|
||||
|
||||
%package nohook
|
||||
License: Apache-2.0
|
||||
Summary: Code Generation Library
|
||||
Group: Development/Libraries/Java
|
||||
Requires: asm >= 1.5.3
|
||||
%if ! %{with_hook}
|
||||
Provides: %{name} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description nohook
|
||||
cglib is a powerful, high performance and quality Code Generation
|
||||
Library, It is used to extend JAVA classes and implements interfaces at
|
||||
runtime.
|
||||
|
||||
NOTE: To use the Aspectwerks hook (net.sf.cglib.transform.hook.*), make
|
||||
sure aspectwerks.jar is in the Classpath (from the 'aspectwerks' RPM)
|
||||
NOTE: If you use the cglib.jar you may need to add asm.jar to your
|
||||
ClassPath (from the 'asm' RPM). The cglib-nodep.jar includes the ASM
|
||||
classes already.
|
||||
|
||||
|
||||
|
||||
%package javadoc
|
||||
License: Apache-2.0
|
||||
Summary: Code Generation Library
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
@ -140,176 +53,48 @@ cglib is a powerful, high performance and quality Code Generation
|
||||
Library, It is used to extend JAVA classes and implements interfaces at
|
||||
runtime.
|
||||
|
||||
NOTE: To use the Aspectwerks hook (net.sf.cglib.transform.hook.*), make
|
||||
sure aspectwerks.jar is in the Classpath (from the 'aspectwerks' RPM)
|
||||
NOTE: If you use the cglib.jar you may need to add asm.jar to your
|
||||
ClassPath (from the 'asm' RPM). The cglib-nodep.jar includes the ASM
|
||||
classes already.
|
||||
|
||||
|
||||
|
||||
%package demo
|
||||
License: Apache-2.0
|
||||
Summary: Code Generation Library
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description demo
|
||||
cglib is a powerful, high performance and quality Code Generation
|
||||
Library, It is used to extend JAVA classes and implements interfaces at
|
||||
runtime.
|
||||
|
||||
NOTE: To use the Aspectwerks hook (net.sf.cglib.transform.hook.*), make
|
||||
sure aspectwerks.jar is in the Classpath (from the 'aspectwerks' RPM)
|
||||
NOTE: If you use the cglib.jar you may need to add asm.jar to your
|
||||
ClassPath (from the 'asm' RPM). The cglib-nodep.jar includes the ASM
|
||||
classes already.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
cat <<EOT
|
||||
If you don't want to build the aspectwerkz hook,
|
||||
while aspectwerkz isn't available yet,
|
||||
give rpmbuild option '--without hook'
|
||||
A cglib without net.sf.cglib.transform.hook.* is useful to
|
||||
build jmock which is an indirect dependency of cglib itself (through
|
||||
aspectwerkz).
|
||||
EOT
|
||||
%setup -T -c -n %{name}
|
||||
unzip -q %{SOURCE0}
|
||||
# remove all binary libs
|
||||
for f in $(find . -name "*.jar"); do mv $f $f.no; done
|
||||
( cat << EO_JP
|
||||
grant codeBase "file:/-"{
|
||||
permission java.security.AllPermission;
|
||||
};
|
||||
EO_JP
|
||||
) > java.policy
|
||||
# add missing test input file
|
||||
cp %{SOURCE1} src/test/net/sf/cglib/util/words.txt
|
||||
%if %{without_hook}
|
||||
rm src/proxy/net/sf/cglib/transform/hook/*
|
||||
rm src/test/net/sf/cglib/transform/hook/*
|
||||
%endif
|
||||
%patch0 -b .sav
|
||||
#test
|
||||
%if %{with_hook}
|
||||
%patch1 -b .sav
|
||||
%endif
|
||||
%patch2 -b .sav
|
||||
#%patch3 -p1
|
||||
rm lib/*.jar
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
build-jar-repository -s -p lib \
|
||||
ant \
|
||||
asm/asm-attrs \
|
||||
asm/asm \
|
||||
asm2/asm2 \
|
||||
asm/asm-util \
|
||||
jarjar \
|
||||
junit
|
||||
%if %{with_hook}
|
||||
build-jar-repository -s -p lib aspectwerkz-core
|
||||
%endif
|
||||
export CLASSPATH=
|
||||
export OPT_JAR_LIST=:
|
||||
ant jar javadoc test
|
||||
%if %{with_hook}
|
||||
mkdir _tmp
|
||||
pushd _tmp
|
||||
jar xf ../dist/%{name}-%{uscver}.jar
|
||||
rm -rf net/sf/cglib/transform/hook
|
||||
jar cmf META-INF/MANIFEST.MF ../dist/%{name}-nohook-%{uscver}.jar net
|
||||
popd
|
||||
rm -rf _tmp
|
||||
%else
|
||||
cp dist/%{name}-%{uscver}.jar dist/%{name}-nohook-%{uscver}.jar
|
||||
%endif
|
||||
export CLASSPATH=`build-classpath objectweb-asm`
|
||||
ant jar javadoc
|
||||
|
||||
%install
|
||||
# jars
|
||||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
||||
cp -p dist/%{name}-nohook-%{uscver}.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/%{name}-nohook-%{version}.jar
|
||||
%if %{with_hook}
|
||||
cp -p dist/%{name}-%{uscver}.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||||
cp -p dist/%{name}-nodep-%{uscver}.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/%{name}-nodep-%{version}.jar
|
||||
%else
|
||||
# avoid conflicts between cglib and cglib-nohook
|
||||
cp -p dist/%{name}-nodep-%{uscver}.jar \
|
||||
$RPM_BUILD_ROOT%{_javadir}/%{name}-nohook-nodep-%{version}.jar
|
||||
%endif
|
||||
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
|
||||
cp -p dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
|
||||
# javadoc
|
||||
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
rmdir docs/api
|
||||
cp -pr docs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
|
||||
#demo
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
|
||||
cp -pr src/proxy/samples $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
|
||||
%if %{with_repolib}
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{repodir}
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{repodirlib}
|
||||
install -p -m 644 %{SOURCE2} $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 %{PATCH1} $RPM_BUILD_ROOT%{repodirsrc}
|
||||
install -p -m 644 %{SOURCE0} $RPM_BUILD_ROOT%{repodirsrc}
|
||||
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{repodirsrc}
|
||||
install -p -m 644 %{PATCH2} $RPM_BUILD_ROOT%{repodirsrc}
|
||||
# Deploy cglib-nodeps.jar as cglib.jar to conform to the existing usage in JBoss
|
||||
%if %{with_hook}
|
||||
cp -p $RPM_BUILD_ROOT%{_javadir}/cglib-nodep.jar $RPM_BUILD_ROOT%{repodirlib}/cglib.jar
|
||||
%else
|
||||
cp -p $RPM_BUILD_ROOT%{_javadir}/cglib-nohook.jar $RPM_BUILD_ROOT%{repodirlib}/cglib.jar
|
||||
%endif
|
||||
%endif
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_javadocdir}/
|
||||
cp -r docs ${RPM_BUILD_ROOT}%{_javadocdir}/%{name}-%{version}
|
||||
|
||||
#maven pom
|
||||
mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir}
|
||||
cp %{SOURCE1} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%add_to_maven_depmap net.sf.cglib %{name} %{version} JPP %{name}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%if %{with_hook}
|
||||
|
||||
%post
|
||||
%update_maven_depmap
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc LICENSE
|
||||
%{_javadir}/%{name}-%{version}.jar
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_javadir}/%{name}-nodep-%{version}.jar
|
||||
%{_javadir}/%{name}-nodep.jar
|
||||
%endif
|
||||
|
||||
%files nohook
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc LICENSE
|
||||
%{_javadir}/%{name}-nohook-%{version}.jar
|
||||
%{_javadir}/%{name}-nohook.jar
|
||||
%if ! %{with_hook}
|
||||
%{_javadir}/%{name}-nohook-nodep*.jar
|
||||
%endif
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE NOTICE
|
||||
%{_javadir}/*.jar
|
||||
%{_mavenpomdir}/*
|
||||
%config(noreplace) %{_mavendepmapfragdir}/%{name}
|
||||
|
||||
%files javadoc
|
||||
%defattr(0644,root,root,0755)
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadocdir}/%{name}-%{version}
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%files demo
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_datadir}/%{name}-%{version}
|
||||
%if %{with_repolib}
|
||||
|
||||
%files repolib
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_javadir}/repository.jboss.com
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Apr 28 2009 mvyskocil@suse.cz
|
||||
- Fixed package descriptions
|
||||
* Thu Apr 23 2009 mvyskocil@suse.cz
|
||||
- Initial packaging of cglib-nohooks in SUSE (2.1.3 from jpp5)
|
||||
|
Loading…
Reference in New Issue
Block a user