File sblim-cim-client2.spec of Package sblim-cim-client2

# spec file for package sblim-cim-client2
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define project_folder			%{name}-%{version}-src
%define archive_folder			build
# -----------------------------------------------------------------------------

Name:           sblim-cim-client2
Version:        2.1.12
Release:        1
License:        EPL-1.0
Group:          Development/Libraries/Java
Summary:        Java CIM Client library
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
BuildRequires:  java-devel unzip
BuildRequires:  jpackage-utils >= 1.5.32
BuildRequires:  ant >= 1.6
%if %{defined fedora}
BuildRequires:  java-1.6.0-openjdk-devel
%if 0%{?suse_version} > 0
%if 0%{?suse_version} < 1100
BuildRequires:  java-1_5_0-ibm-devel
BuildRequires:  update-alternatives
BuildRequires:  jaxp_parser_impl
BuildRequires:  xml-commons-apis
Requires:       jpackage-utils >= 1.5.32
Obsoletes:      sblim-cim-client <= 1.3.5
Provides:       sblim-cim-client

The purpose of this package is to provide a CIM Client Class Library
for Java applications. It complies to the DMTF standard CIM Operations
over HTTP and intends to be compatible with JCP JSR48 once it becomes
available. To learn more about DMTF visit More
infos about the Java Community Process and JSR48 can be found at and

%package javadoc
License:        Other uncritical OpenSource License
Summary:        Javadoc for sblim-cim-client2
Group:          Development/Libraries/Java

%description javadoc
Javadoc for sblim-cim-client2.

%package manual
License:        Other uncritical OpenSource License
Summary:        Manual and sample code for sblim-cim-client2
Group:          Development/Libraries/Java

%description manual
Manual and sample code for sblim-cim-client2.

%setup -q -n %{project_folder}
dos2unixConversion() {
	%{__sed} -i 's/\r//g' "$fileName"
dosFiles2unix() {
	for fileName in $fileList; do
		dos2unixConversion $fileName
dosFiles2unix 'COPYING NEWS README ChangeLog'
for i in smpl/org/sblim/*/{example,samples}/*.{java,xml}; do
	[ -f "$i" ] && dos2unixConversion "$i"
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}
(cd $RPM_BUILD_ROOT%{_javadocdir}; unzip %{S:1})

# -----------------------------------------------------------------------------

# export CLASSPATH=$(build-classpath)
export ANT_OPTS="-Xmx256m"
ant \
        -Dbuild.compiler=modern \
        package java-doc
# -----------------------------------------------------------------------------

# --- documentation ---
install -d $dstDocDir
install --mode=644 ChangeLog COPYING README NEWS $dstDocDir
# --- samples (also into _docdir) ---
cp -pr  smpl/org $dstDocDir
# --- config files ---
install -d $confDir
install --mode=664 $confDir
# --- jar ---
install -d $RPM_BUILD_ROOT%{_javadir}
install %{archive_folder}/lib/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
  cd $RPM_BUILD_ROOT%{_javadir} && 
    ln -sf %{name}-%{version}.jar %{name}.jar;
# --- javadoc ---
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr %{archive_folder}/doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
# -----------------------------------------------------------------------------

%config %{_sysconfdir}/java/
%config %{_sysconfdir}/java/
%dir %{_docdir}/%{name}-%{version}
%doc %{_docdir}/%{name}-%{version}/COPYING
%doc %{_docdir}/%{name}-%{version}/README
%doc %{_docdir}/%{name}-%{version}/ChangeLog
%doc %{_docdir}/%{name}-%{version}/NEWS

%files javadoc

%files manual
%doc %{_docdir}/%{name}-%{version}/org
# -----------------------------------------------------------------------------