File sblim-cim-client.spec of Package sblim-cim-client
#
# spec file for package sblim-cim-client
#
# Copyright (c) 2015 SUSE LINUX 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 http://bugs.opensuse.org/
#
%define project_folder cim-client
%define cim_client_jar_file sblimCIMClient
%define slp_name sblim-slp-client
%define slp_client_jar_file sblimSLPClient
%if 0%{?suse_version}
%define pkgdocdir %{_docdir}/%{name}
%else
%define pkgdocdir %{_docdir}/%{name}-%{version}
%endif
Name: sblim-cim-client
Version: 1.3.9.3
Release: 0
Summary: Java CIM Client library
License: EPL-1.0
Group: Development/Libraries/Java
Url: http://sourceforge.net/projects/sblim/
Source: http://downloads.sourceforge.net/project/sblim/%{name}/%{version}/%{name}-%{version}-src.zip
Source1: http://downloads.sourceforge.net/project/sblim/%{name}/%{version}/%{name}-samples-%{version}-src.zip
Source2: http://downloads.sourceforge.net/project/sblim/%{name}/%{version}/%{name}-%{version}-doc.zip
%if 0%{?suse_version} > 1200
Patch1: cim-client.patch
%endif
BuildRequires: ant >= 1.6
BuildRequires: dos2unix
%if %{?suse_version} >= 1500
BuildRequires: java-devel = 11
%else
BuildRequires: java-devel
%endif
BuildRequires: jpackage-utils >= 1.5.32
BuildRequires: unzip
Requires: jpackage-utils >= 1.5.32
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
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 http://www.dmtf.org. More
infos about the Java Community Process and JSR48 can be found at
http://www.jcp.org and http://www.jcp.org/en/jsr/detail?id=48.
%package javadoc
Summary: Java CIM Client library
License: EPL-1.0
Group: Development/Libraries/Java
%description javadoc
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 http://www.dmtf.org. More
infos about the Java Community Process and JSR48 can be found at
http://www.jcp.org and http://www.jcp.org/en/jsr/detail?id=48.
%package manual
Summary: Java CIM Client library
License: EPL-1.0
Group: Development/Libraries/Java
%description manual
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 http://www.dmtf.org. More
infos about the Java Community Process and JSR48 can be found at
http://www.jcp.org and http://www.jcp.org/en/jsr/detail?id=48.
%prep
#sources
%setup -q -n %{project_folder} -b0 -T -D
rm version.txt COPYING ChangeLog NEWS README
%if 0%{?suse_version} > 1200
%patch -P1 -p1
%endif
#samples
%setup -q -b1 -T -D -n %{project_folder}
dos2unix samples/README.samples
find -type f \( -name "*.java" -o -name "*.xml" \) -exec dos2unix {} +
rm version.txt
#documentation
%setup -q -b2 -T -D -n %{project_folder}
dos2unix doc/package-list doc/stylesheet.css
%build
export ANT_OPTS="-Xmx256m"
ant \
-Dbuild.compiler=modern \
-DManifest.version=%{version}\
build-release
%install
# documentation
dos2unix COPYING README ChangeLog NEWS
mkdir -p %{buildroot}%{pkgdocdir}
install COPYING %{buildroot}%{pkgdocdir}
install README %{buildroot}%{pkgdocdir}
install ChangeLog %{buildroot}%{pkgdocdir}
install NEWS %{buildroot}%{pkgdocdir}
install samples/README.samples %{buildroot}%{pkgdocdir}
cp -pr samples/org %{buildroot}%{pkgdocdir}
# default cim.defaults
dos2unix cim.defaults slp.conf
mkdir -p %{buildroot}%{_sysconfdir}/java
install cim.defaults %{buildroot}%{_sysconfdir}/java/%{name}.properties
install slp.conf %{buildroot}%{_sysconfdir}/java/%{slp_name}.properties
# jar
mkdir -p %{buildroot}%{_javadir}
install %{project_folder}/%{cim_client_jar_file}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(
cd %{buildroot}%{_javadir} &&
ln -sf %{name}-%{version}.jar %{cim_client_jar_file}.jar;
ln -sf %{name}-%{version}.jar %{name}.jar;
)
install %{project_folder}/%{slp_client_jar_file}.jar %{buildroot}%{_javadir}/%{slp_name}-%{version}.jar
(
cd %{buildroot}%{_javadir} &&
ln -sf %{slp_name}-%{version}.jar %{slp_client_jar_file}.jar;
ln -sf %{slp_name}-%{version}.jar %{slp_name}.jar;
)
# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr doc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%files
%defattr(0644,root,root,0755)
%config %{_sysconfdir}/java/%{name}.properties
%config %{_sysconfdir}/java/%{slp_name}.properties
%dir %{pkgdocdir}
%doc %{pkgdocdir}/COPYING
%doc %{pkgdocdir}/README
%doc %{pkgdocdir}/ChangeLog
%doc %{pkgdocdir}/NEWS
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{cim_client_jar_file}.jar
%{_javadir}/%{slp_name}.jar
%{_javadir}/%{slp_name}-%{version}.jar
%{_javadir}/%{slp_client_jar_file}.jar
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%files manual
%defattr(0644,root,root,0755)
%doc %{pkgdocdir}/README.samples
%doc %{pkgdocdir}/org
%changelog