summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-09-17 14:03:48 +0000
committeragc <agc@pkgsrc.org>1998-09-17 14:03:48 +0000
commit3e45f77a058bc5db526a52d6d9542721203a68a9 (patch)
treeac7f77857394a238d7fdb6fbd030effc4bc1c300 /games
parent256a9a5b61f5cc0c6ab259b5ad3cb11d7d7d72e0 (diff)
downloadpkgsrc-3e45f77a058bc5db526a52d6d9542721203a68a9.tar.gz
Make any INSTALL or DEINSTALL scripts specifiable in the package
Makefile (for read-only pkgsrc use). This is for the use of packages which build INSTALL and DEINSTALL scripts dynamically, such as pkgsrc/games/crossfire.
Diffstat (limited to 'games')
-rw-r--r--games/crossfire/Makefile23
1 files changed, 13 insertions, 10 deletions
diff --git a/games/crossfire/Makefile b/games/crossfire/Makefile
index 7b868989b17..3443afe6ad2 100644
--- a/games/crossfire/Makefile
+++ b/games/crossfire/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 1998/08/20 15:16:54 tsarna Exp $
+# $NetBSD: Makefile,v 1.3 1998/09/17 14:03:49 agc Exp $
#
DISTNAME= crossfire-0.94.2
@@ -22,30 +22,33 @@ USE_IMAKE= yes
USE_PERL5= yes
SCRIPTS_ENV+= ${SCRIPTSDIR}
+INSTALL_FILE= ${WRKDIR}/.INSTALL
+DEINSTALL_FILE= ${WRKDIR}/.DEINSTALL
+
post-patch:
@${MV} ${WRKSRC}/config/crosssite.def \
${WRKSRC}/config/crosssite.def-orig
@${SED} -e 's|@X11BASE@|${X11BASE}|g' \
-e 's|@LOCALBASE@|${LOCALBASE}|g' \
- < ${WRKSRC}/config/crosssite.def-orig \
+ ${WRKSRC}/config/crosssite.def-orig \
> ${WRKSRC}/config/crosssite.def
@${MV} ${WRKSRC}/lib/sounds ${WRKSRC}/lib/sound_list
@${SED} -e 's|XXXLOCALBASEXXX|${LOCALBASE}|' \
-e 's|XXXDBXXX|${PKG_DBDIR}/${DISTNAME}|' \
- < ${PKGDIR}/deinstall >${PKGDIR}/DEINSTALL
+ ${PKGDIR}/deinstall > ${DEINSTALL_FILE}
@${SED} -e 's|XXXLOCALBASEXXX|${LOCALBASE}|' \
-e 's|XXXX11BASEXXX|${X11BASE}|' \
- < ${PKGDIR}/install >${PKGDIR}/INSTALL
+ ${PKGDIR}/install > ${INSTALL_FILE}
post-install:
${EXTRACT_CMD} -xzmf ${DISTDIR}/${CF_MAPS} -C ${X11BASE}/lib/crossfire
${EXTRACT_CMD} -xzmf ${DISTDIR}/${CF_SOUND} -C ${X11BASE}/lib/crossfire
@/usr/bin/find ${X11BASE}/lib/crossfire/sounds -name \*.au -type f \
- > ${PKGDIR}/RPLAY
- @${CAT} ${PKGDIR}/RPLAY >> ${LOCALBASE}/etc/rplay.conf
- @${CAT} ${PKGDIR}/RPLAY >> ${PKGDIR}/DEINSTALL
- @${CAT} ${PKGDIR}/RPLAY >> ${PKGDIR}/INSTALL
- @${ECHO} "EOF" >> ${PKGDIR}/INSTALL
+ > ${WRKDIR}/.RPLAY
+ @${CAT} ${WRKDIR}/.RPLAY >> ${LOCALBASE}/etc/rplay.conf
+ @${CAT} ${WRKDIR}/.RPLAY >> ${DEINSTALL_FILE}
+ @${CAT} ${WRKDIR}/.RPLAY >> ${INSTALL_FILE}
+ @${ECHO} "EOF" >> ${INSTALL_FILE}
@chown root:games ${X11BASE}/bin/crossfire
@chmod 2755 ${X11BASE}/bin/crossfire
@chown -R root:games ${X11BASE}/lib/crossfire
@@ -54,6 +57,6 @@ post-install:
@chmod 664 ${X11BASE}/lib/crossfire/highscore
pre-clean:
- @${RM} -f ${PKGDIR}/DEINSTALL ${PKGDIR}/INSTALL ${PKGDIR}/RPLAY
+ @${RM} -f ${DEINSTALL_FILE} ${INSTALL_FILE} ${WRKDIR}/.RPLAY
.include "../../mk/bsd.pkg.mk"