# # spec file for package jakarta-commons-discovery # # Copyright (c) 2017 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 short_name commons-discovery Name: jakarta-commons-discovery Version: 0.4 Release: 3.27 Summary: Jakarta Commons Discovery License: Apache-2.0 Group: Development/Libraries/Java Url: http://jakarta.apache.org/commons/discovery.html Source0: http://www.apache.org/dist/jakarta/commons/discovery/source/commons-discovery-0.4-src.tar.gz BuildRequires: ant %if 0%{?rhel} BuildRequires: apache-commons-logging >= 1.0.4 %else BuildRequires: commons-logging >= 1.0.4 %endif BuildRequires: java-devel BuildRequires: javapackages-tools BuildRequires: junit >= 3.7 %if 0%{?rhel} Requires: apache-commons-logging >= 1.0.4 %else Requires: commons-logging >= 1.0.4 %endif Provides: %{short_name} = %{version} Obsoletes: %{short_name} < %{version} #XXX: temporary fix to make axis auto dependencies work, need to revork package Provides: osgi(org.apache.commons.discovery) BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %description The Discovery component is about discovering, or finding, implementations for pluggable interfaces. Pluggable interfaces are specified with the intent that multiple implementations are, or will be, available to provide the service described by the interface. Discovery provides facilities for finding and instantiating classes and for lifecycle management of singleton (factory) classes. %package javadoc Summary: Javadoc for jakarta-commons-discovery Group: Development/Libraries/Java Requires(pre): coreutils %description javadoc The Discovery component is about discovering, or finding, implementations for pluggable interfaces. Pluggable interfaces are specified with the intent that multiple implementations are, or will be, available to provide the service described by the interface. Discovery provides facilities for finding and instantiating classes, and for lifecycle management of singleton (factory) classes. This package contains the javadoc documentation for the Jakarta Commons Discovery Package. %prep %setup -q -n commons-discovery-%{version}-src chmod u+w . %build ant \ -Dant.build.javac.source=1.7 -Dant.build.javac.target=1.7 \ -Djunit.jar=%(find-jar junit) \ -Dlogger.jar=%(find-jar commons-logging) \ test.discovery dist %install # jar mkdir -p %{buildroot}%{_javadir} cp -p dist/%{short_name}.jar %{buildroot}%{_javadir}/%{short_name}.jar (cd %{buildroot}%{_javadir} && ln -s %{short_name}.jar %{name}.jar) # javadoc mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name} %files %defattr(0644,root,root,0755) %doc LICENSE.txt %{_javadir}/* %files javadoc %defattr(0644,root,root,0755) %doc %{_javadocdir}/%{name} %changelog * Mon Sep 13 2021 Stefan Bluhm - Added build support for Enterprise Linux. * Fri Sep 8 2017 fstrba@suse.com - Specify java target and source version to 1.6 in order to allow building with jdk9 * Fri Jun 27 2014 tchvatal@suse.com - Cleanup with spec-cleaner a bit - Do not disable bytecode check but rather set the versions to ant * Thu May 15 2014 darin@darins.net - disable bytecode check on sle_11 - removed %%mkrel from Version * Fri Sep 13 2013 mvyskocil@suse.com - provide osgi(org.apache.commons.discovery) to satisfy axis * Mon Sep 9 2013 tchvatal@suse.com - Move from jpackage-utils to javapackage-tools * Tue Oct 16 2012 mvyskocil@suse.com - tiny cleanup of a specfile * Fri May 25 2012 mvyskocil@suse.cz - fix a build with jdk7 - reformat spec a bit, remove obsoleted gcj parts and don't version javadoc dir - build with commons-logging work as well - provide commons-discovery * Thu Mar 13 2008 mvyskocil@suse.cz - merged with jpackage 1.7 - update to 0.4 * Mon Sep 25 2006 skh@suse.de - don't use icecream - use source="1.4" and target="1.4" for build with java 1.5 * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Wed Jul 27 2005 jsmeix@suse.de - Adjustments in the spec file. * Mon Jul 18 2005 jsmeix@suse.de - Current version 0.3 from JPackage.org * Mon Sep 6 2004 skh@suse.de - Initial package created with version 0.2 (JPackage 1.5)