Files
graphql-java/graphql-java.spec
Fridrich Strba 697d912475 Accepting request 1159820 from home:urbic:branches:Java:packages
- Update to v21.4
  * This is a special release to help control introspection
    queries. This release adds a default check for introspection
    queries, to check that they are sensible. This feature is a
    backport of #3526 and #3527. This release also adds an optional
    maximum result nodes limit, which is a backport of #3525.
  * What's Changed
    + 21.x Backport PR 3526 and PR 3527 by @dondonz in #3529
    + 21.x backport 3525 max result nodes by @dondonz in #3528
- Modify patch:
  * java8.patch
    + add some new occurrences

OBS-URL: https://build.opensuse.org/request/show/1159820
OBS-URL: https://build.opensuse.org/package/show/Java:packages/graphql-java?expand=0&rev=8
2024-03-21 08:39:20 +00:00

103 lines
2.9 KiB
RPMSpec

#
# spec file for package graphql-java
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
Name: graphql-java
Version: 21.4
Release: 0
Summary: GraphQL Java implementation
License: MIT
Group: Development/Libraries/Java
URL: https://graphql-java.com/
Source0: https://github.com/%{name}/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: https://repo1.maven.org/maven2/com/%{name}/%{name}/%{version}/%{name}-%{version}.pom
Patch0: java8.patch
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: mvn(com.google.guava:guava)
BuildRequires: mvn(com.graphql-java:java-dataloader)
BuildRequires: mvn(com.intellij:annotations)
BuildRequires: mvn(org.antlr:antlr4-maven-plugin)
BuildRequires: mvn(org.antlr:antlr4-runtime)
BuildRequires: mvn(org.apache.maven.plugins:maven-jar-plugin)
BuildRequires: mvn(org.reactivestreams:reactive-streams)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildArch: noarch
%description
This is a GraphQL Java implementation.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q
%patch -P 0 -p1
cp %{SOURCE1} pom.xml
%pom_add_dep com.google.guava:guava
%pom_add_dep com.intellij:annotations
%pom_add_dep org.antlr:antlr4-runtime
%pom_remove_dep org.slf4j:slf4j-api
%pom_add_dep org.slf4j:slf4j-api
%pom_add_plugin org.antlr:antlr4-maven-plugin \
'<configuration>
<includes>Graphql.g4</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>'
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin \
'<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>com.graphqljava</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>'
mv src/main/antlr src/main/antlr4
%build
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
-Dmaven.compiler.release=8 \
%endif
-Dmaven.compiler.{source,target}=8
%install
%mvn_install
%files -f .mfiles
%license LICENSE.md
%doc {README,CONTRIBUTING}.md
%files javadoc -f .mfiles-javadoc
%license LICENSE.md
%changelog