diff --git a/games/editss/Makefile b/games/editss/Makefile index 1f292c8ae0ff..2534de8c6ece 100644 --- a/games/editss/Makefile +++ b/games/editss/Makefile @@ -7,8 +7,10 @@ PORTNAME= editss PORTVERSION= 2.2 +PORTREVISION= 1 CATEGORIES= games -MASTER_SITES= ftp://ftp.xpilot.org/pub/contrib/ +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= jylefort MAINTAINER= jylefort@FreeBSD.org COMMENT= An editor for XPilot shipshapes @@ -17,16 +19,17 @@ USE_IMAKE= yes ALL_TARGET= editss MAN6= editss.6 NO_INSTALL_MANPAGES= yes -XFREE86_HTML_MAN= no -MAN_COMPRESSED= yes +SUB_FILES= editss + +post-patch: + @${REINPLACE_CMD} -e 's|xxpms/ships2|.xpilot-shipshapes|' \ + ${WRKSRC}/editssrc do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/editss ${PREFIX}/bin - ${MKDIR} ${PREFIX}/share/editss - ${INSTALL_DATA} ${WRKSRC}/editssrc ${PREFIX}/share/editss + ${INSTALL_SCRIPT} ${WRKDIR}/editss ${PREFIX}/bin/editss + ${INSTALL_PROGRAM} ${WRKSRC}/editss ${PREFIX}/libexec + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/editssrc ${WRKSRC}/ships ${DATADIR} ${INSTALL_MAN} ${WRKSRC}/editss.6 ${MANPREFIX}/man/man6 -post-install: - @${CAT} ${PKGMESSAGE} - .include diff --git a/games/editss/files/editss.in b/games/editss/files/editss.in new file mode 100644 index 000000000000..9f03df714cc4 --- /dev/null +++ b/games/editss/files/editss.in @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! [ -f $HOME/.editssrc ]; then + /usr/bin/install -m 644 %%DATADIR%%/editssrc $HOME/.editssrc +fi +if ! [ -f $HOME/.xpilot-shipshapes ]; then + /usr/bin/install -m 644 %%DATADIR%%/ships $HOME/.xpilot-shipshapes +fi + +exec %%PREFIX%%/libexec/editss "$@" diff --git a/games/editss/pkg-message b/games/editss/pkg-message deleted file mode 100644 index ab67fd274266..000000000000 --- a/games/editss/pkg-message +++ /dev/null @@ -1,9 +0,0 @@ -------------------------------------------------------------------------------- -WARNING: editss will dump a core if it is not able to find a shipshapes file. - -You should copy the editss rc file from /usr/X11R6/share/editss/editssrc -to $HOME/.editssrc and change the shiplib keyword in that file to make -it point to your shipshapes file. - -A nice shipshapes file can be found at ftp://ftp.xpilot.org/pub/shipshapes -------------------------------------------------------------------------------- diff --git a/games/editss/pkg-plist b/games/editss/pkg-plist index fd977aee4362..6075379b7e1e 100644 --- a/games/editss/pkg-plist +++ b/games/editss/pkg-plist @@ -1,3 +1,5 @@ bin/editss -share/editss/editssrc -@dirrm share/editss +libexec/editss +%%DATADIR%%/editssrc +%%DATADIR%%/ships +@dirrm %%DATADIR%%