svn commit: r446743 - in head/sysutils/restic: . files
Jimmy Olgeni
olgeni at FreeBSD.org
Thu Jul 27 14:30:21 UTC 2017
Author: olgeni
Date: Thu Jul 27 14:30:20 2017
New Revision: 446743
URL: https://svnweb.freebsd.org/changeset/ports/446743
Log:
sysutils/restic: respect PREFIX in creation of bash completion script.
PR: 221046
Submitted by: olgeni
Approved by: maintainer
Added:
head/sysutils/restic/files/
head/sysutils/restic/files/patch-src_cmds_restic_cmd__autocomplete.go (contents, props changed)
Modified:
head/sysutils/restic/Makefile
Modified: head/sysutils/restic/Makefile
==============================================================================
--- head/sysutils/restic/Makefile Thu Jul 27 14:23:17 2017 (r446742)
+++ head/sysutils/restic/Makefile Thu Jul 27 14:30:20 2017 (r446743)
@@ -3,6 +3,7 @@
PORTNAME= restic
PORTVERSION= 0.7.1
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= wg at FreeBSD.org
@@ -15,6 +16,9 @@ USE_GITHUB= yes
STRIP= # stripping can break go binaries
PLIST_FILES= bin/restic
+
+post-patch:
+ @${REINPLACE_CMD} -e "s@%%PREFIX%%@${PREFIX}@g" ${WRKSRC}/src/cmds/restic/cmd_autocomplete.go
do-build:
@(cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} run build.go)
Added: head/sysutils/restic/files/patch-src_cmds_restic_cmd__autocomplete.go
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/restic/files/patch-src_cmds_restic_cmd__autocomplete.go Thu Jul 27 14:30:20 2017 (r446743)
@@ -0,0 +1,11 @@
+--- src/cmds/restic/cmd_autocomplete.go.orig 2017-07-27 13:03:30 UTC
++++ src/cmds/restic/cmd_autocomplete.go
+@@ -30,7 +30,7 @@ $ sudo restic autocomplete`,
+ func init() {
+ cmdRoot.AddCommand(cmdAutocomplete)
+
+- cmdAutocomplete.Flags().StringVarP(&autocompleteTarget, "completionfile", "", "/etc/bash_completion.d/restic.sh", "autocompletion file")
++ cmdAutocomplete.Flags().StringVarP(&autocompleteTarget, "completionfile", "", "%%PREFIX%%/etc/bash_completion.d/restic.sh", "autocompletion file")
+ // For bash-completion
+ cmdAutocomplete.Flags().SetAnnotation("completionfile", cobra.BashCompFilenameExt, []string{})
+ }
More information about the svn-ports-head
mailing list