Skip to content

Commit

Permalink
- Convert to new options helper
Browse files Browse the repository at this point in the history
- Use USES=shebangfix
- Support STAGEDIR
- Simplify Makefile

Approved by:	portmgr (blanket)
  • Loading branch information
sunpoet committed Mar 14, 2014
1 parent 402d2e3 commit d316612
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions deskutils/todo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,20 @@ CONFLICTS= devtodo-[0-9]*
OPTIONS_DEFINE= BASH
BASH_DESC= Install programmable completions for Bash

NO_STAGE= yes
.include <bsd.port.options.mk>

NO_BUILD= yes
USES= shebangfix

PLIST_FILES= bin/todo etc/todo.cfg

.if ${PORT_OPTIONS:MBASH}
PLIST_FILES+= etc/bash_completion.d/todo
PLIST_DIRSTRY+= etc/bash_completion.d
.endif
SHEBANG_FILES= todo.sh todo_completion

post-patch:
@${REINPLACE_CMD} -e "s,/bin/bash,${LOCALBASE}/bin/bash," ${WRKSRC}/todo.sh
.if ${PORT_OPTIONS:MBASH}
@${REINPLACE_CMD} -e "s,/bin/bash,${LOCALBASE}/bin/bash," ${WRKSRC}/todo_completion
.endif
BASH_PLIST_FILES= etc/bash_completion.d/todo
BAHS_PLIST_DIRSTRY= etc/bash_completion.d

do-install:
@${INSTALL_SCRIPT} ${WRKSRC}/todo.sh ${PREFIX}/bin/todo
@${INSTALL_DATA} ${WRKSRC}/todo.cfg ${PREFIX}/etc/todo.cfg

post-install:
.if ${PORT_OPTIONS:MBASH}
${MKDIR} ${PREFIX}/etc/bash_completion.d
${INSTALL_DATA} ${WRKSRC}/todo_completion ${PREFIX}/etc/bash_completion.d/todo
.endif
@${INSTALL_SCRIPT} ${WRKSRC}/todo.sh ${STAGEDIR}${PREFIX}/bin/todo
@${INSTALL_DATA} ${WRKSRC}/todo.cfg ${STAGEDIR}${PREFIX}/etc/todo.cfg
${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
${INSTALL_DATA} ${WRKSRC}/todo_completion ${STAGEDIR}${PREFIX}/etc/bash_completion.d/todo

.include <bsd.port.mk>

0 comments on commit d316612

Please sign in to comment.