This commit is contained in:
parent
c340d545f8
commit
d0adbe68a3
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:77650231a0b12c0f0551202ae4dcfc1a4364e090f461cc3d21616d45bfc49537
|
||||
size 23212767
|
17
create-tarball.sh
Normal file
17
create-tarball.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -e -x
|
||||
test $# -eq 1
|
||||
test ! -d guice
|
||||
git clone git://github.com/google/guice.git
|
||||
cd ./guice
|
||||
git checkout ${1}
|
||||
git branch unbundled-${1}
|
||||
git checkout unbundled-${1}
|
||||
rm -rf $(ls . | grep -E -v 'core|extensions|pom|bom|jdk8-tests|COPYING|common.xml|build.xml|build.properties|lib')
|
||||
find . -name "*.jar" -and ! -name munge.jar -delete
|
||||
find . -name "*.class" -delete
|
||||
find lib -type f -and ! -name munge.jar -delete
|
||||
git commit -a -m "Remove unneeded stuff"
|
||||
git tag unbundled-${1}
|
||||
git archive --format=tar --prefix=google-guice-${1}/ unbundled-${1} \
|
||||
| xz >../google-guice-${1}.tar.xz
|
3
google-guice-4.1.tar.xz
Normal file
3
google-guice-4.1.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ad9a303c0b69065b67fc4295b9f4acfdde49920f2886cdb2823153d7b59edab0
|
||||
size 383200
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package google-guice
|
||||
# spec file for package google
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -17,7 +17,6 @@
|
||||
|
||||
|
||||
%global short_name guice
|
||||
|
||||
Name: google-%{short_name}
|
||||
Version: 4.1
|
||||
Release: 0
|
||||
@ -25,13 +24,12 @@ Summary: Dependency injection framework for Java 5 and above
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://github.com/google/%{short_name}
|
||||
BuildArch: noarch
|
||||
|
||||
Source0: https://github.com/google/%{short_name}/archive/%{version}.tar.gz
|
||||
# ./create-tarball.sh %%{version}
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: create-tarball.sh
|
||||
Patch0: guice-4.1-fixup-ant.patch
|
||||
Patch1: guice-4.1-disabledextensions.patch
|
||||
Patch2: guice-4.1-javadoc.patch
|
||||
|
||||
BuildRequires: ant
|
||||
BuildRequires: aopalliance
|
||||
BuildRequires: aqute-bnd
|
||||
@ -47,6 +45,7 @@ BuildRequires: objectweb-asm
|
||||
BuildRequires: slf4j
|
||||
BuildRequires: xmvn-install
|
||||
BuildRequires: xmvn-resolve
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Guice alleviates the need for factories and the use of "new" in Java
|
||||
@ -152,9 +151,8 @@ Group: Documentation/HTML
|
||||
%description javadoc
|
||||
This package provides %{summary}.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{short_name}-%{version}
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
@ -207,39 +205,41 @@ find . -name "*.class" -delete
|
||||
%pom_xpath_remove "pom:optional" core
|
||||
|
||||
%build
|
||||
%mvn_alias "com.google.inject.extensions:" "org.sonatype.sisu.inject:"
|
||||
%{mvn_alias} "com.google.inject.extensions:" "org.sonatype.sisu.inject:"
|
||||
|
||||
%mvn_package :::no_aop: guice
|
||||
%mvn_package :{*} @1
|
||||
%{mvn_package} :::no_aop: guice
|
||||
%{mvn_package} :{*} @1
|
||||
|
||||
%mvn_file ":guice-{*}" %{short_name}/guice-@1
|
||||
%mvn_file ":guice" %{short_name}/%{name} %{name}
|
||||
%mvn_alias ":guice" "org.sonatype.sisu:sisu-guice"
|
||||
%{mvn_file} ":guice-{*}" %{short_name}/guice-@1
|
||||
%{mvn_file} ":guice" %{short_name}/%{name} %{name}
|
||||
%{mvn_alias} ":guice" "org.sonatype.sisu:sisu-guice"
|
||||
|
||||
mkdir -p lib/build
|
||||
mkdir -p extensions/servlet/lib/build
|
||||
build-jar-repository -s -p lib/build \
|
||||
guava20 javax.inject glassfish-servlet-api aopalliance cglib objectweb-asm aqute-bnd jarjar
|
||||
%ant clean.all no_aop
|
||||
%{ant} clean.all no_aop
|
||||
pushd build/no_aop
|
||||
%pom_xpath_inject "pom:project" "<classifier>no_aop</classifier>" core
|
||||
%ant -Dversion=%{version} jar
|
||||
%{ant} -Dversion=%{version} jar
|
||||
popd
|
||||
%ant -Dversion=%{version} dist javadoc
|
||||
%{ant} -Dversion=%{version} dist javadoc
|
||||
|
||||
%mvn_artifact pom.xml
|
||||
%mvn_artifact bom/pom.xml
|
||||
%mvn_artifact build/no_aop/core/pom.xml build/no_aop/build/guice-%{version}.jar
|
||||
%{mvn_artifact} pom.xml
|
||||
%{mvn_artifact} bom/pom.xml
|
||||
%{mvn_artifact} build/no_aop/core/pom.xml build/no_aop/build/guice-%{version}.jar
|
||||
# a huge hack to force the no_aop classifier to the version 2.3.0 reactor
|
||||
perl -pi -e 's#<ns0:artifactId>guice</ns0:artifactId>#<ns0:artifactId>guice</ns0:artifactId><ns0:classifier>no_aop</ns0:classifier>#g' .xmvn-reactor
|
||||
%mvn_artifact core/pom.xml build/guice-%{version}.jar
|
||||
%mvn_artifact extensions/pom.xml
|
||||
%mvn_artifact extensions/jmx/pom.xml build/dist/guice-jmx-%{version}.jar
|
||||
%mvn_artifact extensions/assistedinject/pom.xml build/dist/guice-assistedinject-%{version}.jar
|
||||
%mvn_artifact extensions/multibindings/pom.xml build/dist/guice-multibindings-%{version}.jar
|
||||
%mvn_artifact extensions/throwingproviders/pom.xml build/dist/guice-throwingproviders-%{version}.jar
|
||||
%mvn_artifact extensions/servlet/pom.xml build/dist/guice-servlet-%{version}.jar
|
||||
%mvn_artifact extensions/jndi/pom.xml build/dist/guice-jndi-%{version}.jar
|
||||
%mvn_artifact extensions/testlib/pom.xml build/dist/guice-testlib-%{version}.jar
|
||||
%mvn_artifact extensions/grapher/pom.xml build/dist/guice-grapher-%{version}.jar
|
||||
%{mvn_artifact} core/pom.xml build/guice-%{version}.jar
|
||||
%{mvn_artifact} extensions/pom.xml
|
||||
%{mvn_artifact} extensions/jmx/pom.xml build/dist/guice-jmx-%{version}.jar
|
||||
%{mvn_artifact} extensions/assistedinject/pom.xml build/dist/guice-assistedinject-%{version}.jar
|
||||
%{mvn_artifact} extensions/multibindings/pom.xml build/dist/guice-multibindings-%{version}.jar
|
||||
%{mvn_artifact} extensions/throwingproviders/pom.xml build/dist/guice-throwingproviders-%{version}.jar
|
||||
%{mvn_artifact} extensions/servlet/pom.xml build/dist/guice-servlet-%{version}.jar
|
||||
%{mvn_artifact} extensions/jndi/pom.xml build/dist/guice-jndi-%{version}.jar
|
||||
%{mvn_artifact} extensions/testlib/pom.xml build/dist/guice-testlib-%{version}.jar
|
||||
%{mvn_artifact} extensions/grapher/pom.xml build/dist/guice-grapher-%{version}.jar
|
||||
|
||||
%install
|
||||
%mvn_install -J build/docs/javadoc
|
||||
@ -249,27 +249,35 @@ perl -pi -e 's#<ns0:artifactId>guice</ns0:artifactId>#<ns0:artifactId>guice</ns0
|
||||
%dir %{_javadir}/%{short_name}
|
||||
|
||||
%files -n %{short_name}-parent -f .mfiles-guice-parent
|
||||
%doc COPYING
|
||||
%license COPYING
|
||||
|
||||
%files -n %{short_name}-assistedinject -f .mfiles-guice-assistedinject
|
||||
|
||||
%files -n %{short_name}-extensions -f .mfiles-extensions-parent
|
||||
|
||||
%files -n %{short_name}-grapher -f .mfiles-guice-grapher
|
||||
|
||||
%files -n %{short_name}-jmx -f .mfiles-guice-jmx
|
||||
|
||||
%files -n %{short_name}-jndi -f .mfiles-guice-jndi
|
||||
|
||||
%files -n %{short_name}-multibindings -f .mfiles-guice-multibindings
|
||||
%if %{with jpa}
|
||||
%files -n %{short_name}-persist -f .mfiles-guice-persist
|
||||
%endif
|
||||
|
||||
%files -n %{short_name}-servlet -f .mfiles-guice-servlet
|
||||
%if %{with spring}
|
||||
%files -n %{short_name}-spring -f .mfiles-guice-spring
|
||||
%endif
|
||||
|
||||
%files -n %{short_name}-testlib -f .mfiles-guice-testlib
|
||||
|
||||
%files -n %{short_name}-throwingproviders -f .mfiles-guice-throwingproviders
|
||||
|
||||
%files -n %{short_name}-bom -f .mfiles-guice-bom
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%doc COPYING
|
||||
%license COPYING
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user