commit df80913d6146d5d423a5439b2169da96a7231ad187e09eebeeefdeb0fb4d03ed Author: Fridrich Strba Date: Mon Mar 4 15:22:08 2019 +0000 OBS-URL: https://build.opensuse.org/package/show/Java:packages/cdi-api?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/1.2.tar.gz b/1.2.tar.gz new file mode 100644 index 0000000..250f811 --- /dev/null +++ b/1.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:506d82e40f287678763cc20dc31b9548e8d687af08e589a78de24a269bb4b4c1 +size 134934 diff --git a/cdi-api-build.xml b/cdi-api-build.xml new file mode 100644 index 0000000..34b469c --- /dev/null +++ b/cdi-api-build.xml @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================== WARNING =================================== + JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed. + =============================================================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cdi-api.spec b/cdi-api.spec new file mode 100644 index 0000000..72a3cff --- /dev/null +++ b/cdi-api.spec @@ -0,0 +1,111 @@ +# +# spec file for package cdi-api +# +# Copyright (c) 2019 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 https://bugs.opensuse.org/ +# + +%bcond_with tests +%global namedreltag .NOTHING +%global namedversion %{version}%{?namedreltag} +%bcond_without asciidoc +Name: cdi-api +Version: 1.2 +Release: 0 +Summary: CDI API +License: Apache-2.0 +Group: Development/Libraries/Java +URL: http://seamframework.org/Weld +Source0: https://github.com/cdi-spec/cdi/archive/%{version}.tar.gz +Source1: %{name}-build.xml +BuildRequires: ant +BuildRequires: atinject +BuildRequires: fdupes +BuildRequires: glassfish-el-api +BuildRequires: javapackages-local +BuildRequires: jboss-interceptors-1.2-api +BuildArch: noarch +%if %{with asciidoc} +BuildRequires: asciidoc +BuildRequires: python3-Pygments +%endif + +%description +APIs for JSR-299: Contexts and Dependency Injection for Java EE + +%package javadoc +Summary: Javadoc for %{name} +Group: Development/Libraries/Java + +%description javadoc +This package contains the API documentation for %{name}. + +%prep +%setup -q -n cdi-%{version} +cp %{SOURCE1} api/build.xml + +# Use newer version of interceptors API +%pom_change_dep "javax.interceptor:javax.interceptor-api" "org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec" api + +%pom_remove_parent api + +%build +mkdir -p lib +build-jar-repository -s lib glassfish-el-api jboss-interceptors-1.2-api javax.inject +pushd api + %ant \ + %if %{without tests} + -Dtest.skip=true \ + %endif + jar javadoc +popd + +%if %{with asciidoc} +cd spec/src/main/doc +asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o cdi-spec.html cdi-spec.asciidoc +asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o license-asl2.html license-asl2.asciidoc +asciidoc -n -b html5 -a toc2 -a toclevels=3 -a pygments -f html5.conf -o license-jcp.html license-jcp.asciidoc +%global adoc html +%else +%global adoc asciidoc +%endif + +%install +pushd api + # jar + install -dm 0755 %{buildroot}%{_javadir}/%{name} + install -dm 0755 %{buildroot}%{_javadir}/javax.enterprise.inject + install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar + ln -sf ../%{name}/%{name}.jar %{buildroot}%{_javadir}/javax.enterprise.inject/%{name}.jar + # pom + install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} + install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom + %add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar -a "javax.interceptor:javax.interceptor-api,org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec" + # javadoc + install -dm 0755 %{buildroot}%{_javadocdir}/%{name} + cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ + %fdupes -s %{buildroot}%{_javadocdir} +popd + +%files -f api/.mfiles +%doc spec/src/main/doc/cdi-spec.%{adoc} +%license spec/src/main/doc/license-asl2.%{adoc} +%license spec/src/main/doc/license-jcp.%{adoc} +%{_javadir}/javax.enterprise.inject + +%files javadoc +%license spec/src/main/doc/license-asl2.%{adoc} +%license spec/src/main/doc/license-jcp.%{adoc} +%{_javadocdir}/%{name} + +%changelog