pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/gng



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Tue Dec 27 16:14:04 UTC 2022

Added Files:
        pkgsrc/devel/gng: DESCR Makefile PLIST distinfo
        pkgsrc/devel/gng/patches: patch-bin_gng

Log Message:
Add gng, a tool to run (or create) each project's own Gradle wrapper.

GNG is a script that automatically search your gradlew when you are
inside your Gradle project and execute it. It also contains an official
Gradle wrapper. You can create gradle projects from scratch without
installing Gradle.

This is originally inspired by gdub and gradlew-bootstrap.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/gng/DESCR pkgsrc/devel/gng/Makefile \
    pkgsrc/devel/gng/PLIST pkgsrc/devel/gng/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/gng/patches/patch-bin_gng

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/devel/gng/DESCR
diff -u /dev/null pkgsrc/devel/gng/DESCR:1.1
--- /dev/null   Tue Dec 27 16:14:04 2022
+++ pkgsrc/devel/gng/DESCR      Tue Dec 27 16:14:03 2022
@@ -0,0 +1,6 @@
+GNG is a script that automatically search your gradlew when you are
+inside your Gradle project and execute it. It also contains an official
+Gradle wrapper. You can create gradle projects from scratch without
+installing Gradle.
+
+This is originally inspired by gdub and gradlew-bootstrap.
Index: pkgsrc/devel/gng/Makefile
diff -u /dev/null pkgsrc/devel/gng/Makefile:1.1
--- /dev/null   Tue Dec 27 16:14:04 2022
+++ pkgsrc/devel/gng/Makefile   Tue Dec 27 16:14:03 2022
@@ -0,0 +1,43 @@
+# $NetBSD: Makefile,v 1.1 2022/12/27 16:14:03 schmonz Exp $
+
+DISTNAME=              gng-1.0.3
+CATEGORIES=            devel
+MASTER_SITES=          ${MASTER_SITE_GITHUB:=gdubw/}
+GITHUB_TAG=            v${PKGVERSION_NOREV}
+
+MAINTAINER=            schmonz%NetBSD.org@localhost
+HOMEPAGE=              https://gng.dsun.org
+COMMENT=               Run (or create) each project's own Gradle wrapper
+LICENSE=               apache-2.0
+
+USE_LANGUAGES=         # none
+USE_TOOLS+=            bash:run
+NO_BUILD=              yes
+REPLACE_BASH=          bin/gng
+REPLACE_SH=            gradle/gradlew
+
+SUBST_CLASSES+=                paths
+SUBST_STAGE.paths=     do-configure
+SUBST_FILES.paths=     bin/gng
+SUBST_VARS.paths=      PREFIX
+
+INSTALLATION_DIRS=     bin share/${PKGBASE}/gradle/wrapper
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/bin/gng \
+               ${DESTDIR}${PREFIX}/bin/gng
+       ${LN} -fs gng ${DESTDIR}${PREFIX}/bin/gw
+       ${INSTALL_DATA} ${WRKSRC}/lib/common.sh \
+               ${DESTDIR}${PREFIX}/share/${PKGBASE}
+       ${INSTALL_DATA} ${WRKSRC}/gradle/README.md \
+               ${DESTDIR}${PREFIX}/share/${PKGBASE}/gradle
+       ${INSTALL_DATA} ${WRKSRC}/gradle/gng.cfg \
+               ${DESTDIR}${PREFIX}/share/${PKGBASE}/gradle
+       ${INSTALL_PROGRAM} ${WRKSRC}/gradle/gradlew \
+               ${DESTDIR}${PREFIX}/share/${PKGBASE}/gradle
+       ${INSTALL_DATA} ${WRKSRC}/gradle/gradlew.bat \
+               ${DESTDIR}${PREFIX}/share/${PKGBASE}/gradle
+       ${INSTALL_DATA} ${WRKSRC}/gradle/wrapper/gradle-wrapper.jar \
+               ${DESTDIR}${PREFIX}/share/${PKGBASE}/gradle/wrapper
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/gng/PLIST
diff -u /dev/null pkgsrc/devel/gng/PLIST:1.1
--- /dev/null   Tue Dec 27 16:14:04 2022
+++ pkgsrc/devel/gng/PLIST      Tue Dec 27 16:14:03 2022
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2022/12/27 16:14:03 schmonz Exp $
+bin/gng
+bin/gw
+share/gng/common.sh
+share/gng/gradle/README.md
+share/gng/gradle/gng.cfg
+share/gng/gradle/gradlew
+share/gng/gradle/gradlew.bat
+share/gng/gradle/wrapper/gradle-wrapper.jar
Index: pkgsrc/devel/gng/distinfo
diff -u /dev/null pkgsrc/devel/gng/distinfo:1.1
--- /dev/null   Tue Dec 27 16:14:04 2022
+++ pkgsrc/devel/gng/distinfo   Tue Dec 27 16:14:03 2022
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2022/12/27 16:14:03 schmonz Exp $
+
+BLAKE2s (gng-1.0.3.tar.gz) = fc1c172998c0da64f8817c88dba8f696c05da8a464abb5add6d47eae0e9c617b
+SHA512 (gng-1.0.3.tar.gz) = a40be62d8deae070a5c5d342c4d510a78712657414d4dec4016becd7fb23436e6b344faf3917f7c1aa478c06a87ebbdd6541afea2fe8c035f8044f6d15af4855
+Size (gng-1.0.3.tar.gz) = 71089 bytes
+SHA1 (patch-bin_gng) = b9d5118c826931e1e3f7ecbb798c8cc0593e2939

