[arch-commits] Commit in (6 files)

David Runge dvzrv at gemini.archlinux.org
Fri Dec 10 19:16:01 UTC 2021


    Date: Friday, December 10, 2021 @ 19:16:01
  Author: dvzrv
Revision: 1068144

Add openapi-diff.

Added:
  openapi-diff/
  openapi-diff/repos/
  openapi-diff/trunk/
  openapi-diff/trunk/PKGBUILD
  openapi-diff/trunk/openapi-diff-2.0.0-remove_git_hooks.patch
  openapi-diff/trunk/openapi-diff.sh

-------------------------------------------+
 PKGBUILD                                  |   44 ++++++++++++++++++++++++++++
 openapi-diff-2.0.0-remove_git_hooks.patch |   40 +++++++++++++++++++++++++
 openapi-diff.sh                           |    4 ++
 3 files changed, 88 insertions(+)

Added: openapi-diff/trunk/PKGBUILD
===================================================================
--- openapi-diff/trunk/PKGBUILD	                        (rev 0)
+++ openapi-diff/trunk/PKGBUILD	2021-12-10 19:16:01 UTC (rev 1068144)
@@ -0,0 +1,44 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=openapi-diff
+pkgver=2.0.0
+pkgrel=1
+pkgdesc=" Utility for comparing two OpenAPI specifications"
+arch=('any')
+url="https://github.com/OpenAPITools/openapi-diff"
+license=(Apache)
+depends=(bash java-runtime=8)
+makedepends=(maven java-environment=8 strip-nondeterminism)
+source=(
+  "$pkgname-$pkgver.tar.gz::https://github.com/OpenAPITools/${pkgname}/archive/refs/tags/${pkgver}.tar.gz"
+  "${pkgname}.sh"
+  "${pkgname}-2.0.0-remove_git_hooks.patch"
+)
+sha512sums=('fdccada8baa86af63ff051027cc35967993335b276c0d202749ba7c983e6e11be4e219cdbeadd9784ee46cbb6c9535321b5ca41833606a3758d9f9ad79561e78'
+            'e4143cff09abc59958f50a969ed3f010ab39e640cf77081e47e77cf3e2bb785645100572fd18bc508ea441732bc13a5a811332fdbfdbd7f8a0d6865f301f978e'
+            'b427cb671aef57c8364f3c987ed822a9aaa1ae15e3a756529eedf6d5df77b9ff66489753cdbc327f820a49c3ececcec58b42ef62d723331b48a537a89754d199')
+b2sums=('6a252a07a862744c3431c3f215faa748e184e1df5ea0c8d46763a4f8c4e949ed64f361785ac657ec7d6198b459a2cd3b358c49d3210d0547c1fdb7e05f2b3ec5'
+        'a28a194b1b5c731fd3093c22754fc7f6641441ae2acb1ad177b8ee573d8e3787af2b249740ffd1e3472f721e0274d0866c0acf1bf5c85f4a22fe1c2dcf24af7b'
+        '4ea504d3765bb2428e16a097bfc6278228f09b16fa11e5cd39507bc0e64d277c47e111fa8f69013a0d53b76248ff653f29d77158e06432a7946fc1941d8ad3ec')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  # remove maven plugin that requires git checkout: https://github.com/OpenAPITools/openapi-diff/issues/299
+  patch -Np1 -i ../"${pkgname}-2.0.0-remove_git_hooks.patch"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  mvn clean install
+  # Timestamps in JAR files generated by Maven do not honour SOURCE_DATE_EPOCH
+  # (https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318)
+  find . -type f -iname "*.jar" -exec strip-nondeterminism --timestamp "$SOURCE_DATE_EPOCH" {} \;
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  install -vDm 644  cli/target/openapi-diff-cli-2.0.0-all.jar "${pkgdir}/usr/share/java/${pkgname}/${pkgname}-cli.jar"
+  install -vDm 755 "../${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
+  ln -svf "${pkgname}" "${pkgdir}/usr/bin/${pkgname}-cli"
+  install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
+}

Added: openapi-diff/trunk/openapi-diff-2.0.0-remove_git_hooks.patch
===================================================================
--- openapi-diff/trunk/openapi-diff-2.0.0-remove_git_hooks.patch	                        (rev 0)
+++ openapi-diff/trunk/openapi-diff-2.0.0-remove_git_hooks.patch	2021-12-10 19:16:01 UTC (rev 1068144)
@@ -0,0 +1,40 @@
+diff -ruN a/pom.xml b/pom.xml
+--- a/pom.xml	2021-12-05 12:48:03.000000000 +0100
++++ b/pom.xml	2021-12-10 19:59:57.792629187 +0100
+@@ -288,11 +288,6 @@
+                     <version>2.9.1</version>
+                 </plugin>
+                 <plugin>
+-                    <groupId>io.github.phillipuniverse</groupId>
+-                    <artifactId>githook-maven-plugin</artifactId>
+-                    <version>1.0.5</version>
+-                </plugin>
+-                <plugin>
+                     <groupId>org.apache.maven.plugins</groupId>
+                     <artifactId>maven-gpg-plugin</artifactId>
+                     <version>3.0.1</version>
+@@ -346,24 +341,6 @@
+                     </execution>
+                 </executions>
+             </plugin>
+-            <plugin>
+-                <groupId>io.github.phillipuniverse</groupId>
+-                <artifactId>githook-maven-plugin</artifactId>
+-                <executions>
+-                    <execution>
+-                        <goals>
+-                            <goal>install</goal>
+-                        </goals>
+-                        <configuration>
+-                            <hooks>
+-                                <pre-commit>
+-                                    mvn com.coveo:fmt-maven-plugin:format
+-                                </pre-commit>
+-                            </hooks>
+-                        </configuration>
+-                    </execution>
+-                </executions>
+-            </plugin>
+             <plugin>
+                 <groupId>org.jacoco</groupId>
+                 <artifactId>jacoco-maven-plugin</artifactId>

Added: openapi-diff/trunk/openapi-diff.sh
===================================================================
--- openapi-diff/trunk/openapi-diff.sh	                        (rev 0)
+++ openapi-diff/trunk/openapi-diff.sh	2021-12-10 19:16:01 UTC (rev 1068144)
@@ -0,0 +1,4 @@
+#!/usr/bin/env sh
+
+PATH="/usr/lib/jvm/java-8-openjdk/bin:${PATH}"
+java -jar /usr/share/java/openapi-diff/openapi-diff-cli.jar "$@"



More information about the arch-commits mailing list