Package auto

Download auto.spec
Group: Development/Java
# BEGIN SourceDeps(oneline):
BuildRequires(pre): rpm-macros-java
# END SourceDeps(oneline)
BuildRequires: /proc rpm-build-java
BuildRequires: jpackage-11-compat
# see
%define _localstatedir %{_var}
Name:           auto
Summary:        Collection of source code generators for Java
Version:        1.5.4
Release:        alt1_6jpp11
License:        ASL 2.0

# Source tarball is generated by script to ensure the correct tagged
# code is fetched for the various submodules
Source0:        auto-value-%{version}.tar.gz

BuildRequires:  maven-local
BuildRequires:  mvn(com.squareup:javapoet)

BuildArch:      noarch

The Auto sub-projects are a collection of code generators
that automate those types of tasks.

%package common
Group: Development/Java
Summary:        Auto Common Utilities
# Obsoletes added in F30
Obsoletes:      %{name}-factory < %{version}-%{release}

%description common
Common utilities for creating annotation processors.

%package service
Group: Development/Java
Summary:        Provider-configuration files for ServiceLoader

%description service
A configuration/meta-data generator for
java.util.ServiceLoader-style service

%package value
Group: Development/Java
Summary:        Auto Value

%description value
Immutable value-type code generation for Java 1.6+.

%package javadoc
Group: Development/Java
Summary:        Javadoc for %{name}
BuildArch: noarch

%description javadoc
This package contains javadoc for %{name}.

%setup -q -n auto-value-%{version}
find -name '*.class' -print -delete
find -name '*.jar' -print -delete

# remove unnecessary dependency on parent POM

# Disable factory module due to missing dep:
%pom_disable_module factory build-pom.xml

# Fix deps in service module
%pom_xpath_set "pom:parent/pom:version" 6 service
%pom_change_dep service

%pom_remove_plugin org.apache.maven.plugins:maven-checkstyle-plugin
%pom_remove_plugin :maven-shade-plugin value
%pom_remove_plugin :maven-invoker-plugin value

# Broader guava compatibility
sed -i -e 's/23.5-jre/20.0/' pom.xml
sed -i -e 's/toImmutableMap/toMap/' -e 's/static' \
  -e '/elementValues/s/ImmutableMap/Map/' \
sed -i -e 's/toImmutableSet/toSet/' -e 's/static' \
  -e '/ImmutableSet</s/ImmutableSet/Set/' \

%mvn_package :build-only __noinstall

# skip test suite because of unpackaged dependencies for tests
%mvn_build -sf -- -Dmaven.compiler.source=1.8 -Dmaven.javadoc.source=1.8 -Dmaven.compiler.release=8 -f build-pom.xml


%files -f .mfiles-%{name}-parent
%dir %{_javadir}/%{name}
%doc --no-dereference LICENSE.txt

%files common -f .mfiles-%{name}-common
%doc common/
%doc --no-dereference LICENSE.txt

%files service -f .mfiles-%{name}-service
%doc service/
%doc --no-dereference LICENSE.txt

%files value -f .mfiles-%{name}-value
%doc value/
%doc --no-dereference LICENSE.txt

%files javadoc -f .mfiles-javadoc
%doc --no-dereference LICENSE.txt

* Tue Jun 01 2021 Igor Vlasenko <> 1.5.4-alt1_6jpp11
- update

* Thu Apr 29 2021 Igor Vlasenko <> 1.5.4-alt1_2jpp11
- new version

* Fri May 24 2019 Igor Vlasenko <> 1.4.1-alt1_1jpp8
- new version

* Sun Apr 15 2018 Igor Vlasenko <> 1.1-alt1_6jpp8
- java update

* Thu Nov 09 2017 Igor Vlasenko <> 1.1-alt1_5jpp8
- fc27 update

* Sun Oct 22 2017 Igor Vlasenko <> 1.1-alt1_4jpp8
- new jpp release

* Mon Dec 19 2016 Igor Vlasenko <> 1.1-alt1_3jpp8
- new version
Back to Top