# # spec file for package jcommon # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2000-2009, JPackage Project # All rights reserved. # # 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 with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}} %define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}} %define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}} %define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}} %bcond_with repolib %define repodir %{_javadir}/repository.jboss.com/jcommon/%{version}-brew %define repodirlib %{repodir}/lib %define repodirsrc %{repodir}/src %define section free Name: jcommon Version: 1.0.16 Release: 0.11.40 Summary: Common library License: LGPL-2.1 Group: Development/Languages/Java Url: http://www.jfree.org/jcommon/index.php Source0: http://downloads.sourceforge.net/project/jfreechart/3.%20JCommon/1.0.16/jcommon-1.0.16.tar.gz Source1: %{name}-component-info.xml Patch0: jcommon-1.0.16-jdk9.patch Requires(post): jpackage-utils >= 1.7.3 Requires(postun): jpackage-utils >= 1.7.3 BuildRequires: java-devel >= 1.7.0 BuildRequires: ant %if 0%{?suse_version} BuildRequires: fdupes %endif BuildRequires: junit BuildRequires: jpackage-utils >= 1.7.3 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Collection of classes used by Object Refinery Projects, for example jfreechart %if %with repolib %package repolib License: LGPL-2.1 Summary: Artifacts to be uploaded to a repository library Group: Development/Libraries/Java %description repolib Artifacts to be uploaded to a repository library. This package is not meant to be installed but so its contents can be extracted through rpm2cpio %endif %package test License: LGPL-2.1 Summary: Common library Group: Development/Languages/Java Requires: %{name} = %{version}-%{release} Requires: junit %description test Collection of classes used by Object Refinery Projects, for example jfreechart %package javadoc License: LGPL-2.1 Summary: Common library Group: Development/Languages/Java %description javadoc Collection of classes used by Object Refinery Projects, for example jfreechart %description javadoc -l fr Javadoc pour %{name}. %prep %setup -q %patch0 -p1 %{_bindir}/find -name "*.jar" | %{_bindir}/xargs -t %{__rm} %build export CLASSPATH=$(%{_bindir}/build-classpath junit) export OPT_JAR_LIST=: %{ant} -f ant/build.xml -Dbuildstable=true -Dproject.outdir=. -Dbasedir=. compile compile-junit-tests javadoc %install %{__rm} -rf %{buildroot} # jars %{__mkdir_p} %{buildroot}%{_javadir} %{__cp} -p jcommon-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar %{__cp} -p lib/%{name}-%{version}-junit.jar %{buildroot}%{_javadir}/%{name}-junit-%{version}.jar (cd %{buildroot}%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `/bin/echo ${jar} | %{__sed} "s|-%{version}||g"`; done) # javadoc %{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version} %{__cp} -pr javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version} %if 0%{?suse_version} %fdupes -s %{buildroot}%{_javadocdir}/%{name}-%{version} %endif %{__ln_s} %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} %if %with repolib %{__mkdir_p} %{buildroot}%{repodir} %{__cp} -p %{SOURCE1} %{buildroot}%{repodir}/component-info.xml %{__sed} -i "s/@VERSION@/%{version}-brew/g" %{buildroot}%{repodir}/component-info.xml tag=`/bin/echo %{name}-%{version}-%{release} | %{__sed} 's|\.|_|g'` %{__sed} -i "s/@TAG@/$tag/g" %{buildroot}%{repodir}/component-info.xml %{__mkdir_p} %{buildroot}%{repodirsrc} %{__cp} -p %{SOURCE0} %{buildroot}%{repodirsrc} %{__mkdir_p} %{buildroot}%{repodirlib} %{__cp} -p %{buildroot}%{_javadir}/jcommon.jar %{buildroot}%{repodirlib} %endif %clean %{__rm} -rf %{buildroot} %files %defattr(0644,root,root,0755) %doc licence-LGPL.txt README.txt %{_javadir}/%{name}.jar %{_javadir}/%{name}-%{version}.jar %files test %defattr(0644,root,root,0755) %{_javadir}/%{name}-junit-%{version}.jar %{_javadir}/%{name}-junit.jar %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name} %if %with repolib %files repolib %defattr(0644,root,root,0755) %{_javadir}/repository.jboss.com %endif %changelog * Sat Nov 28 2020 Michael Calmer - no fdupes on CentOS 8 * Thu Nov 2 2017 jgonzalez@suse.com - Fix build with java9 - Add: * jcommon-1.0.16-jdk9.patch * Fri Jun 27 2014 smoioli@suse.com - license updated, maven files removed * Tue Sep 24 2013 mc@suse.de - explicitly BuildRequire java-devel - add unpackaged directories * Thu Dec 9 2010 mc@suse.de - initial release