[Git][clojure-team/tools-namespace-clojure][debian/main] 3 commits: modernise build. (Closes: #1073107)

Louis-Philippe Véronneau (@pollo) gitlab at salsa.debian.org
Wed Jul 3 18:34:50 BST 2024



Louis-Philippe Véronneau pushed to branch debian/main at Debian Clojure Maintainers / tools-namespace-clojure


Commits:
6b35101e by Louis-Philippe Véronneau at 2024-07-03T13:32:20-04:00
modernise build. (Closes: #1073107)

- - - - -
16c793d8 by Louis-Philippe Véronneau at 2024-07-03T13:32:23-04:00
d/tests: add autopkgtests.

- - - - -
076bc7bb by Louis-Philippe Véronneau at 2024-07-03T13:34:10-04:00
releasing package tools-namespace-clojure version 1.3.0-2

- - - - -


15 changed files:

- debian/changelog
- − debian/compat
- debian/control
- debian/copyright
- + debian/libtools-namespace-clojure.classpath
- debian/libtools-namespace-clojure.poms
- − debian/maven.cleanIgnoreRules
- − debian/maven.ignoreRules
- − debian/maven.publishedRules
- − debian/maven.rules
- debian/rules
- + debian/run-build-tests
- + debian/tests/build
- + debian/tests/control
- + debian/tests/unittests


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+tools-namespace-clojure (1.3.0-2) unstable; urgency=medium
+
+  * Team upload.
+  * modernise build. (Closes: #1073107)
+  * d/tests: add autopkgtests.
+
+ -- Louis-Philippe Véronneau <pollo at debian.org>  Wed, 03 Jul 2024 13:32:36 -0400
+
 tools-namespace-clojure (1.3.0-1) experimental; urgency=medium
 
   * Team upload.


=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-10


=====================================
debian/control
=====================================
@@ -2,22 +2,28 @@ Source: tools-namespace-clojure
 Section: java
 Priority: optional
 Maintainer: Debian Clojure Maintainers <team+clojure at tracker.debian.org>
-Uploaders:
- Apollon Oikonomopoulos <apoikos at debian.org>
-Build-Depends:
- clojure (>= 1.8),
- debhelper (>= 10),
- default-jdk-headless,
- javahelper (>= 0.32),
- markdown,
- maven-repo-helper (>= 1.5~)
-Standards-Version: 4.0.0
+Uploaders: Apollon Oikonomopoulos <apoikos at debian.org>
+Build-Depends: debhelper-compat (= 13),
+               default-jdk-headless,
+               maven-repo-helper,
+               javahelper,
+               clojure,
+               libbultitude-clojure <!nocheck>,
+               libtest-check-clojure <!nocheck>,
+               libtools-reader-clojure <!nocheck>,
+               libjava-classpath-clojure <!nocheck>,
+Standards-Version: 4.6.2
+Homepage: https://github.com/clojure/tools.namespace
+Vcs-Git: https://salsa.debian.org/clojure-team/tools-namespace-clojure-clojure.git
+Vcs-Browser: https://salsa.debian.org/clojure-team/tools-namespace-clojure-clojure
+Rules-Requires-Root: no
 
 Package: libtools-namespace-clojure
 Architecture: all
 Depends:
  ${java:Depends},
- ${misc:Depends}
+ ${misc:Depends},
+ libclojure-java,
 Recommends:
  ${java:Recommends}
 Description: tools for managing namespaces in Clojure


=====================================
debian/copyright
=====================================
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: tools.namespace
 Source: https://github.com/clojure/tools.namespace
 


=====================================
debian/libtools-namespace-clojure.classpath
=====================================
@@ -0,0 +1 @@
+usr/share/java/tools.namespace.jar /usr/share/java/clojure.jar


=====================================
debian/libtools-namespace-clojure.poms
=====================================
@@ -1,28 +1 @@
-# List of POM files for the package
-# Format of this file is:
-# <path to pom file> [option]*
-# where option can be:
-#   --ignore: ignore this POM and its artifact if any
-#   --ignore-pom: don't install the POM. To use on POM files that are created
-#     temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
-#   --no-parent: remove the <parent> tag from the POM
-#   --package=<package>: an alternative package to use when installing this POM
-#      and its artifact
-#   --has-package-version: to indicate that the original version of the POM is the same as the upstream part
-#      of the version for the package.
-#   --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
-#      during a clean operation with mh_cleanpom or mh_installpom
-#   --artifact=<path>: path to the build artifact associated with this POM,
-#      it will be installed when using the command mh_install. [mh_install]
-#   --java-lib: install the jar into /usr/share/java to comply with Debian
-#      packaging guidelines
-#   --usj-name=<name>: name to use when installing the library in /usr/share/java
-#   --usj-version=<version>: version to use when installing the library in /usr/share/java
-#   --no-usj-versionless: don't install the versionless link in /usr/share/java
-#   --dest-jar=<path>: the destination for the real jar.
-#     It will be installed with mh_install. [mh_install]
-#   --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
-#   --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
-#     Empty by default. [mh_install]
-#
 pom.xml --no-parent --has-package-version --artifact=*.jar --java-lib


=====================================
debian/maven.cleanIgnoreRules deleted
=====================================
@@ -1 +0,0 @@
-


=====================================
debian/maven.ignoreRules deleted
=====================================
@@ -1 +0,0 @@
-


=====================================
debian/maven.publishedRules deleted
=====================================
@@ -1 +0,0 @@
-


=====================================
debian/maven.rules deleted
=====================================
@@ -1,2 +0,0 @@
-
-* clojure * s/([0-9]+)\.([0-9]+).*/$1.x/ * *


=====================================
debian/rules
=====================================
@@ -1,9 +1,6 @@
 #!/usr/bin/make -f
 
 include /usr/share/javahelper/java-vars.mk
-include /usr/share/dpkg/pkg-info.mk
-
-MDWN_DOCS = $(patsubst %.md,%.html,$(wildcard $(CURDIR)/*.md))
 
 export CLASSPATH=/usr/share/java/clojure.jar
 
@@ -12,40 +9,13 @@ PRODUCED_JAR=tools.namespace.jar
 %:
 	dh $@ --with javahelper --with maven_repo_helper
 
-override_jh_build: $(MDWN_DOCS)
+override_jh_build:
 	jar cf $(PRODUCED_JAR) -C src/main/clojure .
-	mkdir -p $(CURDIR)/doc/html && mv $^ $(CURDIR)/doc/html
 
 override_dh_auto_test:
-	dh_auto_test
-	(cd src/test/clojure && \
-	  find . -name "test_*.clj" | xargs clojure -cp $(CURDIR)/$(PRODUCED_JAR))
-
-override_jh_classpath:
-	jh_classpath $(PRODUCED_JAR)
-
-override_jh_installlibs:
-	jh_installlibs $(PRODUCED_JAR)
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+	debian/run-build-tests
+endif
 
-override_dh_installdocs:
-	dh_installdocs $(CURDIR)/*.md $(CURDIR)/doc/*
-
-override_jh_clean:
-	jh_clean
+exectute_after_jh_clean:
 	rm -f $(CURDIR)/$(PRODUCED_JAR)
-	rm -rf $(CURDIR)/doc
-
-get-orig-source:
-	uscan --download-version $(DEB_VERSION_UPSTREAM) --force-download --rename
-
-%.html:%.md
-	@echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"' \
-		'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' > $@
-	@echo "<html>" >> $@
-	@echo "<head>" >> $@
-	@echo "<title>$(shell head -n 1 $< | sed 's/^#*\s*//')</title>" >> $@
-	@echo "</head>" >> $@
-	@echo "<body>" >> $@
-	markdown $< >> $@
-	@echo "</body>" >> $@
-	@echo "</html>" >> $@


=====================================
debian/run-build-tests
=====================================
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -efu
+
+CLASSPATH=/usr/share/java/clojure.jar:/usr/share/java/tools.reader.jar:/usr/share/java/java.classpath.jar:/usr/share/java/bultitude.jar:/usr/share/java/test.check.jar:src/main/clojure:src/test/clojure
+
+clojure \
+    -cp $CLASSPATH \
+    -e "(require '[clojure.test])" \
+    -e "(require '[bultitude.core :as b])" \
+    -e '(def all-tests (b/namespaces-on-classpath :classpath "src/test/clojure"))' \
+    -e "(map #(require %) all-tests)" \
+    -e '(System/exit (if (clojure.test/successful? (clojure.test/run-all-tests #"clojure\.tools\.namespace\.(\S+)?-test")) 0 1))'


=====================================
debian/tests/build
=====================================
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+CLASSPATH=/usr/share/java/clojure.jar:/usr/share/java/tools.namespace.jar
+
+clojure -cp $CLASSPATH -e '(use '"'"'clojure.tools.namespace)'


=====================================
debian/tests/control
=====================================
@@ -0,0 +1,12 @@
+Tests: build
+Depends: @, clojure
+Restrictions: superficial, allow-stderr
+
+Tests: unittests
+Depends: @,
+         clojure,
+         libbultitude-clojure,
+         libtest-check-clojure,
+         libtools-reader-clojure,
+         libjava-classpath-clojure
+Restrictions: allow-stderr


=====================================
debian/tests/unittests
=====================================
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -efu
+
+CLASSPATH=/usr/share/java/clojure.jar:/usr/share/java/tools.reader.jar:/usr/share/java/java.classpath.jar:/usr/share/java/bultitude.jar:/usr/share/java/test.check.jar:/usr/share/java/tools.namespace.jar:test
+
+cp -a src/test/clojure "$AUTOPKGTEST_TMP/test"
+cd "$AUTOPKGTEST_TMP"
+
+clojure \
+    -cp $CLASSPATH \
+    -e "(require '[clojure.test])" \
+    -e "(require '[bultitude.core :as b])" \
+    -e '(def all-tests (b/namespaces-on-classpath :classpath "test"))' \
+    -e "(map #(require %) all-tests)" \
+    -e '(System/exit (if (clojure.test/successful? (clojure.test/run-all-tests #"clojure\.tools\.namespace\.(\S+)?-test")) 0 1))'



View it on GitLab: https://salsa.debian.org/clojure-team/tools-namespace-clojure/-/compare/4e5e967c99413347c6eb276734aef2dc97d3269f...076bc7bb5595adc07189b5bb7a9b5a6dde922d49

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/clojure-team/tools-namespace-clojure/-/compare/4e5e967c99413347c6eb276734aef2dc97d3269f...076bc7bb5595adc07189b5bb7a9b5a6dde922d49
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/20240703/4055a9f8/attachment.htm>


More information about the pkg-java-commits mailing list