[114608] trunk/dports/office/todotxt/Portfile
snc at macports.org
snc at macports.org
Wed Dec 11 11:46:03 PST 2013
Revision: 114608
https://trac.macports.org/changeset/114608
Author: snc at macports.org
Date: 2013-12-11 11:46:03 -0800 (Wed, 11 Dec 2013)
Log Message:
-----------
todotxt:
* add bash-completion variant, #41762
* fix paths, #38670
Modified Paths:
--------------
trunk/dports/office/todotxt/Portfile
Modified: trunk/dports/office/todotxt/Portfile
===================================================================
--- trunk/dports/office/todotxt/Portfile 2013-12-11 19:45:57 UTC (rev 114607)
+++ trunk/dports/office/todotxt/Portfile 2013-12-11 19:46:03 UTC (rev 114608)
@@ -5,7 +5,7 @@
PortGroup github 1.0
github.setup ginatrapani todo.txt-cli 2.9 v
-revision 1
+revision 2
name todotxt
categories office
license GPL
@@ -25,17 +25,31 @@
build {}
+post-patch {
+ reinplace "s/todo\\.sh/${name}/" ${worksrcpath}/todo_completion
+}
+
destroot {
xinstall -m 755 ${worksrcpath}/todo.sh ${destroot}${prefix}/bin/$name
xinstall -d -m 755 ${destroot}${prefix}/share/${name}
xinstall -m 644 ${worksrcpath}/todo.cfg ${destroot}${prefix}/share/${name}/todo.cfg-dist
}
+post-destroot {
+ set completions_path ${destroot}${prefix}/share/bash-completion/completions
+ xinstall -d ${completions_path}
+ xinstall -m 644 ${worksrcpath}/todo_completion ${completions_path}/${name}
+}
+
patch {
# default cfg will try to write in $prefix/bin, since this isn't obvious from the config
# file we help the user avoiding this
reinplace "s|TODO_DIR=`dirname \"\$0\"`|TODO_DIR=\"\$HOME\"/.todo|" ${worksrcpath}/todo.cfg
}
-notes "Copy the default configuration file from ${prefix}/etc/todo.cfg-dist \
+variant bash_completion {
+ depends_run-append path:etc/bash_completion:bash-completion
+}
+
+notes "Copy the default configuration file from ${prefix}/share/${name}/todo.cfg-dist \
to ~/.todo/config and customize it."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131211/b1ffed96/attachment.html>
More information about the macports-changes
mailing list