diff options
author | petef <petef@FreeBSD.org> | 2002-06-02 11:47:27 +0800 |
---|---|---|
committer | petef <petef@FreeBSD.org> | 2002-06-02 11:47:27 +0800 |
commit | f7803d24a9db0487e8ce22f5c24ce35af98caa10 (patch) | |
tree | a073d98c129501b3d887adac447295328581f686 | |
parent | 0e23ad8aa401ed7e46c363152e04e12b3bc63f58 (diff) | |
download | freebsd-ports-gnome-f7803d24a9db0487e8ce22f5c24ce35af98caa10.tar.gz freebsd-ports-gnome-f7803d24a9db0487e8ce22f5c24ce35af98caa10.tar.zst freebsd-ports-gnome-f7803d24a9db0487e8ce22f5c24ce35af98caa10.zip |
- 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)
-rw-r--r-- | russian/fortuneru/Makefile | 36 | ||||
-rw-r--r-- | russian/fortuneru/distinfo | 2 | ||||
-rw-r--r-- | russian/fortuneru/files/pkg-message.in | 2 | ||||
-rw-r--r-- | russian/fortuneru/pkg-descr | 3 | ||||
-rw-r--r-- | russian/fortuneru/pkg-install | 14 | ||||
-rw-r--r-- | russian/fortuneru/pkg-plist | 41 |
6 files changed, 71 insertions, 27 deletions
diff --git a/russian/fortuneru/Makefile b/russian/fortuneru/Makefile index 46f031de94ab..4b06e6bf7f40 100644 --- a/russian/fortuneru/Makefile +++ b/russian/fortuneru/Makefile @@ -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> diff --git a/russian/fortuneru/distinfo b/russian/fortuneru/distinfo index 6af7985b5aa0..8d5d08aae92f 100644 --- a/russian/fortuneru/distinfo +++ b/russian/fortuneru/distinfo @@ -1 +1 @@ -MD5 (fortune.ru-0.1.tar.gz) = a5b18b41161d17ed6c6b06191ce6323e +MD5 (fortune.ru-0.2.tar.gz) = f374f6368545d1d4d6505be24bf96fb4 diff --git a/russian/fortuneru/files/pkg-message.in b/russian/fortuneru/files/pkg-message.in new file mode 100644 index 000000000000..a38e05afd52d --- /dev/null +++ b/russian/fortuneru/files/pkg-message.in @@ -0,0 +1,2 @@ +To use the fortunes intalled by this port, type: + /usr/games/fortune %%PREFIX%%/share/games/fortune/rus diff --git a/russian/fortuneru/pkg-descr b/russian/fortuneru/pkg-descr index 67ff2d590314..84dc16393092 100644 --- a/russian/fortuneru/pkg-descr +++ b/russian/fortuneru/pkg-descr @@ -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) diff --git a/russian/fortuneru/pkg-install b/russian/fortuneru/pkg-install new file mode 100644 index 000000000000..22eb41b6fac6 --- /dev/null +++ b/russian/fortuneru/pkg-install @@ -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 diff --git a/russian/fortuneru/pkg-plist b/russian/fortuneru/pkg-plist index f498046ca5aa..7c00bc005aaa 100644 --- a/russian/fortuneru/pkg-plist +++ b/russian/fortuneru/pkg-plist @@ -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 |