[Git][clojure-team/core-async-clojure][debian/main] d/rules: build using leiningen. (Closes: #976415)

Louis-Philippe Véronneau gitlab at salsa.debian.org
Mon Dec 7 17:39:37 GMT 2020



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


Commits:
46e18900 by Louis-Philippe Véronneau at 2020-12-07T12:39:18-05:00
d/rules: build using leiningen. (Closes: #976415)

- - - - -


8 changed files:

- debian/changelog
- debian/control
- − debian/libcore-async-clojure.jlibs
- debian/libcore-async-clojure.poms
- + debian/patches/0001_Lein_Local.patch
- + debian/patches/series
- + debian/pom.xml
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+core-async-clojure (1.3.610-2) UNRELEASED; urgency=medium
+
+  * d/rules: build using leiningen. (Closes: #976415)
+
+ -- Louis-Philippe Véronneau <pollo at debian.org>  Mon, 07 Dec 2020 12:26:22 -0500
+
 core-async-clojure (1.3.610-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -6,9 +6,10 @@ Uploaders: Apollon Oikonomopoulos <apoikos at debian.org>
 Build-Depends: debhelper-compat (= 13),
                javahelper,
                maven-repo-helper,
-               clojure,
                default-jdk,
-               libtools-analyzer-jvm-clojure
+               libclojure-java,
+               libtools-analyzer-jvm-clojure,
+               leiningen,
 Standards-Version: 4.5.0
 Vcs-Git: https://salsa.debian.org/clojure-team/core-async-clojure.git
 Vcs-Browser: https://salsa.debian.org/clojure-team/core-async-clojure
@@ -17,7 +18,11 @@ Rules-Requires-Root: no
 
 Package: libcore-async-clojure
 Architecture: all
-Depends: ${java:Depends}, ${misc:Depends}
+Depends: ${java:Depends},
+         ${misc:Depends},
+         libclojure-java,
+         libtools-analyzer-jvm-clojure,
+         leiningen,
 Recommends: ${java:Recommends}
 Description: asynchronous programming using channels for Clojure
  core.async is a Clojure library designed to provide facilities for async


=====================================
debian/libcore-async-clojure.jlibs deleted
=====================================
@@ -1 +0,0 @@
-core.async.jar


=====================================
debian/libcore-async-clojure.poms
=====================================
@@ -1 +1 @@
-pom.xml --artifact=core.async.jar --usj-name=core.async
+debian/pom.xml --artifact=target/core.async.jar --usj-name=core.async


=====================================
debian/patches/0001_Lein_Local.patch
=====================================
@@ -0,0 +1,37 @@
+Patch project.clj so we can build using lein locally.
+Index: core-async-clojure/project.clj
+===================================================================
+--- core-async-clojure.orig/project.clj
++++ core-async-clojure/project.clj
+@@ -1,12 +1,10 @@
+-(defproject org.clojure/core.async "0.1.0-SNAPSHOT"
++(defproject org.clojure/core.async "1.3.610"
+   :description "Facilities for async programming and communication in Clojure"
+   :url "https://github.com/clojure/core.async"
+   :license {:name "Eclipse Public License"
+             :url "http://www.eclipse.org/legal/epl-v10.html"}
+-  :parent [org.clojure/pom.contrib "1.0.0"]
+-  :dependencies [[org.clojure/clojure "1.9.0"]
+-                 [org.clojure/tools.analyzer.jvm "1.0.0"]
+-                 [org.clojure/clojurescript "1.10.597" :scope "provided"]]
++  :dependencies [[org.clojure/clojure "1.10.x"]
++                 [org.clojure/tools.analyzer.jvm "debian"]]
+   :global-vars {*warn-on-reflection* true}
+   :source-paths ["src/main/clojure"]
+   :test-paths ["src/test/clojure"]
+@@ -14,8 +12,6 @@
+   :java-source-paths ["src/main/java"]
+   :profiles {:dev {:source-paths ["examples"]}}
+ 
+-  :plugins [[lein-cljsbuild "1.1.7"]]
+-
+   :clean-targets ["tests.js" "tests.js.map"
+                   "out" "out-simp" "out-simp-node"
+                   "out-adv" "out-adv-node"]
+@@ -59,4 +55,5 @@
+                 :pretty-print false
+                 :output-dir "out-adv-node"
+                 :output-to "tests.js"
+-                :source-map "tests.js.map"}}]})
++                :source-map "tests.js.map"}}]}
++  :local-repo "debian/maven-repo")


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+0001_Lein_Local.patch


