Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > 71895d6076815d31f3d24e2986305b29 > files > 6

google-guice-4.0-5.mga6.src.rpm

%bcond_without extensions

%global short_name guice

Name:           google-%{short_name}
Version:        4.0
Release:        %mkrel 5
Group:          Development/Java
Summary:        Lightweight dependency injection framework for Java 5 and above
License:        ASL 2.0
URL:            https://github.com/google/%{short_name}
BuildArch:      noarch

# ./create-tarball.sh %%{version}
Source0:        %{name}-%{version}.tar.xz
Source1:        create-tarball.sh

Patch0:         0001-Revert-Some-work-on-issue-910-ensure-that-anonymous-.patch

# Rejected upstream: https://github.com/google/guice/issues/492
Patch100:       https://raw.githubusercontent.com/sonatype/sisu-guice/master/PATCHES/GUICE_492_slf4j_logger_injection.patch
# Forwarded upstream: https://github.com/google/guice/issues/618
Patch101:       https://raw.githubusercontent.com/sonatype/sisu-guice/master/PATCHES/GUICE_618_extensible_filter_pipeline.patch

BuildRequires:  maven-local
BuildRequires:  mvn(aopalliance:aopalliance)
BuildRequires:  mvn(cglib:cglib)
BuildRequires:  mvn(com.google.guava:guava)
BuildRequires:  mvn(javax.inject:javax.inject)
BuildRequires:  mvn(javax.servlet:servlet-api)
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires:  mvn(org.ow2.asm:asm)
BuildRequires:  mvn(org.slf4j:slf4j-api)
BuildRequires:  mvn(org.sonatype.plugins:munge-maven-plugin)

%if %{with extensions}
BuildRequires:  hibernate-jpa-2.0-api
BuildRequires:  springframework-beans
%endif

# Test dependencies:
%if 0
BuildRequires:  maven-surefire-provider-testng
BuildRequires:  aqute-bnd
BuildRequires:  atinject-tck
BuildRequires:  easymock2
BuildRequires:  felix-framework
BuildRequires:  hibernate3-entitymanager
BuildRequires:  mvn(org.hsqldb:hsqldb-j5)
BuildRequires:  testng
%endif

Provides:       %{short_name} = %{version}-%{release}

%description
Put simply, Guice alleviates the need for factories and the use of new
in your Java code. Think of Guice's @Inject as the new new. You will
still need to write factories in some cases, but your code will not
depend directly on them. Your code will be easier to change, unit test
and reuse in other contexts.

Guice embraces Java's type safe nature, especially when it comes to
features introduced in Java 5 such as generics and annotations. You
might think of Guice as filling in missing features for core
Java. Ideally, the language itself would provide most of the same
features, but until such a language comes along, we have Guice.

Guice helps you design better APIs, and the Guice API itself sets a
good example. Guice is not a kitchen sink. We justify each feature
with at least three use cases. When in doubt, we leave it out. We
build general functionality which enables you to extend Guice rather
than adding every feature to the core framework.

%package -n %{short_name}-parent
Summary:        Guice parent POM

%description -n %{short_name}-parent
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides parent POM for Guice modules.

%if %{with extensions}

%package -n %{short_name}-assistedinject
Summary:        AssistedInject extension module for Guice

%description -n %{short_name}-assistedinject
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides AssistedInject module for Guice.

%package -n %{short_name}-extensions
Summary:        Extensions for Guice

%description -n %{short_name}-extensions
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides extensions POM for Guice.

%package -n %{short_name}-grapher
Summary:        Grapher extension module for Guice

%description -n %{short_name}-grapher
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Grapher module for Guice.

%package -n %{short_name}-jmx
Summary:        JMX extension module for Guice

%description -n %{short_name}-jmx
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides JMX module for Guice.

%package -n %{short_name}-jndi
Summary:        JNDI extension module for Guice

%description -n %{short_name}-jndi
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides JNDI module for Guice.

%package -n %{short_name}-multibindings
Summary:        MultiBindings extension module for Guice

%description -n %{short_name}-multibindings
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides MultiBindings module for Guice.

%package -n %{short_name}-persist
Summary:        Persist extension module for Guice

%description -n %{short_name}-persist
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Persist module for Guice.

%package -n %{short_name}-servlet
Summary:        Servlet extension module for Guice

%description -n %{short_name}-servlet
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Servlet module for Guice.

%package -n %{short_name}-spring
Summary:        Spring extension module for Guice

%description -n %{short_name}-spring
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Spring module for Guice.

%package -n %{short_name}-testlib
Summary:        TestLib extension module for Guice

%description -n %{short_name}-testlib
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides TestLib module for Guice.

%package -n %{short_name}-throwingproviders
Summary:        ThrowingProviders extension module for Guice

%description -n %{short_name}-throwingproviders
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides ThrowingProviders module for Guice.

%package -n %{short_name}-bom
Summary:        Bill of Materials for Guice

%endif # with extensions

%description -n %{short_name}-bom
Guice is a lightweight dependency injection framework for Java 5
and above. This package provides Bill of Materials module for Guice.

%package javadoc
Summary:        API documentation for Guice
Provides:       %{short_name}-javadoc = %{version}-%{release}

%description javadoc
This package provides %{summary}.


%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch100 -p1
%patch101 -p1

