From 1c3e13981aa74b440315642972b43bde8fcb2fba Mon Sep 17 00:00:00 2001 From: leot Date: Tue, 19 Dec 2017 11:45:25 +0000 Subject: rcm: Import rcm-1.3.1 as sysutils/rcm The rcm suite of tools is for managing dotfiles directories. This suite is useful for committing your rc files to a central repository to share, but it also scales to a more complex situation such as multiple source directories shared between computers with some host-specific or task-specific files. Originally packaged in pkgsrc-wip by Jonathan Buschmann and then updated and a bit modified by myself. --- sysutils/rcm/DESCR | 5 +++++ sysutils/rcm/Makefile | 16 ++++++++++++++++ sysutils/rcm/PLIST | 12 ++++++++++++ sysutils/rcm/distinfo | 10 ++++++++++ sysutils/rcm/patches/patch-bin_mkrc | 21 +++++++++++++++++++++ sysutils/rcm/patches/patch-bin_mkrc.in | 21 +++++++++++++++++++++ sysutils/rcm/patches/patch-bin_rcup | 30 ++++++++++++++++++++++++++++++ sysutils/rcm/patches/patch-bin_rcup.in | 30 ++++++++++++++++++++++++++++++ 8 files changed, 145 insertions(+) create mode 100644 sysutils/rcm/DESCR create mode 100644 sysutils/rcm/Makefile create mode 100644 sysutils/rcm/PLIST create mode 100644 sysutils/rcm/distinfo create mode 100644 sysutils/rcm/patches/patch-bin_mkrc create mode 100644 sysutils/rcm/patches/patch-bin_mkrc.in create mode 100644 sysutils/rcm/patches/patch-bin_rcup create mode 100644 sysutils/rcm/patches/patch-bin_rcup.in diff --git a/sysutils/rcm/DESCR b/sysutils/rcm/DESCR new file mode 100644 index 00000000000..e78672aa807 --- /dev/null +++ b/sysutils/rcm/DESCR @@ -0,0 +1,5 @@ +The rcm suite of tools is for managing dotfiles directories. +This suite is useful for committing your rc files to a central repository to +share, but it also scales to a more complex situation such as multiple source +directories shared between computers with some host-specific or +task-specific files. diff --git a/sysutils/rcm/Makefile b/sysutils/rcm/Makefile new file mode 100644 index 00000000000..408787c1149 --- /dev/null +++ b/sysutils/rcm/Makefile @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.1 2017/12/19 11:45:25 leot Exp $ + +DISTNAME= rcm-1.3.1 +CATEGORIES= sysutils +MASTER_SITES= https://thoughtbot.github.io/rcm/dist/ + +MAINTAINER= leot@NetBSD.org +HOMEPAGE= https://thoughtbot.github.io/rcm/ +COMMENT= Tools for rc file (dotfile) management +LICENSE= modified-bsd + +GNU_CONFIGURE= yes + +USE_LANGUAGES= # none + +.include "../../mk/bsd.pkg.mk" diff --git a/sysutils/rcm/PLIST b/sysutils/rcm/PLIST new file mode 100644 index 00000000000..8ead7182f72 --- /dev/null +++ b/sysutils/rcm/PLIST @@ -0,0 +1,12 @@ +@comment $NetBSD: PLIST,v 1.1 2017/12/19 11:45:25 leot Exp $ +bin/lsrc +bin/mkrc +bin/rcdn +bin/rcup +man/man1/lsrc.1 +man/man1/mkrc.1 +man/man1/rcdn.1 +man/man1/rcup.1 +man/man5/rcrc.5 +man/man7/rcm.7 +share/rcm/rcm.sh diff --git a/sysutils/rcm/distinfo b/sysutils/rcm/distinfo new file mode 100644 index 00000000000..2a66d0426e6 --- /dev/null +++ b/sysutils/rcm/distinfo @@ -0,0 +1,10 @@ +$NetBSD: distinfo,v 1.1 2017/12/19 11:45:25 leot Exp $ + +SHA1 (rcm-1.3.1.tar.gz) = de369b032f66e3cfed2ed72e92159b89a4f0f0b0 +RMD160 (rcm-1.3.1.tar.gz) = 27ddc40aff4f9d14a5d5e0a9fc27d9afd6dccd7a +SHA512 (rcm-1.3.1.tar.gz) = 1fd8ad6f8bee16177444469bddbef8d9b99f0b2bedc82c9833523370dfda4583c425f1ab8f2195f11236d1385553a2a49ead6d4c5f0803deeb56737b6836a0d9 +Size (rcm-1.3.1.tar.gz) = 89437 bytes +SHA1 (patch-bin_mkrc) = 964990cd47008579e39e8fb043d7477e0b7bdd8a +SHA1 (patch-bin_mkrc.in) = 947926fc645f072cd6d1afba5b50b872bd1590d2 +SHA1 (patch-bin_rcup) = 7afba5cba44bb00a2845a66118649b52bf4269fb +SHA1 (patch-bin_rcup.in) = 90c563c11728986e3a2aa23240ffc337e12ac643 diff --git a/sysutils/rcm/patches/patch-bin_mkrc b/sysutils/rcm/patches/patch-bin_mkrc new file mode 100644 index 00000000000..f1add10073d --- /dev/null +++ b/sysutils/rcm/patches/patch-bin_mkrc @@ -0,0 +1,21 @@ +$NetBSD: patch-bin_mkrc,v 1.1 2017/12/19 11:45:25 leot Exp $ + +Quote more variable initializations. + +Part of upstream: + + + +--- bin/mkrc.orig 2017-01-07 19:44:47.000000000 +0000 ++++ bin/mkrc +@@ -5,8 +5,8 @@ + + destination() { + local dotfiles_dir="$1" +- local dotless=$2 +- local in_host=$3 ++ local dotless="$2" ++ local in_host="$3" + local tag="$4" + + $DEBUG "destination $dotfiles_dir $dotless $in_host $tag" diff --git a/sysutils/rcm/patches/patch-bin_mkrc.in b/sysutils/rcm/patches/patch-bin_mkrc.in new file mode 100644 index 00000000000..ce1ee623fb5 --- /dev/null +++ b/sysutils/rcm/patches/patch-bin_mkrc.in @@ -0,0 +1,21 @@ +$NetBSD: patch-bin_mkrc.in,v 1.1 2017/12/19 11:45:25 leot Exp $ + +Quote more variable initializations. + +Part of upstream: + + + +--- bin/mkrc.in.orig 2016-12-26 21:56:47.000000000 +0000 ++++ bin/mkrc.in +@@ -5,8 +5,8 @@ + + destination() { + local dotfiles_dir="$1" +- local dotless=$2 +- local in_host=$3 ++ local dotless="$2" ++ local in_host="$3" + local tag="$4" + + $DEBUG "destination $dotfiles_dir $dotless $in_host $tag" diff --git a/sysutils/rcm/patches/patch-bin_rcup b/sysutils/rcm/patches/patch-bin_rcup new file mode 100644 index 00000000000..8ad028ec5e0 --- /dev/null +++ b/sysutils/rcm/patches/patch-bin_rcup @@ -0,0 +1,30 @@ +$NetBSD: patch-bin_rcup,v 1.1 2017/12/19 11:45:25 leot Exp $ + +- Avoid to use the `==' (non-POSIX) operator in test(1). +- Quote args initialization. This fixes a problem with NetBSD sh(1) leading to + `local: ${HOME}/.dotfiles: bad variable name' error. + +Part of upstream: + + + +--- bin/rcup.orig 2017-01-07 19:44:47.000000000 +0000 ++++ bin/rcup +@@ -136,7 +136,7 @@ is_linked() { + + if [ -h "$dest" ]; then + local link_dest=$(readlink $dest) +- [ "$link_dest" == "$src" ] ++ [ "$link_dest" = "$src" ] + else + return 1 + fi +@@ -208,7 +208,7 @@ handle_command_line() { + local never_symlink_dirs= + local hostname= + local generate=0 +- local args=$* ++ local args="$*" + local undotted= + local never_undotted= + REPLACE_ALL=0 diff --git a/sysutils/rcm/patches/patch-bin_rcup.in b/sysutils/rcm/patches/patch-bin_rcup.in new file mode 100644 index 00000000000..3de95801d59 --- /dev/null +++ b/sysutils/rcm/patches/patch-bin_rcup.in @@ -0,0 +1,30 @@ +$NetBSD: patch-bin_rcup.in,v 1.1 2017/12/19 11:45:25 leot Exp $ + +- Avoid to use the `==' (non-POSIX) operator in test(1). +- Quote args initialization. This fixes a problem with NetBSD sh(1) leading to + `local: ${HOME}/.dotfiles: bad variable name' error. + +Part of upstream: + + + +--- bin/rcup.in.orig 2016-12-26 21:56:47.000000000 +0000 ++++ bin/rcup.in +@@ -136,7 +136,7 @@ is_linked() { + + if [ -h "$dest" ]; then + local link_dest=$(readlink $dest) +- [ "$link_dest" == "$src" ] ++ [ "$link_dest" = "$src" ] + else + return 1 + fi +@@ -208,7 +208,7 @@ handle_command_line() { + local never_symlink_dirs= + local hostname= + local generate=0 +- local args=$* ++ local args="$*" + local undotted= + local never_undotted= + REPLACE_ALL=0 -- cgit v1.2.3