- update to 0.2

- instead of echoing instructions from the Makefile, use a pkg-message
- re-do the install of this port (now has more than 3 fortunes)
- don't check for the games distribution in the Makefile, check in a
  pkg-install script
- install fortunes to ${PREFX}/share/games/fortune/rus, instead of just
  ${PREFIX}/share/games/fortune (this way other languages can have their
  own subdirectory).

PR:		38489
Submitted by:	Oleksandr Bezpalko <bestia@iptcom.net> (partially)
This commit is contained in:
Pete Fritchman 2002-06-02 03:47:27 +00:00
parent 5de713145a
commit 6285db09ce
6 changed files with 71 additions and 27 deletions

View file

@ -6,7 +6,7 @@
#
PORTNAME= fortuneru
PORTVERSION= 0.1
PORTVERSION= 0.2
CATEGORIES= russian
MASTER_SITES= ftp://de22.kiev.ua/pub/files/
DISTNAME= fortune.ru-${PORTVERSION}
@ -15,25 +15,25 @@ MAINTAINER= bestia@iptcom.net
NO_BUILD= yes
PKGMESSAGE= ${WRKDIR}/pkg-message
STRCMD= /usr/games/strfile
FORTUNES= 4hf aphorizms beer-murphy enciklopedy fomenko fortune_rus \
guberman marazm maxim_and_fedor murphy police speed-info \
strug usenet verse windows_errors
do-install:
@${MKDIR} ${PREFIX}/share/games/fortune
@${INSTALL_DATA} ${WRKSRC}/speed-info ${PREFIX}/share/games/fortune
@${INSTALL_DATA} ${WRKSRC}/fomenko ${PREFIX}/share/games/fortune
pre-install:
.if !exists(${STRCMD})
@ ${ECHO_MSG} "Please install the games distribution"
@ exit 1
.endif
post-install:
@${STRCMD} ${PREFIX}/share/games/fortune/speed-info
@${STRCMD} ${PREFIX}/share/games/fortune/fomenko
@${ECHO_MSG} ""
@${ECHO_MSG} "Usage:"
@${ECHO_MSG} "/usr/games/fortune ${PREFIX}/share/games/fortune/speed-info"
@${ECHO_MSG} ""
@${SETENV} STRCMD=${STRCMD} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
${SED} -e "s,%%PREFIX%%,${PREFIX}," < ${FILESDIR}/pkg-message.in > \
${PKGMESSAGE}
@${MKDIR} ${PREFIX}/share/games/fortune/rus
.for fortune in ${FORTUNES}
${INSTALL_DATA} ${WRKSRC}/${fortune} ${PREFIX}/share/games/fortune/rus
.endfor
.for fortune in ${FORTUNES}
${STRCMD} ${PREFIX}/share/games/fortune/rus/${fortune} \
>/dev/null 2>/dev/null
.endfor
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

View file

@ -1 +1 @@
MD5 (fortune.ru-0.1.tar.gz) = a5b18b41161d17ed6c6b06191ce6323e
MD5 (fortune.ru-0.2.tar.gz) = f374f6368545d1d4d6505be24bf96fb4

View file

@ -0,0 +1,2 @@
To use the fortunes intalled by this port, type:
/usr/games/fortune %%PREFIX%%/share/games/fortune/rus

View file

@ -1,4 +1,3 @@
This package contains fortune file in Russian.
This package contains fortune files in Russian.
- ported to FreeBSD by bestia (bestia@iptcom.net)

View file

@ -0,0 +1,14 @@
#!/bin/sh
# $FreeBSD$
#
if [ "$2" != "PRE-INSTALL" ]; then
exit 0
fi
if [ ! -f "$STRCMD" ]; then
echo ""
echo "You must have the ``games'' distribution installed to use this port."
echo ""
exit 1
fi

View file

@ -1,6 +1,35 @@
share/games/fortune/speed-info
share/games/fortune/speed-info.dat
share/games/fortune/fomenko
share/games/fortune/fomenko.dat
@dirrm share/games/fortune
@dirrm share/games
share/games/fortune/rus/4hf
share/games/fortune/rus/4hf.dat
share/games/fortune/rus/aphorizms
share/games/fortune/rus/aphorizms.dat
share/games/fortune/rus/beer-murphy
share/games/fortune/rus/beer-murphy.dat
share/games/fortune/rus/enciklopedy
share/games/fortune/rus/enciklopedy.dat
share/games/fortune/rus/fomenko
share/games/fortune/rus/fomenko.dat
share/games/fortune/rus/fortune_rus
share/games/fortune/rus/fortune_rus.dat
share/games/fortune/rus/guberman
share/games/fortune/rus/guberman.dat
share/games/fortune/rus/marazm
share/games/fortune/rus/marazm.dat
share/games/fortune/rus/maxim_and_fedor
share/games/fortune/rus/maxim_and_fedor.dat
share/games/fortune/rus/murphy
share/games/fortune/rus/murphy.dat
share/games/fortune/rus/police
share/games/fortune/rus/police.dat
share/games/fortune/rus/speed-info
share/games/fortune/rus/speed-info.dat
share/games/fortune/rus/strug
share/games/fortune/rus/strug.dat
share/games/fortune/rus/usenet
share/games/fortune/rus/usenet.dat
share/games/fortune/rus/verse
share/games/fortune/rus/verse.dat
share/games/fortune/rus/windows_errors
share/games/fortune/rus/windows_errors.dat
@dirrm share/games/fortune/rus
@unexec rmdir %D/share/games/fortune 2>/dev/null || true
@unexec rmdir %D/share/games 2>/dev/null || true