Index: pkgsrc/devel/gng/patches/patch-bin_gng
diff -u /dev/null pkgsrc/devel/gng/patches/patch-bin_gng:1.1
--- /dev/null   Tue Dec 27 16:14:04 2022
+++ pkgsrc/devel/gng/patches/patch-bin_gng      Tue Dec 27 16:14:03 2022
@@ -0,0 +1,45 @@
+$NetBSD: patch-bin_gng,v 1.1 2022/12/27 16:14:03 schmonz Exp $
+
+Use pkgsrc paths.
+
+--- bin/gng.orig       2021-03-29 06:32:44.000000000 +0000
++++ bin/gng
+@@ -1,24 +1,15 @@
+ #!/usr/bin/env bash
++
++PREFIX=@PREFIX@
++
+ readonly SAVED_OPTS="$(
+   shopt -po
+   shopt -p
+ )"
+-SOURCE="${BASH_SOURCE[0]}"
+-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
+-  TARGET="$(readlink "$SOURCE")"
+-  if [[ $TARGET == /* ]]; then
+-    SOURCE="$TARGET"
+-  else
+-    SELF_DIR="$(dirname "$SOURCE")"
+-    SOURCE="$SELF_DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
+-  fi
+-done
+-SELF_DIR="$(cd -P "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)"
+-readonly SELF_DIR
+ 
+ # shellcheck disable=SC1090
+-source "${SELF_DIR}/../lib/common.sh" || {
+-  echo "Failed to load common.sh in ${SELF_DIR}"
++source "${PREFIX}/share/gng/common.sh" || {
++  echo "Failed to load ${PREFIX}/share/gng/common.sh"
+   exit 1
+ }
+ # DEFAULTS may be overridden by calling environment.
+@@ -78,7 +69,7 @@ function __install_gw() {
+     info "Installing Gradle Wrapper in ${dir}. (version=${version}, distributionType=${type}, mirrorUrl=${mirrorUrl:-<Not Specified>})"
+ 
+     #Copy the embedded Gradle Wrapper
+-    local srcDir="${SELF_DIR}/.."
++    local srcDir="${PREFIX}/share/gng"
+     cp -f "${srcDir}/gradle/gng.cfg" "${dir}/gradle/"
+     cp -f "${srcDir}/gradle/gradlew" "${dir}/"
+     cp -f "${srcDir}/gradle/gradlew.bat" "${dir}/"



Home | Main Index | Thread Index | Old Index