pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/gng Add gng, a tool to run (or create) each proj...
details: https://anonhg.NetBSD.org/pkgsrc/rev/27e8be4910c8
branches: trunk
changeset: 390695:27e8be4910c8
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Tue Dec 27 16:14:03 2022 +0000
description:
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.
diffstat:
devel/gng/DESCR | 6 +++++
devel/gng/Makefile | 43 +++++++++++++++++++++++++++++++++++++++
devel/gng/PLIST | 9 ++++++++
devel/gng/distinfo | 6 +++++
devel/gng/patches/patch-bin_gng | 45 +++++++++++++++++++++++++++++++++++++++++
5 files changed, 109 insertions(+), 0 deletions(-)
diffs (129 lines):
diff -r 16232648dce8 -r 27e8be4910c8 devel/gng/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gng/DESCR Tue Dec 27 16:14:03 2022 +0000
@@ -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.
diff -r 16232648dce8 -r 27e8be4910c8 devel/gng/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gng/Makefile Tue Dec 27 16:14:03 2022 +0000
@@ -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"
diff -r 16232648dce8 -r 27e8be4910c8 devel/gng/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gng/PLIST Tue Dec 27 16:14:03 2022 +0000
@@ -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
diff -r 16232648dce8 -r 27e8be4910c8 devel/gng/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gng/distinfo Tue Dec 27 16:14:03 2022 +0000
@@ -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
diff -r 16232648dce8 -r 27e8be4910c8 devel/gng/patches/patch-bin_gng
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/gng/patches/patch-bin_gng Tue Dec 27 16:14:03 2022 +0000
@@ -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