From 1e740c4e6146b4117fda68fc91abeab2530dfceb Mon Sep 17 00:00:00 2001 From: Trevor Johnson Date: Sun, 24 Feb 2002 04:40:50 +0000 Subject: [PATCH] Test for existence of components.conf (fenner). Allow batch builds, with all components selected by default (myself). Respect WRKDIRPREFIX and set IS_INTERACTIVE (Simon Schubert ). Allow packages to be built, but warn that they should not be distributed. Add checksum target, copied from bsd.port.mk. I modified it to only check files which exist. PR: 34518 and 35239 --- www/linux-netscape6/Makefile | 55 +++++++++++++++++++++++++++++++++++- www/netscape7/Makefile | 55 +++++++++++++++++++++++++++++++++++- 2 files changed, 108 insertions(+), 2 deletions(-) diff --git a/www/linux-netscape6/Makefile b/www/linux-netscape6/Makefile index 44e1484dddeb..a9f3bf8269e5 100644 --- a/www/linux-netscape6/Makefile +++ b/www/linux-netscape6/Makefile @@ -69,13 +69,66 @@ INSTALL_DIR= ${PREFIX}/lib/linux-netscape6 PLIST= ${WRKDIR}/pkg-plist STARTUP_CMD= netscape6 +.if !defined(BATCH) +IS_INTERACTIVE= yes +.endif + .include pre-everything:: ${MKDIR} ${WRKSRC}/bin/plugins ${WRKSRC}/bin/chrome \ ${WRKSRC}/plugins +.if !defined(BATCH) ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure -DISTFILES!=${CAT} ${.CURDIR}/work/${WRKSRC}/components.conf; ${TRUE} +.endif +DISTFILES= browser.xpi \ + deflenus.xpi \ + flash.xpi \ + jre.xpi \ + langenus.xpi \ + mail.xpi \ + psm.xpi \ + regca.xpi \ + reges.xpi \ + reggb.xpi \ + regus.xpi \ + spellchecker.xpi \ + talkback.xpi \ + xpcom.xpi +.if exists(${WRKDIRPREFIX}${.CURDIR}/work/netscape-installer/xpi/components.conf) +DISTFILES!= ${CAT} ${WRKDIRPREFIX}${.CURDIR}/work/netscape-installer/xpi/components.conf +.endif + +checksum: +.if !defined(REAL_EXTRACT) + @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch +.endif + @if [ ! -f ${MD5_FILE} ]; then \ + ${ECHO_MSG} ">> No MD5 checksum file."; \ + else \ + (cd ${DISTDIR}; OK="true"; \ + for file in ${_CKSUMFILES}; do \ + if [ -r $$file ]; then \ + CKSUM=`${MD5} < $$file`; \ + CKSUM2=`${GREP} "^MD5 ($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + if [ "$$CKSUM2" = "" ]; then \ + ${ECHO_MSG} ">> No checksum recorded for $$file."; \ + OK="false"; \ + elif ${EXPR} "$$CKSUM2" : ".*$$CKSUM" > /dev/null; then \ + ${ECHO_MSG} ">> Checksum OK for $$file."; \ + else \ + ${ECHO_MSG} ">> Checksum mismatch for $$file."; \ + OK="false"; \ + fi; \ + fi; \ + done; \ + if [ "$$OK" != "true" ]; then \ + ${ECHO_MSG} "Make sure the Makefile and distinfo file (${MD5_FILE})"; \ + ${ECHO_MSG} "are up to date. If you are absolutely sure you want to override this"; \ + ${ECHO_MSG} "check, type \"make NO_CHECKSUM=yes [other args]\"."; \ + exit 1; \ + fi) ; \ + fi do-extract: .for i in ${DISTFILES} diff --git a/www/netscape7/Makefile b/www/netscape7/Makefile index 44e1484dddeb..a9f3bf8269e5 100644 --- a/www/netscape7/Makefile +++ b/www/netscape7/Makefile @@ -69,13 +69,66 @@ INSTALL_DIR= ${PREFIX}/lib/linux-netscape6 PLIST= ${WRKDIR}/pkg-plist STARTUP_CMD= netscape6 +.if !defined(BATCH) +IS_INTERACTIVE= yes +.endif + .include pre-everything:: ${MKDIR} ${WRKSRC}/bin/plugins ${WRKSRC}/bin/chrome \ ${WRKSRC}/plugins +.if !defined(BATCH) ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure -DISTFILES!=${CAT} ${.CURDIR}/work/${WRKSRC}/components.conf; ${TRUE} +.endif +DISTFILES= browser.xpi \ + deflenus.xpi \ + flash.xpi \ + jre.xpi \ + langenus.xpi \ + mail.xpi \ + psm.xpi \ + regca.xpi \ + reges.xpi \ + reggb.xpi \ + regus.xpi \ + spellchecker.xpi \ + talkback.xpi \ + xpcom.xpi +.if exists(${WRKDIRPREFIX}${.CURDIR}/work/netscape-installer/xpi/components.conf) +DISTFILES!= ${CAT} ${WRKDIRPREFIX}${.CURDIR}/work/netscape-installer/xpi/components.conf +.endif + +checksum: +.if !defined(REAL_EXTRACT) + @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch +.endif + @if [ ! -f ${MD5_FILE} ]; then \ + ${ECHO_MSG} ">> No MD5 checksum file."; \ + else \ + (cd ${DISTDIR}; OK="true"; \ + for file in ${_CKSUMFILES}; do \ + if [ -r $$file ]; then \ + CKSUM=`${MD5} < $$file`; \ + CKSUM2=`${GREP} "^MD5 ($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ + if [ "$$CKSUM2" = "" ]; then \ + ${ECHO_MSG} ">> No checksum recorded for $$file."; \ + OK="false"; \ + elif ${EXPR} "$$CKSUM2" : ".*$$CKSUM" > /dev/null; then \ + ${ECHO_MSG} ">> Checksum OK for $$file."; \ + else \ + ${ECHO_MSG} ">> Checksum mismatch for $$file."; \ + OK="false"; \ + fi; \ + fi; \ + done; \ + if [ "$$OK" != "true" ]; then \ + ${ECHO_MSG} "Make sure the Makefile and distinfo file (${MD5_FILE})"; \ + ${ECHO_MSG} "are up to date. If you are absolutely sure you want to override this"; \ + ${ECHO_MSG} "check, type \"make NO_CHECKSUM=yes [other args]\"."; \ + exit 1; \ + fi) ; \ + fi do-extract: .for i in ${DISTFILES}