diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2005-12-21 04:45:13 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2005-12-21 04:45:13 +0000 |
commit | fa79a04b2ef05655156c0098251c389ffae2319a (patch) | |
tree | aa8260099770c6314b6d014a491816421ae11da6 /misc/fortune-mod-culmea-culmilor/Makefile.fortune | |
parent | 1ac5c7f1ef3b8416c628d3e44231e383ebbacb07 (diff) | |
download | ports-fa79a04b2ef05655156c0098251c389ffae2319a.tar.gz ports-fa79a04b2ef05655156c0098251c389ffae2319a.zip |
[MAINTAINER] misc/fortune-mod-culmea-culmilor: update
Update to include "-o" file.
Move common fortune ports code in Makefile.fortune.
Make -o files code actually work.
Make fortune fiels with comments work.
Drop pkg-message but show where the fortune file is installed.
Future plans:
- add other .ro fortunes ports
- write a send-fortune tool.
PR: ports/90651
Submitted by: Ion-Mihai "IOnut" Tetcu <itetcu@people.tecnik93.com>
Notes
Notes:
svn path=/head/; revision=151707
Diffstat (limited to 'misc/fortune-mod-culmea-culmilor/Makefile.fortune')
-rw-r--r-- | misc/fortune-mod-culmea-culmilor/Makefile.fortune | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/misc/fortune-mod-culmea-culmilor/Makefile.fortune b/misc/fortune-mod-culmea-culmilor/Makefile.fortune new file mode 100644 index 000000000000..4b58b75f5987 --- /dev/null +++ b/misc/fortune-mod-culmea-culmilor/Makefile.fortune @@ -0,0 +1,33 @@ +# $Tecnik: ports/misc/fortune-mod-culmea-culmilor/Makefile.fortune,v 1.6 2005/12/19 15:30:38 itetcu Exp $ + +NO_WRKSUBDIR= yes + +_STRFILE= /usr/games/strfile +_STRFILE_ARGS?= -C +_FORTUNE_DIR= share/games/fortune +FORTUNE_DIR= ${PREFIX}/${_FORTUNE_DIR} +FORTUNE_FILE= ${PORTNAME:S/fortune-mod-//} +FORTUNE_FILE_O= ${FORTUNE_FILE}-o + +PLIST_FILES+= ${_FORTUNE_DIR}/${FORTUNE_FILE} ${_FORTUNE_DIR}/${FORTUNE_FILE}.dat + +do-build: + @cd ${WRKSRC} && ${_STRFILE} ${_STRFILE_ARGS} ${PORTNAME} + @if [ -f ${WRKSRC}/${PORTNAME}-o ]; then \ + cd ${WRKSRC} && ${_STRFILE} ${_STRFILE_ARGS} ${PORTNAME}-o; \ + fi +do-install: + @${MKDIR} ${FORTUNE_DIR} + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME} ${FORTUNE_DIR}/${FORTUNE_FILE} + @${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.dat ${FORTUNE_DIR}/${FORTUNE_FILE}.dat + @if [ -f ${WRKSRC}/${PORTNAME}-o ]; then \ + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-o ${FORTUNE_DIR}/${FORTUNE_FILE_O}; \ + ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-o.dat ${FORTUNE_DIR}/${FORTUNE_FILE_O}.dat; \ + fi +post-install: + @if [ -f ${WRKSRC}/${PORTNAME}-o ]; then \ + ${ECHO_CMD} ${_FORTUNE_DIR}/${FORTUNE_FILE_O} >> ${TMPPLIST}; \ + ${ECHO_CMD} ${_FORTUNE_DIR}/${FORTUNE_FILE_O}.dat >> ${TMPPLIST}; \ + fi + ${ECHO_CMD} "@unexec rmdir %D/${_FORTUNE_DIR} 2>/dev/null || true" >> ${TMPPLIST} + ${ECHO_CMD} "@unexec rmdir %D/share/games 2>/dev/null || true" >> ${TMPPLIST} |