blob: 3aeceaa49c54fd0f4da33930050cd228209c4dd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
%global debug_package %{nil}
Name: checker-qual
Version: 4.3.2
Release: 1%{?dist}
Summary: Java annotations (type qualifiers) for the Checker Framework
BuildArch: noarch
License: MIT
URL: https://checkerframework.org/
Source0: https://github.com/typetools/checker-framework/archive/refs/tags/checker-framework-%{version}.tar.gz#/checker-qual-%{version}.tar.gz
BuildRequires: maven-local
BuildRequires: java-17-openjdk-devel
%description
checker-qual contains annotations (type qualifiers) that a programmer writes to
specify Java code for type-checking by the Checker Framework.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
API documentation for %{name}.
%prep
%autosetup -n %{name}-%{version}
cp -p checker-qual/LICENSE.txt LICENSE.txt
# The upstream project is a Gradle multi-module build. Only the checker-qual
# sub-module is packaged here; it is a pure Java annotations module with no
# external compile-time dependencies. Generate a minimal Maven POM so that
# xmvn can build and install it, providing mvn(org.checkerframework:checker-qual).
cat > pom.xml <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>4.3.2</version>
<packaging>jar</packaging>
<name>Checker Qual</name>
<description>checker-qual contains annotations (type qualifiers) that a programmer writes to specify Java code for type-checking by the Checker Framework.</description>
<url>https://checkerframework.org/</url>
<licenses>
<license>
<name>MIT</name>
<url>https://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>
<properties>
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<sourceDirectory>checker-qual/src/main/java</sourceDirectory>
</build>
</project>
EOF
%build
# maven-local pulls in the java-1.8.0-devel stack and openEuler's alternatives
# give java-1.8.0-openjdk a far higher priority than java-17-openjdk, so the
# default javac is JDK 8. maven-compiler-plugin turns
# maven.compiler.release into --release, which JDK 8 javac rejects
# ("invalid flag: --release"). Force the JDK 17 required above.
JAVA_HOME=""
for jdk in /usr/lib/jvm/java-17-openjdk-*/ /usr/lib/jvm/java-17-openjdk; do
if [ -x "$jdk/bin/javac" ]; then
JAVA_HOME="${jdk%/}"
break
fi
done
export JAVA_HOME
export PATH="$JAVA_HOME/bin:$PATH"
%mvn_build -f
%install
%mvn_install
%files -f .mfiles
%license LICENSE.txt
%doc README.md
%files javadoc -f .mfiles-javadoc
%license LICENSE.txt
%changelog
* Mon Nov 02 2026 openEuler Build <build@openeuler.org> - 4.3.2-1
- Initial package
|