%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'
4.0.0
org.checkerframework
checker-qual
4.3.2
jar
Checker Qual
checker-qual contains annotations (type qualifiers) that a programmer writes to specify Java code for type-checking by the Checker Framework.
https://checkerframework.org/
MIT
https://opensource.org/licenses/MIT
repo
11
UTF-8
checker-qual/src/main/java
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 - 4.3.2-1
- Initial package