# We don't have struts2 in Fedora yet.
%pom_disable_module struts2 extensions
# Android-specific extension
%pom_disable_module dagger-adapter extensions

# Remove additional build profiles, which we don't use anyways
# and which are only pulling additional dependencies.
%pom_xpath_remove "pom:profile[pom:id='guice.with.jarjar']" core

# Animal sniffer is only causing problems. Disable it for now.
%pom_remove_plugin :animal-sniffer-maven-plugin core
%pom_remove_plugin :animal-sniffer-maven-plugin extensions

%pom_remove_plugin :maven-gpg-plugin

# We don't have the custom doclet used by upstream. Remove
# maven-javadoc-plugin to generate javadocs with default style.
%pom_remove_plugin :maven-javadoc-plugin

# remove test dependency to make sure we don't produce requires
# see #1007498
%pom_remove_dep :guava-testlib extensions
%pom_xpath_remove "pom:dependency[pom:classifier[text()='tests']]" extensions

%pom_remove_parent
%pom_set_parent com.google.inject:guice-parent:%{version} jdk8-tests

# Don't try to build extension modules unless they are needed
%if %{without extensions}
%pom_disable_module extensions
%endif

%mvn_package :jdk8-tests __noinstall

%build
%if %{with extensions}
%mvn_alias "com.google.inject.extensions:" "org.sonatype.sisu.inject:"
%endif # with extensions

%mvn_package :::no_aop: guice

%mvn_file  ":guice-{*}"  %{short_name}/guice-@1
%mvn_file  ":guice" %{short_name}/%{name} %{name}
%mvn_alias ":guice" "org.sonatype.sisu:sisu-guice"
# Skip tests because of missing dependency guice-testlib
%mvn_build -f -s

%install
%mvn_install

%files -f .mfiles-guice
%dir %{_javadir}/%{short_name}

%files -n %{short_name}-parent -f .mfiles-guice-parent
%doc COPYING

%if %{with extensions}
%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
%files -n %{short_name}-persist -f .mfiles-guice-persist
%files -n %{short_name}-servlet -f .mfiles-guice-servlet
%files -n %{short_name}-spring -f .mfiles-guice-spring
%files -n %{short_name}-testlib -f .mfiles-guice-testlib
%files -n %{short_name}-throwingproviders -f .mfiles-guice-throwingproviders
%endif # with extensions

%files -n %{short_name}-bom -f .mfiles-guice-bom

%files javadoc -f .mfiles-javadoc
%doc COPYING




%changelog
* Sun May 14 2017 neoclust <neoclust> 4.0-5.mga6
+ Revision: 1101335
- Install BOM even when without extensions

* Wed Mar 02 2016 neoclust <neoclust> 4.0-4.mga6
+ Revision: 982602
- Second rebuild of the java stack

* Tue Feb 23 2016 neoclust <neoclust> 4.0-3.mga6
+ Revision: 976257
- First rebuild of the java stack
- sync package google-guice with fedora

  + umeabot <umeabot>
    - Mageia 6 Mass Rebuild

* Thu Dec 25 2014 pterjan <pterjan> 3.2.2-8.mga5
+ Revision: 805835
- Clean rebuild
- Enable extensions
- Restore

  + sander85 <sander85>
    - Depends on broken java stack

  + luigiwalser <luigiwalser>
    - build without extensions to remove spring dep

* Wed Oct 15 2014 umeabot <umeabot> 3.2.2-4.mga5
+ Revision: 746196
- Second Mageia 5 Mass Rebuild
- Mageia 5 Mass Rebuild

* Wed Sep 03 2014 spuhler <spuhler> 3.2.2-2.mga5
+ Revision: 671197
- rebuild because of missing signature

  + dmorgan <dmorgan>
    - New version
    - Revert to 3.1.8

* Mon Apr 07 2014 dmorgan <dmorgan> 3.1.9-1.mga5
+ Revision: 612572
- New version

* Mon Oct 21 2013 dmorgan <dmorgan> 3.1.3-5.mga4
+ Revision: 541268
- Rebuild against current java stack
- Install no_aop artifact after javapackages update

* Sat Oct 19 2013 umeabot <umeabot> 3.1.3-3.mga4
+ Revision: 535771
- Mageia 4 Mass Rebuild

* Fri Sep 20 2013 dmorgan <dmorgan> 3.1.3-2.mga4
+ Revision: 482555
- Rebuild against new javapackages
- New version

* Sun Feb 17 2013 dmorgan <dmorgan> 3.1.2-2.mga3
+ Revision: 398899
- Fix build

  + umeabot <umeabot>
    - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Oct 09 2011 gil <gil> 3.0-0.1.rc2.3.mga2
+ Revision: 153488
- edit release....
- added extension libraries

* Thu Apr 28 2011 dmorgan <dmorgan> 3.0-0.1.rc2.2.mga1
+ Revision: 92449
- Rebuild after bootstrapping
- imported package google-guice


* Tue Mar  1 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0-0.1.rc2
- Update to 3.0rc2
- Changes according to new guidelines (versionless jars & javadocs)

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4.1219svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Oct 14 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-3.1219svn
- Add java-devel >= 1:1.6.0 to BR

* Wed Oct 13 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-2.1219svn
- Moved munge repacking to prep
- Added -Dversion to change generated manifest version
- Removed http part of URL

* Thu Oct  7 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 2.0-1.1219svn
- Initial version of the package