[Git][clojure-team/puppetlabs-i18n-clojure][debian/main] * Rebuild using lein.

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



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


Commits:
56b927cc by Louis-Philippe Véronneau at 2020-12-21T12:06:37-05:00
* Rebuild using lein.

- - - - -


9 changed files:

- − debian/README.source
- debian/changelog
- debian/control
- − debian/libpuppetlabs-i18n-clojure.jlibs
- debian/libpuppetlabs-i18n-clojure.poms
- + debian/patches/0001_Lein_Local.patch
- + debian/patches/series
- − debian/pom.xml
- debian/rules


Changes:

=====================================
debian/README.source deleted
=====================================
@@ -1,6 +0,0 @@
-To fix bug #976751, I started to rebuild this package using leiningen. Sadly,
-#976738 makes it hardly possible to build this way.
-
-I did push a commit rebuilding this package using leinigen in the
-debian/main-lein branch. When #976738 is fixed, it would good to rebase it and
-build using lein.


=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+puppetlabs-i18n-clojure (0.9.0-2) unstable; urgency=medium
+
+  * Team upload.
+  * Rebuild using lein.
+
+ -- Louis-Philippe Véronneau <pollo at debian.org>  Mon, 21 Dec 2020 12:06:08 -0500
+
 puppetlabs-i18n-clojure (0.9.0-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -5,12 +5,16 @@ Maintainer: Debian Clojure Maintainers <pkg-clojure-maintainers at lists.alioth.deb
 Uploaders: Apollon Oikonomopoulos <apoikos at debian.org>
 Build-Depends: debhelper-compat (= 13),
                default-jdk-headless,
-               gettext-base,
                javahelper,
                maven-repo-helper,
-               clojure,
-               libcpath-clojure,
-               libkitchensink-clojure,
+               libclojure-java,
+               libcpath-clojure (>= 0.1.2-2),
+               gettext-base (>= 0.21-3),
+               libkitchensink-clojure (>= 3.1.1),
+               libnrepl-clojure <!nocheck>,
+               libcomplete-clojure <!nocheck>,
+               git <!nocheck>,
+               leiningen,
 Standards-Version: 4.5.1
 Vcs-Git: https://salsa.debian.org/clojure-team/puppetlabs-i18n-clojure.git
 Vcs-Browser: https://salsa.debian.org/clojure-team/puppetlabs-i18n-clojure
@@ -22,8 +26,9 @@ Architecture: all
 Depends: ${java:Depends},
          ${misc:Depends},
          libclojure-java,
-         libcpath-clojure,
-         libkitchensink-clojure,
+         libcpath-clojure (>= 0.1.2-2),
+         gettext-base (>= 0.21-3),
+         libkitchensink-clojure (>= 3.1.1),
 Recommends: ${java:Recommends}
 Description: Clojure i18n library
  puppetlabs-i18n provides convenience functions to access the JVM's


=====================================
debian/libpuppetlabs-i18n-clojure.jlibs deleted
=====================================
@@ -1 +0,0 @@
-puppetlabs-i18n.jar


=====================================
debian/libpuppetlabs-i18n-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]
-#
-debian/pom.xml --artifact=puppetlabs-i18n.jar --usj-name=puppetlabs-i18n
+debian/pom.xml --artifact=target/puppetlabs-i18n.jar --usj-name=puppetlabs-i18n