=====================================
debian/pom.xml
=====================================
@@ -0,0 +1,98 @@
+<?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.clojure</groupId>
+  <artifactId>core.async</artifactId>
+  <packaging>jar</packaging>
+  <version>1.3.610</version>
+  <name>core.async</name>
+  <description>Facilities for async programming and communication in Clojure</description>
+  <url>https://github.com/clojure/core.async</url>
+  <licenses>
+    <license>
+      <name>Eclipse Public License</name>
+      <url>http://www.eclipse.org/legal/epl-v10.html</url>
+    </license>
+  </licenses>
+  <scm>
+    <tag>9454d6bb09b26eb34f097de2a27883adee44a7f7</tag>
+  </scm>
+  <build>
+    <sourceDirectory>src/main/clojure</sourceDirectory>
+    <testSourceDirectory>src/test/clojure</testSourceDirectory>
+    <resources>
+      <resource>
+        <directory>resources</directory>
+      </resource>
+    </resources>
+    <testResources>
+      <testResource>
+        <directory>resources</directory>
+      </testResource>
+    </testResources>
+    <directory>target</directory>
+    <outputDirectory>target/classes</outputDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.7</version>
+        <executions>
+          <execution>
+            <id>add-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>src/main/java</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <repositories>
+    <repository>
+      <id>central</id>
+      <url>https://repo1.maven.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+    </repository>
+    <repository>
+      <id>clojars</id>
+      <url>https://repo.clojars.org/</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+      <releases>
+        <enabled>true</enabled>
+      </releases>
+    </repository>
+  </repositories>
+  <dependencyManagement>
+    <dependencies/>
+  </dependencyManagement>
+  <dependencies>
+    <dependency>
+      <groupId>org.clojure</groupId>
+      <artifactId>clojure</artifactId>
+      <version>1.10.x</version>
+    </dependency>
+    <dependency>
+      <groupId>org.clojure</groupId>
+      <artifactId>tools.analyzer.jvm</artifactId>
+      <version>debian</version>
+    </dependency>
+  </dependencies>
+</project>
+
+<!-- This file was autogenerated by Leiningen.
+  Please do not edit it directly; instead edit project.clj and regenerate it.
+  It should not be considered canonical data. For more information see
+  https://github.com/technomancy/leiningen -->


=====================================
debian/rules
=====================================
@@ -1,24 +1,30 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/pkg-info.mk
 include /usr/share/javahelper/java-vars.mk
 
-PRODUCED_JAR=core.async.jar
-export CLASSPATH=/usr/share/java/clojure.jar:/usr/share/java/tools.analyzer.jvm.jar
+export LEIN_HOME=$(CURDIR)/.lein
+export LEIN_OFFLINE=true
+NAME=core.async
 
 %:
-	dh $@ --with javahelper,jh_maven_repo_helper
+	dh $@ --with javahelper --with maven_repo_helper
 
-override_jh_build:
-	jar cf $(PRODUCED_JAR) -C src/main/clojure .
+override_dh_auto_configure:
+	cd debian && ln -sf /usr/share/maven-repo .
 
-override_jh_clean:
-	jh_clean
-	rm -f $(CURDIR)/$(PRODUCED_JAR)
-
-override_jh_classpath:
-	jh_classpath $(PRODUCED_JAR)
+override_dh_auto_build:
+	lein jar
+	# symlink so we don't need a version in debian/*.poms
+	cd target && ln -sf $(NAME)-$(DEB_VERSION_UPSTREAM).jar $(NAME).jar
 
 override_dh_auto_test:
-	dh_auto_test
-	(cd src/test/clojure && find . -name '*.clj' | \
-		xargs clojure -cp $(CLASSPATH):$(CURDIR)/$(PRODUCED_JAR))
+	lein test
+
+override_jh_installlibs:
+	jh_installlibs target/$(NAME).jar
+
+override_dh_clean:
+	rm -f debian/maven-repo
+	rm -Rf target
+	dh_clean



View it on GitLab: https://salsa.debian.org/clojure-team/core-async-clojure/-/commit/46e189006d2b8eab3bd5e79797ea7bdb21562e57

-- 
View it on GitLab: https://salsa.debian.org/clojure-team/core-async-clojure/-/commit/46e189006d2b8eab3bd5e79797ea7bdb21562e57
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/20201207/764401f5/attachment.html>


More information about the pkg-java-commits mailing list