[Git][java-team/antlr3][master] 3 commits: fix d/clean syntax
Alexandre Detiste (@detiste-guest)
gitlab at salsa.debian.org
Fri Sep 5 11:07:36 BST 2025
Alexandre Detiste pushed to branch master at Debian Java Maintainers / antlr3
Commits:
f5b76acf by Alexandre Detiste at 2025-09-05T11:50:40+02:00
fix d/clean syntax
- - - - -
ae844ff1 by Alexandre Detiste at 2025-09-05T11:51:35+02:00
vendor maven.mk that was previously in "maven-debian-helper"
This package is the very last user of "maven.mk".
No further new usage of deprecated "mavev.mk"
should be promoted, so it can be vendored here.
- - - - -
752ebf95 by Alexandre Detiste at 2025-09-05T12:07:28+02:00
release
- - - - -
6 changed files:
- debian/changelog
- debian/clean
- debian/copyright
- + debian/maven-vars.mk
- + debian/maven.mk
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,18 @@
+antlr3 (3.5.3-3) unstable; urgency=medium
+
+ * Team Upload
+ * Vendor maven.mk that was previously in "maven-debian-helper"
+ antlr3 is the very last remaining user of mave.mk left.
+ * Bump d/watch to v4
+ * Use https for Homepage
+ * Bump Standards-Version to 4.7.2
+ * Fix d/clean syntax
+
+ [ Debian Janitor ]
+ * Apply multi-arch hints. + libantlr3-runtime-java: Add Multi-Arch: foreign.
+
+ -- Alexandre Detiste <tchet at debian.org> Fri, 05 Sep 2025 12:06:15 +0200
+
antlr3 (3.5.3-2) unstable; urgency=medium
* Fixed the build failure with Java 21 (Closes: #1052588)
=====================================
debian/clean
=====================================
@@ -1,9 +1,9 @@
-antlr3-maven-plugin/target
-gunit/target
-gunit-maven-plugin/target
-tool/target
-target
-runtime/Java/target
+antlr3-maven-plugin/target/
+gunit/target/
+gunit-maven-plugin/target/
+tool/target/
+target/
+runtime/Java/target/
tool/src/main/java/*.tokens
tool/src/main/java/org/antlr/grammar/
antlr-ant/main/antlr3-task/antlr3-task.jar
=====================================
debian/copyright
=====================================
@@ -11,6 +11,23 @@ Files: debian/*
Copyright: 2008, John Leuner <jewel at debian.org>
License: BSD-3-clause
+Files: debian/maven.mk
+ debian/maven-vars.mk
+Copyright: 2003 Stefan Gybas <sgybas at debian.org>
+ 2008 Torsten Werner <twerner at debian.org>
+ 2009-2011 Ludovic Claude <ludovic.claude at laposte.net>
+ 2010-2011 Damien Raude-Morvan <drazzib at debian.org>
+License: GPL-2+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
=====================================
debian/maven-vars.mk
=====================================
@@ -0,0 +1,114 @@
+# This file is based on ant-vars.mk
+
+# Copyright © 2003 Stefan Gybas <sgybas at debian.org>
+# Copyright © 2008 Torsten Werner <twerner at debian.org>
+# Copyright © 2010-2011 Damien Raude-Morvan <drazzib at debian.org>
+# Description: Defines useful variables for packages which use Maven
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+
+ifndef _cdbs_class_maven_vars
+_cdbs_class_maven_vars = 1
+
+# Declare Build-Deps for packages using this file
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), cdbs (>= 0.4.43)
+CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), maven-debian-helper (>= 2.6)
+
+# Maven home directory. Doesn't need to be changed except when using
+# nonstandard Maven installations.
+MAVEN_HOME = /usr/share/maven
+
+MAVEN_DEBIAN_VERSION = $(shell ls /usr/share/maven-repo/org/debian/maven/maven-packager-utils/ | sed 's|/||')
+MAVEN_CLASSCONF = /etc/maven/m2-debian.conf
+
+# The home directory of the Java Runtime Environment (JRE) or Java Development
+# Kit (JDK). You can either directly set JAVA_HOME in debian/rules or set
+# JAVA_HOME_DIRS to multiple possible home directories. The first existing
+# directory from this list is used for JAVA_HOME. You can also override
+# JAVACMD in case you don't want to use the default JAVA_HOME/bin/java.
+JAVA_HOME = $(shell for jh in $(JAVA_HOME_DIRS); do if [ -x "$$jh/bin/java" ]; then \
+ echo $${jh}; exit 0; fi; done)
+JAVACMD = $(JAVA_HOME)/bin/java
+
+# You can list all Java ARchives (JARs) to be added to the class path in
+# DEB_JARS, either with their full path or just the basename if the JAR is
+# in /usr/share/java. You may also ommit the ".jar" extension. Non-existing
+# files will silently be ignored. tools.jar is automatically added to the
+# end of the class path if it exists in the JDK's lib directory.
+# You can override the complete class path using DEB_CLASSPATH.
+DEB_JARS_BASE = /usr/share/java
+DEB_CLASSPATH = $(MAVEN_HOME)/boot/plexus-classworlds-2.x.jar:$(shell for jar in $(DEB_JARS); do \
+ if [ -f "$$jar" ]; then echo -n "$${jar}:"; fi; \
+ if [ -f "$$jar".jar ]; then echo -n "$${jar}.jar:"; fi; \
+ if [ -f $(DEB_JARS_BASE)/"$$jar" ]; then echo -n "$(DEB_JARS_BASE)/$${jar}:"; fi; \
+ if [ -f $(DEB_JARS_BASE)/"$$jar".jar ]; then echo -n "$(DEB_JARS_BASE)/$${jar}.jar:"; fi; \
+ done; \
+ if [ -f "$(JAVA_HOME)/lib/tools.jar" ]; then echo -n "$(JAVA_HOME)/lib/tools.jar"; fi)
+
+# Extra arguments for the Maven command line.
+DEB_MAVEN_ARGS =
+
+# Extra arguments for the mh_patchpoms command line
+DEB_PATCHPOMS_ARGS =
+
+# Extra arguments for the mh_resolve_dependencies command line
+DEB_RESOLVEDEP_ARGS =
+
+# If true, install the Maven jars to /usr/share/java automatically
+DEB_MAVEN_INSTALL_TO_USJ = true
+
+# The name of the binary package that gets the jar files installed. The
+# first package by default.
+DEB_JAR_PACKAGE = $(firstword $(shell dh_listpackages))
+
+# The name of the package containing the documentation. The second package
+# by default. Leave empty to skip generating documentation.
+DEB_DOC_PACKAGE = $(firstword $(shell dh_listpackages | grep -v "^$(DEB_JAR_PACKAGE)$$" | grep "\-doc$$"))
+
+# Property file for Maven, defaults to debian/maven.properties if it exists.
+# You may define additional properties. Please note that command-line
+# arguments in MAVEN_ARGS (see below) override the settings in pom.xml and
+# the property file.
+DEB_MAVEN_PROPERTYFILE = $(shell test -f $(CURDIR)/debian/maven.properties && echo $(CURDIR)/debian/maven.properties)
+
+# You can specify additional JVM arguments in MAVEN_OPTS and Maven
+# command-line arguments in MAVEN_ARGS. You can additionally define
+# MAVEN_ARGS_<package> for each individual package.
+DEB_MAVEN_INVOKE = cd $(DEB_BUILDDIR) && $(JAVACMD) -noverify -cp $(DEB_CLASSPATH) \
+ $(JAVA_OPTS) -Dclassworlds.conf=$(MAVEN_CLASSCONF) \
+ -Dmaven.home=/usr/share/maven \
+ -Dmaven.multiModuleProjectDirectory=$(CURDIR) \
+ org.codehaus.plexus.classworlds.launcher.Launcher \
+ -s/etc/maven/settings-debian.xml \
+ -Dmaven.repo.local=$(DEB_MAVEN_REPO) \
+ $(if $(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS_$(cdbs_curpkg)),$(DEB_MAVEN_ARGS))
+
+# Targets to invoke for building, installing, testing and cleaning up.
+# Building uses the default target from build.xml, installing and testing is
+# only called if the corresponding variable is set. You can also specify
+# multiple targets for each step.
+DEB_MAVEN_BUILD_TARGET = package
+DEB_MAVEN_INSTALL_TARGET = org.debian.maven:debian-maven-plugin:$(MAVEN_DEBIAN_VERSION):install
+DEB_MAVEN_CHECK_TARGET = test
+DEB_MAVEN_CLEAN_TARGET = clean
+DEB_MAVEN_DOC_TARGET = javadoc:jar
+DEB_MAVEN_INSTALL_DOC_TARGET =
+
+endif
=====================================
debian/maven.mk
=====================================
@@ -0,0 +1,156 @@
+# This file is based on ant.mk
+
+# Copyright © 2003 Stefan Gybas <sgybas at debian.org>
+# Copyright © 2008 Torsten Werner <twerner at debian.org>
+# Copyright © 2009-2011 Ludovic Claude <ludovic.claude at laposte.net>
+# Copyright © 2010-2011 Damien Raude-Morvan <drazzib at debian.org>
+# Description: Builds and cleans packages which have an Maven pom.xml file
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+# 02111-1307 USA.
+
+_cdbs_scripts_path ?= /usr/lib/cdbs
+_cdbs_rules_path ?= /usr/share/cdbs/1/rules
+_cdbs_class_path ?= /usr/share/cdbs/1/class
+
+ifndef _cdbs_class_maven
+_cdbs_class_maven = 1
+
+include /usr/share/cdbs/1/rules/buildcore.mk
+include debian/maven-vars.mk
+
+DEB_MAVEN_REPO := $(CURDIR)/debian/maven-repo
+
+JAVA_OPTS = \
+ $(shell test -n "$(DEB_MAVEN_PROPERTYFILE)" && echo -Dproperties.file.manual=$(DEB_MAVEN_PROPERTYFILE))
+
+# Export the date of the latest entry in debian/changelog (used by maven-archiver to make reproducible builds)
+ifneq ("$(wildcard debian/changelog)","")
+ export DEB_CHANGELOG_DATETIME=$(shell dpkg-parsechangelog --show-field Date)
+ export DEB_CHANGELOG_TIMESTAMP=$(shell date '--date=$(DEB_CHANGELOG_DATETIME)' +%s)
+endif
+
+DEB_PHONY_RULES += maven-sanity-check before-mvn-build mvn-build after-mvn-build patch-poms unpatch-poms
+
+cdbs_use_maven_substvars := $(shell grep -q "{maven:\w*Depends}" debian/control && echo yes)
+cdbs_new_poms_file := $(shell test ! -f debian/$(DEB_JAR_PACKAGE).poms && echo yes)
+cdbs_new_maven_rules_file := $(shell test ! -f debian/maven.rules && echo yes)
+
+maven-sanity-check:
+ @if ! test -x "$(JAVACMD)"; then \
+ echo "You must specify a valid JAVA_HOME or JAVACMD!"; \
+ exit 1; \
+ fi
+ @if ! test -r "$(MAVEN_HOME)/boot/plexus-classworlds-2.x.jar"; then \
+ echo "You must specify a valid MAVEN_HOME directory!"; \
+ exit 1; \
+ fi
+
+debian/$(DEB_JAR_PACKAGE).poms:
+ mh_lspoms --non-interactive --offline -p$(DEB_JAR_PACKAGE)
+
+debian/maven.rules:
+ mh_lspoms --non-interactive --offline -p$(DEB_JAR_PACKAGE) --force
+
+ifeq (, $(DEB_DOC_PACKAGE))
+DEB_PATCHPOMS_ARGS += --build-no-docs
+endif
+
+debian/stamp-poms-patched: debian/maven-repo
+ mh_patchpoms -p$(DEB_JAR_PACKAGE) --debian-build --keep-pom-version --maven-repo=$(DEB_MAVEN_REPO) $(DEB_PATCHPOMS_ARGS)
+ touch debian/stamp-poms-patched
+
+patch-poms: debian/$(DEB_JAR_PACKAGE).poms debian/maven.rules debian/stamp-poms-patched
+
+unpatch-poms: debian/$(DEB_JAR_PACKAGE).poms
+ mh_unpatchpoms -p$(DEB_JAR_PACKAGE)
+ $(RM) -f debian/stamp-poms-patched
+
+debian/maven-repo:
+ /usr/share/maven-debian-helper/copy-repo.sh $(CURDIR)/debian
+
+post-patches:: patch-poms
+
+clean:: unpatch-poms
+ mh_clean
+
+common-build-arch common-build-indep:: maven-sanity-check debian/stamp-maven-build
+debian/stamp-maven-build: debian/maven-repo before-mvn-build mvn-build after-mvn-build
+mvn-build:
+ # before-build target may be used to unpatch the pom files, so we need to check if
+ # patching the pom files is needed here, normally not
+ if [ ! -f pom.xml.save ]; then \
+ $(MAKE) -f debian/rules patch-poms; \
+ fi
+ $(DEB_MAVEN_INVOKE) $(DEB_MAVEN_BUILD_TARGET) -DskipTests
+# Placeholders to insert custom processing before and after a Maven build
+before-mvn-build::
+after-mvn-build::
+
+cleanbuilddir:: DEB_PATCHPOMS_ARGS += --ignore-rules=debian/maven.ignoreRules --clean-ignore-rules=debian/maven.cleanIgnoreRules
+cleanbuilddir:: maven-sanity-check post-patches debian/maven-repo
+ -$(DEB_MAVEN_INVOKE) $(DEB_MAVEN_CLEAN_TARGET)
+ $(RM) -r $(DEB_MAVEN_REPO) debian/stamp-maven-build
+ $(if $(cdbs_new_poms_file), $(RM) debian/$(DEB_JAR_PACKAGE).poms)
+ $(if $(cdbs_new_maven_rules_file), $(RM) debian/maven.rules)
+ $(if $(cdbs_use_maven_substvars), $(RM) debian/*.substvars)
+ $(MAKE) -f debian/rules unpatch-poms
+
+# extra arguments for the installation step
+PLUGIN_ARGS = -Ddebian.dir=$(CURDIR)/debian -Ddebian.package=$(DEB_JAR_PACKAGE) -Dmaven.repo.local=$(DEB_MAVEN_REPO) -Dinstall.to.usj=$(DEB_MAVEN_INSTALL_TO_USJ)
+
+ifneq (, $(DEB_DOC_PACKAGE))
+DEB_RESOLVEDEP_ARGS += --javadoc
+endif
+DEB_RESOLVEDEP_ARGS += --base-directory=$(CURDIR) --non-explore
+
+common-install-arch common-install-indep:: common-install-impl
+common-install-impl::
+ $(if $(DEB_MAVEN_INSTALL_TARGET),$(DEB_MAVEN_INVOKE) $(PLUGIN_ARGS) $(DEB_MAVEN_INSTALL_TARGET), at echo "DEB_MAVEN_INSTALL_TARGET unset, skipping default maven.mk common-install target")
+ $(if $(cdbs_use_maven_substvars), mh_resolve_dependencies --non-interactive --offline --build -p$(DEB_JAR_PACKAGE) $(DEB_RESOLVEDEP_ARGS) )
+
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+common-build-arch common-build-indep:: debian/stamp-maven-check
+debian/stamp-maven-check: debian/stamp-maven-build
+ $(if $(DEB_MAVEN_CHECK_TARGET),$(DEB_MAVEN_INVOKE) $(PLUGIN_ARGS) $(DEB_MAVEN_CHECK_TARGET), at echo "DEB_MAVEN_CHECK_TARGET unset, not running checks")
+ $(if $(DEB_MAVEN_CHECK_TARGET),touch $@)
+
+clean::
+ $(if $(DEB_MAVEN_CHECK_TARGET),$(RM) debian/stamp-maven-check)
+endif
+
+ifneq (,$(DEB_DOC_PACKAGE))
+# extra arguments for the installation step
+PLUGIN_DOC_ARGS = -Ddebian.dir=$(CURDIR)/debian -Ddebian.package=$(DEB_DOC_PACKAGE) -Dnotimestamp=true -Dlocale=en_US
+
+common-build-arch common-build-indep:: debian/stamp-maven-doc
+debian/stamp-maven-doc: debian/stamp-maven-build
+ if [ ! -f pom.xml.save ]; then \
+ $(MAKE) -f debian/rules patch-poms; \
+ fi
+ $(if $(DEB_MAVEN_DOC_TARGET),$(DEB_MAVEN_INVOKE) $(PLUGIN_DOC_ARGS) $(DEB_MAVEN_DOC_TARGET), at echo "DEB_MAVEN_DOC_TARGET unset, not generating documentation")
+ $(if $(DEB_MAVEN_DOC_TARGET),touch $@)
+
+common-install-impl::
+ $(if $(DEB_MAVEN_INSTALL_DOC_TARGET),$(DEB_MAVEN_INVOKE) $(PLUGIN_DOC_ARGS) $(DEB_MAVEN_INSTALL_DOC_TARGET), at echo "DEB_MAVEN_INSTALL_DOC_TARGET unset, skipping documentation maven.mk common-install target")
+ $(if $(cdbs_use_maven_substvars), cp debian/$(DEB_JAR_PACKAGE).substvars debian/$(DEB_DOC_PACKAGE).substvars)
+ # cleanup generated docs
+ $(RM) -f target/apidocs/*.sh target/apidocs/options
+
+clean::
+ $(if $(DEB_MAVEN_DOC_TARGET),$(RM) debian/stamp-maven-doc)
+endif
+
+endif
=====================================
debian/rules
=====================================
@@ -4,7 +4,9 @@
#export DH_VERBOSE=1
include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/maven.mk
+
+# file vendored from "maven-debian-helper"
+include debian/maven.mk
DEB_MAVEN_INSTALL_TO_USJ := false
DEB_MAVEN_BUILD_TARGET := package install
View it on GitLab: https://salsa.debian.org/java-team/antlr3/-/compare/30392aebc57d46f3a5326c9fec768fc674b954ee...752ebf9585faeec580cd365fff929fe9de0f7e3f
--
View it on GitLab: https://salsa.debian.org/java-team/antlr3/-/compare/30392aebc57d46f3a5326c9fec768fc674b954ee...752ebf9585faeec580cd365fff929fe9de0f7e3f
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20250905/dc95070b/attachment.htm>
More information about the pkg-java-commits
mailing list