=====================================
debian/patches/0001_Lein_Local.patch
=====================================
@@ -0,0 +1,31 @@
+Patch project.clj to build locally using lein.
+Index: puppetlabs-i18n-clojure/project.clj
+===================================================================
+--- puppetlabs-i18n-clojure.orig/project.clj
++++ puppetlabs-i18n-clojure/project.clj
+@@ -5,11 +5,14 @@
+             :url "http://www.apache.org/licenses/LICENSE-2.0"}
+ 
+   :pedantic? :abort
+-  :dependencies [[org.clojure/clojure "1.10.1"]
+-                 [cpath-clj "0.1.2"]
+-                 [org.gnu.gettext/libintl "0.18.3"]]
++  :dependencies [[org.clojure/clojure "1.10.x"]
++                 [cpath-clj "debian"]
++                 [org.gnu.gettext/libintl "debian"]
++                 [com.fasterxml.jackson.core/jackson-core "2.x"]
++                 [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.x"]
++                 [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.x"]]
+ 
+-  :profiles {:dev {:dependencies [[puppetlabs/kitchensink "2.1.0"
++  :profiles {:dev {:dependencies [[puppetlabs/kitchensink "debian"
+                                    :exclusions [org.clojure/clojure]]]}}
+ 
+   :main puppetlabs.i18n.main
+@@ -18,4 +21,5 @@
+   :deploy-repositories [["releases" {:url "https://clojars.org/repo"
+                                      :username :env/clojars_jenkins_username
+                                      :password :env/clojars_jenkins_password
+-                                     :sign-releases false}]])
++                                     :sign-releases false}]]
++  :local-repo "debian/maven-repo")


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


=====================================
debian/pom.xml deleted
=====================================
@@ -1,95 +0,0 @@
-<?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>puppetlabs</groupId>
-  <artifactId>i18n</artifactId>
-  <packaging>jar</packaging>
-  <version>0.9.0</version>
-  <name>i18n</name>
-  <description>Clojure i18n library</description>
-  <url>http://github.com/puppetlabs/clj-i18n</url>
-  <licenses>
-    <license>
-      <name>Apache License, Version 2.0</name>
-      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
-    </license>
-  </licenses>
-  <scm>
-    <tag>97c1effbfac5dbd56ce1ec6458d34c4e9aba4ebc</tag>
-  </scm>
-  <build>
-    <sourceDirectory>src</sourceDirectory>
-    <testSourceDirectory>test</testSourceDirectory>
-    <resources>
-      <resource>
-        <directory>resources</directory>
-      </resource>
-    </resources>
-    <testResources>
-      <testResource>
-        <directory>resources</directory>
-      </testResource>
-    </testResources>
-    <directory>target</directory>
-    <outputDirectory>target/classes</outputDirectory>
-    <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.1</version>
-    </dependency>
-    <dependency>
-      <groupId>cpath-clj</groupId>
-      <artifactId>cpath-clj</artifactId>
-      <version>0.1.2</version>
-    </dependency>
-    <dependency>
-      <groupId>org.gnu.gettext</groupId>
-      <artifactId>libintl</artifactId>
-      <version>0.18.3</version>
-    </dependency>
-    <dependency>
-      <groupId>puppetlabs</groupId>
-      <artifactId>kitchensink</artifactId>
-      <version>2.1.0</version>
-      <exclusions>
-        <exclusion>
-          <artifactId>clojure</artifactId>
-          <groupId>org.clojure</groupId>
-        </exclusion>
-      </exclusions>
-      <scope>test</scope>
-    </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
=====================================
@@ -3,23 +3,32 @@
 include /usr/share/javahelper/java-vars.mk
 include /usr/share/dpkg/pkg-info.mk
 
-export CLASSPATH=/usr/share/java/clojure.jar:/usr/share/java/libintl.jar:/usr/share/java/cpath-clj.jar
-TEST_CLASSPATH=/usr/share/java/kitchensink.jar
-
-PRODUCED_JAR=puppetlabs-i18n.jar
+export LEIN_HOME=$(CURDIR)/.lein
+export LEIN_OFFLINE=true
+NAME=puppetlabs-i18n
 
 %:
 	dh $@ --with javahelper --with maven_repo_helper
 
-override_jh_build:
-	jar cf $(PRODUCED_JAR) -C src .
+override_dh_auto_configure:
+	cd debian && ln -sf /usr/share/maven-repo .
 
-override_jh_clean:
-	jh_clean
-	rm -rf $(CURDIR)/resources/puppetlabs $(CURDIR)/resources/*.clj
-	rm -f $(CURDIR)/$(PRODUCED_JAR)
+override_dh_auto_build:
+	lein pom debian/pom.xml
+	lein jar
+	# symlink so we don't need a version in debian/*.poms
+	cd target && ln -sf i18n-$(DEB_VERSION_UPSTREAM).jar $(NAME).jar
 
 override_dh_auto_test:
-	dh_auto_test
-	(cd test && find . -name "*_test.clj" | \
-		xargs --verbose clojure -cp $(CURDIR)/$(PRODUCED_JAR):$(CLASSPATH):$(TEST_CLASSPATH))
+	make i18n
+	lein test
+
+override_jh_installlibs:
+	jh_installlibs target/$(NAME).jar
+
+override_dh_clean:
+	rm -f debian/maven-repo
+	rm -Rf target
+	rm -Rf ressources/*
+	rm -f debian/pom.xml
+	dh_clean



View it on GitLab: https://salsa.debian.org/clojure-team/puppetlabs-i18n-clojure/-/commit/56b927cc278295eebc87134c64baa5635325ce11

-- 
View it on GitLab: https://salsa.debian.org/clojure-team/puppetlabs-i18n-clojure/-/commit/56b927cc278295eebc87134c64baa5635325ce11
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/20201221/fbcf3eff/attachment.html>


More information about the pkg-java-commits mailing list