Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 658055 Details for
Bug 872103
sigar: Java bindings are missing
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Added java bindings sub package
0001-Added-java-bindings-sub-package.patch (text/plain), 34.96 KB, created by
gil cattaneo
on 2012-12-05 08:36:56 UTC
(
hide
)
Description:
Added java bindings sub package
Filename:
MIME Type:
Creator:
gil cattaneo
Created:
2012-12-05 08:36:56 UTC
Size:
34.96 KB
patch
obsolete
>From 6ccb0d00eb859a7c82f52535a611659e53cc0554 Mon Sep 17 00:00:00 2001 >From: gil <puntogil@libero.it> >Date: Wed, 5 Dec 2012 09:30:20 +0100 >Subject: [PATCH] Added java bindings sub package > >--- > sigar-1.6.5-java_build.patch | 873 ++++++++++++++++++++++++++++++++++++++++++ > sigar-1.6.5.pom | 43 ++ > sigar.spec | 87 ++++- > 3 files changed, 994 insertions(+), 9 deletions(-) > create mode 100644 sigar-1.6.5-java_build.patch > create mode 100644 sigar-1.6.5.pom > >diff --git a/sigar-1.6.5-java_build.patch b/sigar-1.6.5-java_build.patch >new file mode 100644 >index 0000000..0c71d9b >--- /dev/null >+++ b/sigar-1.6.5-java_build.patch >@@ -0,0 +1,873 @@ >+diff -Nru sigar-1.6.5/bindings/java/build.xml sigar-1.6.5-gil/bindings/java/build.xml >+--- sigar-1.6.5/bindings/java/build.xml 2011-04-21 20:38:36.000000000 +0200 >++++ sigar-1.6.5-gil/bindings/java/build.xml 2012-12-05 09:11:27.360092658 +0100 >+@@ -22,7 +22,7 @@ >+ <property name="jni.info.res" location="build/src/sigar.res"/> >+ <property name="jni.libprefix" value=""/> <!-- drop "java" prefix --> >+ <property name="cpptasks.jar" >+- location="hyperic_jni/lib/cpptasks.jar"/> >++ location="/usr/share/java/ant/cpptasks.jar"/> >+ >+ <condition property="file.version" value="-${sigar.version}"> >+ <isset property="file.versioned"/> >+@@ -50,13 +50,15 @@ >+ <property name="sigar.fqdn" value=""/> >+ >+ <path id="libjars"> >+- <fileset dir="lib" includes="*.jar"/> >++ <fileset dir="/usr/share/java" includes="ant/cpptasks.jar"/> >++ <fileset dir="/usr/share/java" includes="mx4j/mx4j-jmx.jar"/> >++ <fileset dir="/usr/share/java" includes="log4j.jar"/> >+ </path> >+ >+ <path id="alljars"> >+ <path refid="libjars"/> >+ <fileset dir="${sigar-bin}/lib" includes="${sigar.jar}"/> >+- <fileset dir="${ant.library.dir}" includes="junit*.jar"/> >++ <fileset dir="/usr/share/java" includes="junit.jar"/> >+ </path> >+ >+ <target name="javadoc_check"> >+@@ -85,7 +87,7 @@ >+ doctitle="Sigar"> >+ <group title="Sigar" packages="org.hyperic.sigar" /> >+ <classpath refid="libjars"/> >+- <classpath><path path="${ant.library.dir}/ant.jar"/></classpath> >++ <classpath><path path="/usr/share/java/ant.jar"/></classpath> >+ <bottom>Copyright © ${copyright.year} <![CDATA[<a target="_top" href="http://www.hyperic.com/">Hyperic</a>]]>. All Rights Reserved.</bottom> >+ </javadoc> >+ </target> >+@@ -96,7 +98,7 @@ >+ <classpath refid="alljars"/> >+ </available> >+ <javac destdir="${build}/classes" >+- source="1.4" target="1.4" >++ source="1.5" target="1.5" >+ sourcepath="" >+ debug="true" >+ classpathref="libjars"> >+diff -Nru sigar-1.6.5/bindings/java/hyperic_jni/jni-build.xml sigar-1.6.5-gil/bindings/java/hyperic_jni/jni-build.xml >+--- sigar-1.6.5/bindings/java/hyperic_jni/jni-build.xml 2011-04-21 20:38:36.000000000 +0200 >++++ sigar-1.6.5-gil/bindings/java/hyperic_jni/jni-build.xml 2012-12-05 09:15:11.564529239 +0100 >+@@ -28,7 +28,7 @@ >+ <property name="jni.libprefix" value="java"/> >+ <property name="jni.libversion" value=""/> >+ >+- <property name="cpptasks.jar" location="lib/cpptasks.jar"/> >++ <property name="cpptasks.jar" location="/usr/share/java/cpptasks.jar"/> >+ >+ <taskdef name="cc" classname="net.sf.antcontrib.cpptasks.CCTask"> >+ <classpath location="${cpptasks.jar}"/> >+@@ -60,7 +60,7 @@ >+ <condition property="linux"> >+ <equals arg1="${os.name}" arg2="Linux"/> >+ </condition> >+- <condition property="solaris"> >++ <!--condition property="solaris"> >+ <equals arg1="${os.name}" arg2="SunOS"/> >+ </condition> >+ <condition property="win32"> >+@@ -86,13 +86,13 @@ >+ </condition> >+ <condition property="osf1"> >+ <equals arg1="${os.name}" arg2="OSF1"/> >+- </condition> >++ </condition--> >+ >+ <condition property="jni.os" value="linux"> >+ <isset property="linux"/> >+ </condition> >+ >+- <condition property="jni.os" value="win32"> >++ <!--condition property="jni.os" value="win32"> >+ <isset property="win32"/> >+ </condition> >+ >+@@ -122,10 +122,10 @@ >+ >+ <condition property="jni.os" value="netbsd"> >+ <isset property="netbsd"/> >+- </condition> >++ </condition--> >+ >+ <!-- darwin and freebsd use the same source files --> >+- <condition property="jni.src" value="darwin"> >++ <!--condition property="jni.src" value="darwin"> >+ <isset property="freebsd"/> >+ </condition> >+ <condition property="jni.src" value="darwin"> >+@@ -137,7 +137,7 @@ >+ >+ <condition property="jni.os" value="osf1"> >+ <isset property="osf1"/> >+- </condition> >++ </condition--> >+ >+ <condition property="jni.jdk.os" value="${jni.os}"> >+ <and> >+@@ -146,13 +146,13 @@ >+ </and> >+ </condition> >+ >+- <condition property="jni.jdk.os" value="hp-ux"> >++ <!--condition property="jni.jdk.os" value="hp-ux"> >+ <istrue value="${hpux}"/> >+ </condition> >+ >+ <condition property="jni.jdk.os" value="alpha"> >+ <istrue value="${osf1}"/> >+- </condition> >++ </condition--> >+ >+ <condition property="jni.src" value="${jni.os}"> >+ <isfalse value="${jni.src}"/> >+@@ -161,7 +161,7 @@ >+ <echo message="jni.src=${jni.src}, jni.jdk.os=${jni.jdk.os}, ${sun.arch.data.model}-bit"/> >+ >+ <javac srcdir="${jni.src.java}" destdir="${build}/classes" debug="true" >+- source="1.4" target="1.4" >++ source="1.5" target="1.5" >+ includes="org/hyperic/jni/*.java"/> >+ >+ <taskdef name="libarch" classname="org.hyperic.jni.ArchNameTask"> >+@@ -190,9 +190,9 @@ >+ >+ <property name="jni.objdir" value="${build}/obj/${jni.libarch}"/> >+ >+- <condition property="jni.cc" value="uni-cc"> >++ <!--condition property="jni.cc" value="uni-cc"> >+ <isset property="darwin"/> >+- </condition> >++ </condition--> >+ >+ <property name="jni.cc" value="jni-cc"/> >+ >+@@ -225,19 +225,19 @@ >+ </target> >+ >+ <!-- run jni-cc twice {ppc,i386}, then feed both to lipo to build a universal binary --> >+- <target name="uni-cc" if="jni.libarch"> >+- <property name="shlib" value="${jni.objdir}/lib/lib${jni.libname}.dylib"/> >++ <!--target name="uni-cc" if="jni.libarch"> >++ <property name="shlib" value="${jni.objdir}/lib/lib${jni.libname}.dylib"/--> >+ >+ <!-- ppc --> >+- <echo message="build 'ppc' arch"/> >++ <!--echo message="build 'ppc' arch"/> >+ <antcall target="jni-cc" inheritRefs="true"> >+ <param name="uni.arch" value="ppc"/> >+ </antcall> >+ >+- <copy file="${shlib}" tofile="${shlib}.ppc"/> >++ <copy file="${shlib}" tofile="${shlib}.ppc"/--> >+ >+ <!-- i386 --> >+- <echo message="build 'i386' arch"/> >++ <!--echo message="build 'i386' arch"/> >+ <delete> >+ <fileset dir="${jni.objdir}" includes="*.o"/> >+ </delete> >+@@ -256,7 +256,7 @@ >+ <delete> >+ <fileset dir="${jni.objdir}/lib" includes="*.ppc,*.i386"/> >+ </delete> >+- </target> >++ </target--> >+ >+ <target name="jni-cc" if="jni.libarch"> >+ <mkdir dir="${jni.objdir}/lib"/> >+@@ -270,7 +270,7 @@ >+ relentless="false"> >+ >+ <!-- HPUX --> >+- <compiler name="hp" if="hpux"> >++ <!--compiler name="hp" if="hpux"> >+ <compilerarg value="+Z"/> >+ <compilerarg value="+DD64" if="jni.arch64"/> >+ >+@@ -288,10 +288,10 @@ >+ >+ <syslibset libs="nsl"/> >+ <syslibset libs="nm"/> >+- </linker> >++ </linker--> >+ >+ <!-- Solaris --> >+- <compiler name="gcc" if="solaris"> >++ <!--compiler name="gcc" if="solaris"> >+ <compilerarg value="-O2" if="jni.optim"/> >+ <compilerarg value="-g" if="jni.debug"/> >+ <compilerarg value="-Wall"/> >+@@ -303,12 +303,12 @@ >+ <define name="_POSIX_PTHREAD_SEMANTICS"/> >+ <define name="DMALLOC" if="jni.dmalloc"/> >+ </defineset> >+- </compiler> >++ </compiler--> >+ >+- <linker name="gcc" if="solaris"> >++ <!--linker name="gcc" if="solaris"--> >+ <!-- required for modern gcc to avoid libgcc_s.so dependency --> >+ <!-- this arg is ignored by older gcc --> >+- <linkerarg value="-static-libgcc"/> >++ <!--linkerarg value="-static-libgcc"/> >+ <linkerarg value="-m64" if="jni.arch64"/> >+ >+ <libset if="jni.libset.libs" >+@@ -317,7 +317,7 @@ >+ <libset if="jni.dmalloc" >+ dir="${jni.dmalloc}/lib" >+ libs="dmallocth"/> >+- </linker> >++ </linker--> >+ >+ <!-- Linux --> >+ <compiler name="gcc" debug="${jni.debug}" if="linux"> >+@@ -344,7 +344,7 @@ >+ </linker> >+ >+ <!-- Darwin --> >+- <compiler name="gcc" if="darwin"> >++ <!--compiler name="gcc" if="darwin"> >+ <compilerarg value="-Wall"/> >+ <compilerarg value="-Werror" if="jni.werror"/> >+ <compilerarg value="-m64" if="jni.arch64"/> >+@@ -369,10 +369,10 @@ >+ <linkerarg value="-Wl,-syslibroot,${uni.sdk}"/> >+ <linkerarg value="-arch"/> >+ <linkerarg value="${uni.arch}"/> >+- <linkerarg value="-mmacosx-version-min=${osx.min}"/> >++ <linkerarg value="-mmacosx-version-min=${osx.min}"/--> >+ >+ <!-- for Gestalt() --> >+- <linkerarg value="-framework"/> >++ <!--linkerarg value="-framework"/> >+ <linkerarg value="CoreServices"/> >+ >+ <linkerarg value="-sectcreate,__TEXT,__info_plist,${jni.info.plist}" if="jni.info.plist"/> >+@@ -382,10 +382,10 @@ >+ libs="${jni.libset.libs}"/> >+ >+ <syslibset libs="IOKit"/> >+- </linker> >++ </linker--> >+ >+ <!-- Freebsd --> >+- <compiler name="gcc" if="freebsd"> >++ <!--compiler name="gcc" if="freebsd"> >+ <compilerarg value="-O2" if="jni.optim"/> >+ <compilerarg value="-g" if="jni.debug"/> >+ <compilerarg value="-Wall"/> >+@@ -400,15 +400,15 @@ >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+ <syslibset libs="kvm"/> >+- </linker> >++ </linker--> >+ >+ <!-- OpenBSD --> >+- <compiler name="gcc" if="openbsd"> >++ <!--compiler name="gcc" if="openbsd"> >+ <compilerarg value="-O2" if="jni.optim"/> >+ <compilerarg value="-g" if="jni.debug"/> >+- <compilerarg value="-Wall"/> >++ <compilerarg value="-Wall"/--> >+ <!-- <compilerarg value="-Werror" if="jni.werror"/> --> >+- <defineset> >++ <!--defineset> >+ <define name="${jni.define.name}_OPENBSD"/> >+ </defineset> >+ </compiler> >+@@ -418,15 +418,15 @@ >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+ <syslibset libs="kvm"/> >+- </linker> >++ </linker--> >+ >+ <!-- NetBSD --> >+- <compiler name="gcc" if="netbsd"> >++ <!--compiler name="gcc" if="netbsd"> >+ <compilerarg value="-O2" if="jni.optim"/> >+ <compilerarg value="-g" if="jni.debug"/> >+- <compilerarg value="-Wall"/> >++ <compilerarg value="-Wall"/--> >+ <!-- <compilerarg value="-Werror" if="jni.werror"/> --> >+- <defineset> >++ <!--defineset> >+ <define name="${jni.define.name}_NETBSD"/> >+ </defineset> >+ </compiler> >+@@ -436,10 +436,10 @@ >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+ <syslibset libs="kvm"/> >+- </linker> >++ </linker--> >+ >+ <!-- AIX --> >+- <compiler name="xlc_r" if="aix"> >++ <!--compiler name="xlc_r" if="aix"> >+ <compilerarg value="-q64" if="jni.arch64"/> >+ <defineset> >+ <define name="${jni.define.name}_AIX"/> >+@@ -454,10 +454,10 @@ >+ <libset if="jni.libset.libs" >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+- </linker> >++ </linker--> >+ >+ <!-- WIN32 --> >+- <linker name="msvc" debug="${jni.debug}" if="win32"> >++ <!--linker name="msvc" debug="${jni.debug}" if="win32"> >+ <libset if="jni.libset.libs" >+ dir="${jni.libset.dir}" >+ libs="${jni.libset.libs}"/> >+@@ -470,14 +470,14 @@ >+ <compiler name="msvc" debug="${jni.debug}" if="win32"> >+ <defineset> >+ <define name="WIN32"/> >+- <define name="_CRT_SECURE_NO_DEPRECATE"/> >++ <define name="_CRT_SECURE_NO_DEPRECATE"/--> >+ <!-- XXX 2008 MSC express/SDK does not include atl headers --> >+- <define name="SIGAR_NO_ATL" if="jni.noatl"/> >++ <!--define name="SIGAR_NO_ATL" if="jni.noatl"/> >+ </defineset> >+- </compiler> >++ </compiler--> >+ >+ <!-- OSF1 --> >+- <compiler name="gcc" if="osf1"> >++ <!--compiler name="gcc" if="osf1"> >+ <compilerarg value="-Wall"/> >+ <compilerarg value="-pthread"/> >+ <defineset> >+@@ -491,7 +491,7 @@ >+ libs="${jni.libset.libs}"/> >+ >+ <syslibset libs="mach"/> >+- </linker> >++ </linker--> >+ >+ <!-- C sources --> >+ <fileset dir="${jni.source.dir}"> >+diff -Nru sigar-1.6.5/bindings/java/hyperic_jni/jni-build.xml~ sigar-1.6.5-gil/bindings/java/hyperic_jni/jni-build.xml~ >+--- sigar-1.6.5/bindings/java/hyperic_jni/jni-build.xml~ 1970-01-01 01:00:00.000000000 +0100 >++++ sigar-1.6.5-gil/bindings/java/hyperic_jni/jni-build.xml~ 2012-12-05 09:15:11.549530136 +0100 >+@@ -0,0 +1,515 @@ >++<!-- >++ >++ Copyright (c) 2009 Hyperic, Inc. >++ Copyright (c) 2009 SpringSource, Inc. >++ Copyright (c) 2009-2010 VMware, Inc. >++ >++ Licensed under the Apache License, Version 2.0 (the "License"); >++ you may not use this file except in compliance with the License. >++ You may obtain a copy of the License at >++ >++ http://www.apache.org/licenses/LICENSE-2.0 >++ >++ Unless required by applicable law or agreed to in writing, software >++ distributed under the License is distributed on an "AS IS" BASIS, >++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. >++ See the License for the specific language governing permissions and >++ limitations under the License. >++ >++--> >++ >++ <property environment="env"/> >++ >++ <property name="build" location="build"/> >++ <property name="jni.bin" location="${build}"/> >++ <property name="jni.define.name" value="JNI"/> >++ <property name="jni.source.dir" value="src"/> >++ <property name="jni.src.java" value="src"/> >++ <property name="jni.libprefix" value="java"/> >++ <property name="jni.libversion" value=""/> >++ >++ <property name="cpptasks.jar" location="/usr/share/java/cpptasks.jar"/> >++ >++ <taskdef name="cc" classname="net.sf.antcontrib.cpptasks.CCTask"> >++ <classpath location="${cpptasks.jar}"/> >++ </taskdef> >++ >++ <target name="jni-init"> >++ <mkdir dir="${build}/classes"/> >++ >++ <available property="libproc.h" file="/usr/include/libproc.h"/> >++ >++ <condition property="jni.debug" value="true"> >++ <isset property="jni.dmalloc"/> >++ </condition> >++ >++ <condition property="jni.optim" value="true"> >++ <not> >++ <istrue value="${jni.debug}"/> >++ </not> >++ </condition> >++ >++ <condition property="static.gcc"> >++ <os arch="i386"/><!-- only for x86 solaris --> >++ </condition> >++ >++ <condition property="jni.javahome" value="${env.JAVA_HOME}"> >++ <isset property="env.JAVA_HOME"/> >++ </condition> >++ >++ <condition property="linux"> >++ <equals arg1="${os.name}" arg2="Linux"/> >++ </condition> >++ <!--condition property="solaris"> >++ <equals arg1="${os.name}" arg2="SunOS"/> >++ </condition> >++ <condition property="win32"> >++ <os family="windows"/> >++ </condition> >++ <condition property="hpux"> >++ <equals arg1="${os.name}" arg2="HP-UX"/> >++ </condition> >++ <condition property="aix"> >++ <equals arg1="${os.name}" arg2="AIX"/> >++ </condition> >++ <condition property="darwin"> >++ <equals arg1="${os.name}" arg2="Mac OS X"/> >++ </condition> >++ <condition property="freebsd"> >++ <equals arg1="${os.name}" arg2="FreeBSD"/> >++ </condition> >++ <condition property="openbsd"> >++ <equals arg1="${os.name}" arg2="OpenBSD"/> >++ </condition> >++ <condition property="netbsd"> >++ <equals arg1="${os.name}" arg2="NetBSD"/> >++ </condition> >++ <condition property="osf1"> >++ <equals arg1="${os.name}" arg2="OSF1"/> >++ </condition--> >++ >++ <condition property="jni.os" value="linux"> >++ <isset property="linux"/> >++ </condition> >++ >++ <!--condition property="jni.os" value="win32"> >++ <isset property="win32"/> >++ </condition> >++ >++ <condition property="jni.os" value="solaris"> >++ <isset property="solaris"/> >++ </condition> >++ >++ <condition property="jni.os" value="aix"> >++ <isset property="aix"/> >++ </condition> >++ >++ <condition property="jni.os" value="hpux"> >++ <isset property="hpux"/> >++ </condition> >++ >++ <condition property="jni.os" value="darwin"> >++ <isset property="darwin"/> >++ </condition> >++ >++ <condition property="jni.os" value="freebsd"> >++ <isset property="freebsd"/> >++ </condition> >++ >++ <condition property="jni.os" value="openbsd"> >++ <isset property="openbsd"/> >++ </condition> >++ >++ <condition property="jni.os" value="netbsd"> >++ <isset property="netbsd"/> >++ </condition--> >++ >++ <!-- darwin and freebsd use the same source files --> >++ <!--condition property="jni.src" value="darwin"> >++ <isset property="freebsd"/> >++ </condition> >++ <condition property="jni.src" value="darwin"> >++ <isset property="openbsd"/> >++ </condition> >++ <condition property="jni.src" value="darwin"> >++ <isset property="netbsd"/> >++ </condition> >++ >++ <condition property="jni.os" value="osf1"> >++ <isset property="osf1"/> >++ </condition--> >++ >++ <condition property="jni.jdk.os" value="${jni.os}"> >++ <!--and> >++ <isfalse value="${hpux}"/> >++ <isfalse value="${osf1}"/> >++ </and--> >++ </condition> >++ >++ <!--condition property="jni.jdk.os" value="hp-ux"> >++ <istrue value="${hpux}"/> >++ </condition> >++ >++ <condition property="jni.jdk.os" value="alpha"> >++ <istrue value="${osf1}"/> >++ </condition--> >++ >++ <condition property="jni.src" value="${jni.os}"> >++ <isfalse value="${jni.src}"/> >++ </condition> >++ >++ <echo message="jni.src=${jni.src}, jni.jdk.os=${jni.jdk.os}, ${sun.arch.data.model}-bit"/> >++ >++ <javac srcdir="${jni.src.java}" destdir="${build}/classes" debug="true" >++ source="1.5" target="1.5" >++ includes="org/hyperic/jni/*.java"/> >++ >++ <taskdef name="libarch" classname="org.hyperic.jni.ArchNameTask"> >++ <classpath location="${build}/classes"/> >++ </taskdef> >++ <taskdef name="copydep" classname="org.hyperic.jni.CopyDependsTask"> >++ <classpath location="${build}/classes"/> >++ </taskdef> >++ >++ <libarch/> >++ >++ <echo>java.home=${jni.javahome}</echo> >++ >++ <checksum file="${jni.javahome}/include/jni.h" property="jni.md5"/> >++ >++ <property name="jni.project.archname" >++ value="${project.name}-${jni.libarch}"/> >++ >++ <condition property="jni.libname" >++ value="${jni.libprefix}${jni.project.archname}${jni.libversion}"> >++ <isfalse value="${jni.libname}"/> >++ </condition> >++ >++ <property name="jni.libname.full" >++ value="${jni.libpre}${jni.libname}${jni.libext}"/> >++ >++ <property name="jni.objdir" value="${build}/obj/${jni.libarch}"/> >++ >++ <!--condition property="jni.cc" value="uni-cc"> >++ <isset property="darwin"/> >++ </condition--> >++ >++ <property name="jni.cc" value="jni-cc"/> >++ >++ <condition property="cc.runtime" value="static"> >++ <isset property="win32"/> >++ </condition> >++ <condition property="cc.runtime" value="dynamic"> >++ <not> >++ <isset property="win32"/> >++ </not> >++ </condition> >++ </target> >++ >++ <target name="jni-lib-copy" if="jni.libarch"> >++ <mkdir dir="${jni.bin}/lib"/> >++ >++ <copy toDir="${jni.bin}/lib" overwrite="true"> >++ <fileset dir="${jni.objdir}/lib"/> >++ </copy> >++ >++ <chmod perm="a+x"> >++ <fileset dir="${jni.bin}/lib"> >++ <include name="*.sl"/> >++ </fileset> >++ </chmod> >++ </target> >++ >++ <target name="jni-compile" if="jni.libarch"> >++ <antcall target="${jni.cc}" inheritRefs="true"/> >++ </target> >++ >++ <!-- run jni-cc twice {ppc,i386}, then feed both to lipo to build a universal binary --> >++ <!--target name="uni-cc" if="jni.libarch"> >++ <property name="shlib" value="${jni.objdir}/lib/lib${jni.libname}.dylib"/--> >++ >++ <!-- ppc --> >++ <!--echo message="build 'ppc' arch"/> >++ <antcall target="jni-cc" inheritRefs="true"> >++ <param name="uni.arch" value="ppc"/> >++ </antcall> >++ >++ <copy file="${shlib}" tofile="${shlib}.ppc"/--> >++ >++ <!-- i386 --> >++ <!--echo message="build 'i386' arch"/> >++ <delete> >++ <fileset dir="${jni.objdir}" includes="*.o"/> >++ </delete> >++ >++ <antcall target="jni-cc" inheritRefs="true"> >++ <param name="uni.arch" value="i386"/> >++ </antcall> >++ >++ <copy file="${shlib}" tofile="${shlib}.i386"/> >++ >++ <echo message="lipo 'ppc'+'i386'"/> >++ <exec executable="lipo"> >++ <arg line="-create ${shlib}.ppc ${shlib}.i386 -output ${jni.objdir}/lib/lib${jni.libname}.dylib"/> >++ </exec> >++ >++ <delete> >++ <fileset dir="${jni.objdir}/lib" includes="*.ppc,*.i386"/> >++ </delete> >++ </target--> >++ >++ <target name="jni-cc" if="jni.libarch"> >++ <mkdir dir="${jni.objdir}/lib"/> >++ >++ <echo message="jni libname=${jni.libname}"/> >++ >++ <cc outtype="shared" >++ outfile="${jni.objdir}/lib/${jni.libname}" >++ objdir="${jni.objdir}" >++ runtime="${cc.runtime}" >++ relentless="false"> >++ >++ <!-- HPUX --> >++ <!--compiler name="hp" if="hpux"> >++ <compilerarg value="+Z"/> >++ <compilerarg value="+DD64" if="jni.arch64"/> >++ >++ <defineset> >++ <define name="${jni.define.name}_HPUX"/> >++ <define name="_HPUX_SOURCE"/> >++ <define name="_REENTRANT"/> >++ </defineset> >++ </compiler> >++ >++ <linker name="hp" if="hpux"> >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ >++ <syslibset libs="nsl"/> >++ <syslibset libs="nm"/> >++ </linker--> >++ >++ <!-- Solaris --> >++ <!--compiler name="gcc" if="solaris"> >++ <compilerarg value="-O2" if="jni.optim"/> >++ <compilerarg value="-g" if="jni.debug"/> >++ <compilerarg value="-Wall"/> >++ <compilerarg value="-Werror" if="jni.werror"/> >++ <compilerarg value="-m64" if="jni.arch64"/> >++ <defineset> >++ <define name="${jni.define.name}_SOLARIS"/> >++ <define name="_REENTRANT"/> >++ <define name="_POSIX_PTHREAD_SEMANTICS"/> >++ <define name="DMALLOC" if="jni.dmalloc"/> >++ </defineset> >++ </compiler--> >++ >++ <!--linker name="gcc" if="solaris"--> >++ <!-- required for modern gcc to avoid libgcc_s.so dependency --> >++ <!-- this arg is ignored by older gcc --> >++ <!--linkerarg value="-static-libgcc"/> >++ <linkerarg value="-m64" if="jni.arch64"/> >++ >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ <libset if="jni.dmalloc" >++ dir="${jni.dmalloc}/lib" >++ libs="dmallocth"/> >++ </linker--> >++ >++ <!-- Linux --> >++ <compiler name="gcc" debug="${jni.debug}" if="linux"> >++ <compilerarg value="-O2" if="jni.optim"/> >++ <compilerarg value="-g" if="jni.debug"/> >++ <compilerarg value="-Wall"/> >++ <compilerarg value="-Werror" if="jni.werror"/> >++ <compilerarg value="${jni.gccm}" if="jni.gccm"/> >++ <defineset> >++ <define name="${jni.define.name}_LINUX"/> >++ <define name="_REENTRANT"/> >++ <define name="DMALLOC" if="jni.dmalloc"/> >++ </defineset> >++ </compiler> >++ >++ <linker name="gcc" if="linux"> >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ <libset if="jni.dmalloc" >++ dir="${jni.dmalloc}/lib" >++ libs="dmallocth"/> >++ <linkerarg value="${jni.gccm}" if="jni.gccm"/> >++ </linker> >++ >++ <!-- Darwin --> >++ <!--compiler name="gcc" if="darwin"> >++ <compilerarg value="-Wall"/> >++ <compilerarg value="-Werror" if="jni.werror"/> >++ <compilerarg value="-m64" if="jni.arch64"/> >++ <compilerarg value="-O2" if="jni.optim"/> >++ <compilerarg value="-g" if="jni.debug"/> >++ <compilerarg value="-isysroot"/> >++ <compilerarg value="${uni.sdk}"/> >++ <compilerarg value="-arch"/> >++ <compilerarg value="${uni.arch}"/> >++ <compilerarg value="-mmacosx-version-min=${osx.min}"/> >++ >++ <sysincludepath location="/Developer/Headers/FlatCarbon"/> >++ >++ <defineset> >++ <define name="DARWIN"/> >++ <define name="DARWIN_HAS_LIBPROC_H" if="libproc.h"/> >++ </defineset> >++ </compiler> >++ >++ <linker name="gcc" if="darwin"> >++ <linkerarg value="-m64" if="jni.arch64"/> >++ <linkerarg value="-Wl,-syslibroot,${uni.sdk}"/> >++ <linkerarg value="-arch"/> >++ <linkerarg value="${uni.arch}"/> >++ <linkerarg value="-mmacosx-version-min=${osx.min}"/--> >++ >++ <!-- for Gestalt() --> >++ <!--linkerarg value="-framework"/> >++ <linkerarg value="CoreServices"/> >++ >++ <linkerarg value="-sectcreate,__TEXT,__info_plist,${jni.info.plist}" if="jni.info.plist"/> >++ >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ >++ <syslibset libs="IOKit"/> >++ </linker--> >++ >++ <!-- Freebsd --> >++ <!--compiler name="gcc" if="freebsd"> >++ <compilerarg value="-O2" if="jni.optim"/> >++ <compilerarg value="-g" if="jni.debug"/> >++ <compilerarg value="-Wall"/> >++ <compilerarg value="-Werror" if="jni.werror"/> >++ <defineset> >++ <define name="${jni.define.name}_FREEBSD"/> >++ </defineset> >++ </compiler> >++ >++ <linker name="gcc" if="freebsd"> >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ <syslibset libs="kvm"/> >++ </linker--> >++ >++ <!-- OpenBSD --> >++ <!--compiler name="gcc" if="openbsd"> >++ <compilerarg value="-O2" if="jni.optim"/> >++ <compilerarg value="-g" if="jni.debug"/> >++ <compilerarg value="-Wall"/--> >++ <!-- <compilerarg value="-Werror" if="jni.werror"/> --> >++ <!--defineset> >++ <define name="${jni.define.name}_OPENBSD"/> >++ </defineset> >++ </compiler> >++ >++ <linker name="gcc" if="openbsd"> >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ <syslibset libs="kvm"/> >++ </linker--> >++ >++ <!-- NetBSD --> >++ <!--compiler name="gcc" if="netbsd"> >++ <compilerarg value="-O2" if="jni.optim"/> >++ <compilerarg value="-g" if="jni.debug"/> >++ <compilerarg value="-Wall"/--> >++ <!-- <compilerarg value="-Werror" if="jni.werror"/> --> >++ <!--defineset> >++ <define name="${jni.define.name}_NETBSD"/> >++ </defineset> >++ </compiler> >++ >++ <linker name="gcc" if="netbsd"> >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ <syslibset libs="kvm"/> >++ </linker--> >++ >++ <!-- AIX --> >++ <!--compiler name="xlc_r" if="aix"> >++ <compilerarg value="-q64" if="jni.arch64"/> >++ <defineset> >++ <define name="${jni.define.name}_AIX"/> >++ <define name="_ALL_SOURCE"/> >++ <define name="_ANSI_C_SOURCE"/> >++ <define name="_POSIX_SOURCE"/> >++ </defineset> >++ </compiler> >++ >++ <linker name="xlc_r" if="aix"> >++ <linkerarg value="-b64" if="jni.arch64"/> >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ </linker--> >++ >++ <!-- WIN32 --> >++ <!--linker name="msvc" debug="${jni.debug}" if="win32"> >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ >++ <linkerarg value="/MACHINE:X64" if="jni.arch64"/> >++ <linkerarg value="${jni.info.res}" if="jni.info.res"/> >++ <syslibset libs="kernel32,user32,advapi32,ws2_32,netapi32,shell32,pdh,version"/> >++ </linker> >++ >++ <compiler name="msvc" debug="${jni.debug}" if="win32"> >++ <defineset> >++ <define name="WIN32"/> >++ <define name="_CRT_SECURE_NO_DEPRECATE"/--> >++ <!-- XXX 2008 MSC express/SDK does not include atl headers --> >++ <!--define name="SIGAR_NO_ATL" if="jni.noatl"/> >++ </defineset> >++ </compiler--> >++ >++ <!-- OSF1 --> >++ <!--compiler name="gcc" if="osf1"> >++ <compilerarg value="-Wall"/> >++ <compilerarg value="-pthread"/> >++ <defineset> >++ <define name="${jni.define.name}_OSF1"/> >++ </defineset> >++ </compiler> >++ >++ <linker name="gcc" if="osf1"> >++ <libset if="jni.libset.libs" >++ dir="${jni.libset.dir}" >++ libs="${jni.libset.libs}"/> >++ >++ <syslibset libs="mach"/> >++ </linker--> >++ >++ <!-- C sources --> >++ <fileset dir="${jni.source.dir}"> >++ <patternset refid="jni.source.files"/> >++ </fileset> >++ >++ <includepath> >++ <path refid="jni.include.dirs"/> >++ </includepath> >++ >++ <sysincludepath location="${jni.javahome}/include"/> >++ <sysincludepath location="${jni.javahome}/include/${jni.jdk.os}"/> >++ <sysincludepath location="${jni.dmalloc}/include" >++ if="jni.dmalloc"/> >++ </cc> >++ </target> >++ >++ <target name="jni-clean"> >++ <delete dir="${jni.objdir}"/> >++ </target> >++ >diff --git a/sigar-1.6.5.pom b/sigar-1.6.5.pom >new file mode 100644 >index 0000000..0a8c9cc >--- /dev/null >+++ b/sigar-1.6.5.pom >@@ -0,0 +1,43 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" >+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >+ <modelVersion>4.0.0</modelVersion> >+ >+ <parent> >+ <groupId>org.fusesource</groupId> >+ <artifactId>fusesource-pom</artifactId> >+ <version>1.5</version> >+ </parent> >+ >+ <groupId>org.fusesource</groupId> >+ <artifactId>sigar</artifactId> >+ <version>1.6.5</version> >+ >+ <dependencies> >+ <dependency> >+ <groupId>log4j</groupId> >+ <artifactId>log4j</artifactId> >+ <version>1.2.15</version> >+ <scope>compile</scope> >+ <exclusions> >+ <exclusion> >+ <groupId>javax.mail</groupId> >+ <artifactId>mail</artifactId> >+ </exclusion> >+ <exclusion> >+ <groupId>javax.jms</groupId> >+ <artifactId>jms</artifactId> >+ </exclusion> >+ <exclusion> >+ <groupId>com.sun.jdmk</groupId> >+ <artifactId>jmxtools</artifactId> >+ </exclusion> >+ <exclusion> >+ <groupId>com.sun.jmx</groupId> >+ <artifactId>jmxri</artifactId> >+ </exclusion> >+ </exclusions> >+ </dependency> >+ </dependencies> >+ >+</project> >diff --git a/sigar.spec b/sigar.spec >index a1d7c3d..5c659d0 100644 >--- a/sigar.spec >+++ b/sigar.spec >@@ -1,11 +1,11 @@ >-Name: sigar >-Version: 1.6.5 >-Release: 0.7.git58097d9%{?dist} >-Summary: System Information Gatherer And Reporter > > %global sigar_suffix 0-g4b67f57 > %global sigar_hash 58097d9 > >+Name: sigar >+Version: 1.6.5 >+Release: 0.8.git58097d9%{?dist} >+Summary: System Information Gatherer And Reporter > Group: System Environment/Libraries > License: ASL 2.0 > URL: http://sigar.hyperic.com/ >@@ -20,14 +20,26 @@ URL: http://sigar.hyperic.com/ > # > # The diff from 1.6.4 is too huge to contemplate cherrypicking from > Source0: %{name}-%{version}-%{sigar_hash}.tbz2 >- >-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) >+# originally taken from http://repo1.maven.org/maven2/org/fusesource/sigar/1.6.4/sigar-1.6.4.pom >+Source1: %{name}-%{version}.pom > > BuildRequires: gcc cmake >+BuildRequires: cpptasks >+# BuildRequires: fusesource-pom >+BuildRequires: java-devel >+BuildRequires: jpackage-utils >+BuildRequires: ant >+BuildRequires: log4j >+BuildRequires: mx4j > > Patch100: bz714249-1-cpu-count.patch > Patch101: bz746288-1-cpu-count-arch.patch > >+# use system libraries >+# build only linux jni libraries >+Patch120: %{name}-%{version}-java_build.patch >+ >+ > %description > The Sigar API provides a portable interface for gathering system > information such as: >@@ -54,6 +66,26 @@ Requires: %{name} = %{version}-%{release} > %description devel > Header files for developing against the Sigar API > >+%package java >+License: ASL 2.0 >+Group: Development/Libraries >+Summary: SIGAR Java bindings - System Information Gatherer And Reporter >+Requires: %{name} = %{version}-%{release} >+Requires: java >+Requires: jpackage-utils >+Requires: log4j >+ >+%description java >+This package contains the Java bindings SIGAR. >+ >+%package javadoc >+Group: Documentation >+Summary: Javadoc for %{name}-java >+Requires: jpackage-utils >+ >+%description javadoc >+This package contains javadoc for %{name}-java. >+ > %prep > # When using the GitHub tarballs, use: > # setup -q -n hyperic-{name}-{sigar_hash} >@@ -62,6 +94,11 @@ Header files for developing against the Sigar API > %patch100 -p1 -b .bz714249 > %patch101 -p1 -b .bz746288 > >+%patch120 -p1 >+# clean up >+find . -name "*.class" -delete >+find . -name "*.jar" -delete >+ > %build > > # Fix lib directory >@@ -73,15 +110,32 @@ pushd build > make %{?_smp_mflags} > popd > >+pushd bindings/java >+%ant build javadoc >+popd >+ > %install >-rm -rf $RPM_BUILD_ROOT > pushd build > %cmake .. > make install DESTDIR=$RPM_BUILD_ROOT > popd > >-%clean >-rm -rf $RPM_BUILD_ROOT >+pushd bindings/java >+mkdir -p %{buildroot}%{_libdir}/%{name} >+mkdir -p %{buildroot}%{_jnidir} >+install -m 644 %{name}-bin/lib/%{name}.jar %{buildroot}%{_libdir}/%{name}/%{name}.jar >+ln -s ../%{name}/%{name}.jar %{buildroot}%{_jnidir}/ >+ >+install -pm 755 %{name}-bin/lib/libsigar-*.so \ >+ %{buildroot}%{_libdir}/%{name}/ >+ >+mkdir -p %{buildroot}%{_mavenpomdir} >+install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom >+%add_maven_depmap JPP-%{name}.pom %{name}.jar >+ >+mkdir -p %{buildroot}%{_javadocdir}/%{name} >+cp -rp build/javadoc/* %{buildroot}%{_javadocdir}/%{name} >+popd > > %post -p /sbin/ldconfig > >@@ -97,7 +151,22 @@ rm -rf $RPM_BUILD_ROOT > %{_includedir}/sigar*.h > %doc LICENSE NOTICE AUTHORS > >+%files java >+%{_libdir}/%{name}/* >+%{_jnidir}/* >+%{_mavenpomdir}/JPP-%{name}.pom >+%{_mavendepmapfragdir}/%{name} >+%doc LICENSE NOTICE bindings/java/examples >+ >+%files javadoc >+%{_javadocdir}/%{name} >+%doc LICENSE NOTICE >+ > %changelog >+* Tue Dec 04 2012 gil cattaneo <puntogil@libero.it> - 1.6.5-0.8.git58097d9 >+- Added java bindings sub package >+- Minor changes to current guideline >+ > * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.5-0.7.git58097d9 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild > >-- >1.7.7.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 872103
:
636511
|
658055
|
658098
|
934925