diff --git a/_service b/_service new file mode 100644 index 0000000..9bdd62a --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + git + https://github.com/javax-inject/javax-inject.git + 1f74ea7bd05ce4a3a62ddfe4a2511bf1b4287a61 + 1 + @PARENT_TAG@+%cdgit%h + atinject + + + *.tar + xz + + + diff --git a/atinject-1+20160610git1f74ea7.tar.xz b/atinject-1+20160610git1f74ea7.tar.xz new file mode 100644 index 0000000..28a9dd3 --- /dev/null +++ b/atinject-1+20160610git1f74ea7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc3cd558ec50728218744bd466740d5be6658352417d17ef2fbce1eab747cc96 +size 170392 diff --git a/atinject-1.tar.xz b/atinject-1.tar.xz deleted file mode 100644 index c666b4d..0000000 --- a/atinject-1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b1932fdb3980414161484d5193f65b5318d2ddc19862d31b1fe5dfd7d0ee4136 -size 170484 diff --git a/atinject.changes b/atinject.changes index 7e1e55e..706a0a3 100644 --- a/atinject.changes +++ b/atinject.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 24 13:21:22 UTC 2022 - Fridrich Strba + +- Fetch the sources using a source service +- Do not use the upstream build.sh, but use it to write a + necessary part directly to the spec file + ------------------------------------------------------------------- Sat Mar 19 16:24:33 UTC 2022 - Fridrich Strba diff --git a/atinject.spec b/atinject.spec index 9e6fedc..c94b0cb 100644 --- a/atinject.spec +++ b/atinject.spec @@ -16,19 +16,14 @@ # -%global base_version 1 -%global git_tag 1f74ea7bd05ce4a3a62ddfe4a2511bf1b4287a61 -%global git_version 20100611git1f74ea7 Name: atinject -Version: %{base_version}+%{git_version} +Version: 1+20160610git1f74ea7 Release: 0 Summary: Dependency injection specification for Java (JSR-330) License: Apache-2.0 Group: Development/Libraries/Java URL: https://javax-inject.github.io/javax-inject/ -# git clone --bare git@github.com:javax-inject/javax-inject -# git --git-dir=javax-inject.git archive --prefix %{name}-%{base_version}/ --format tar %{git_tag} | xz >%{name}-%{base_version}.tar.xz -Source0: %{name}-%{base_version}.tar.xz +Source0: %{name}-%{version}.tar.xz # These manifests based on the ones shipped by eclipse.org Source1: MANIFEST.MF Source2: MANIFEST-TCK.MF @@ -51,7 +46,7 @@ beneficial to most nontrivial applications. %package tck Summary: TCK for testing %{name} compatibility with JSR-330 Group: Development/Libraries/Java -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{version} Requires: junit %description tck @@ -65,28 +60,41 @@ Group: Documentation/HTML API documentation for %{name}. %prep -%setup -q -n %{name}-%{base_version} +%setup -q %patch0 -p1 cp %{SOURCE3} LICENSE -rm -rf lib/* -build-jar-repository -p lib junit # Fix dep in TCK pom sed -i -e 's/pom\.groupId/project.groupId/' tck-pom.xml %build -set -e -alias rm=: -alias xargs=: -alias javadoc='javadoc -source 8 -notimestamp' -alias javac='javac -source 8 -target 8' -. ./build.sh +rm -rf build +mkdir -p build/classes +mkdir -p build/tck +mkdir -p build/dist +mkdir -p build/tck/classes +mkdir -p build/tck/dist -# Inject OSGi manifests required by Eclipse. -jar umf %{SOURCE1} build/dist/javax.inject.jar -jar umf %{SOURCE2} build/tck/dist/javax.inject-tck.jar +# Compile classes. +javac -source 8 -target 8 -g -d build/classes `find src -name \*.java` +javac -source 8 -target 8 -g -classpath build/classes:$(build-classpath junit) -d build/tck/classes \ + `find tck -name \*.java` -mv build/tck/javadoc build/javadoc/tck +# Generate Javadocs. +FOOTER="Copyright (C) 2009 \ +The JSR-330 Expert Group. \ +Licensed under the Apache \ +License, Version 2.0." +javadoc -source 8 -protected -bottom "${FOOTER}" \ + -header "This is a DRAFT specification." \ + -sourcepath src -d build/javadoc javax.inject +javadoc -source 8 -classpath build/classes:lib/junit.jar -protected -bottom "$FOOTER" \ + -sourcepath tck -d build/javadoc/tck org.atinject.tck \ + org.atinject.tck.auto org.atinject.tck.auto.accessories + +# Generate jars. +jar cmf %{SOURCE1} build/dist/javax.inject.jar -C build/classes . +jar cmf %{SOURCE2} build/tck/dist/javax.inject-tck.jar -C build/tck/classes . %install # jars