diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2005-02-26 09:32:01 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2005-02-26 09:32:01 +0000 |
commit | 52b0c60b5acbbeb3f92db6a7e503a842ccca41b2 (patch) | |
tree | 10ccc814bf2918e2f60d6cb1669e18100084b71c /www/firefox36 | |
parent | b27cadaa3a5b5fae989204fb9f57a3dc978a9fc7 (diff) | |
download | ports-52b0c60b5acbbeb3f92db6a7e503a842ccca41b2.tar.gz ports-52b0c60b5acbbeb3f92db6a7e503a842ccca41b2.zip |
Notes
Diffstat (limited to 'www/firefox36')
-rw-r--r-- | www/firefox36/Makefile | 17 | ||||
-rw-r--r-- | www/firefox36/files/moz_pis_S50cleanhome | 31 |
2 files changed, 47 insertions, 1 deletions
diff --git a/www/firefox36/Makefile b/www/firefox36/Makefile index 80a16ca84089..45a01ff1003a 100644 --- a/www/firefox36/Makefile +++ b/www/firefox36/Makefile @@ -7,6 +7,7 @@ PORTNAME= firefox PORTVERSION= 1.0.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_MOZILLA} @@ -61,7 +62,10 @@ JPI_LIST?=\ ${LOCALBASE}/diablo-jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so \ ${LOCALBASE}/jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so -SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js +SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js +SCRIPTS_DIR= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} +MOZ_PIS_SCRIPTS= S50cleanhome +MOZ_PIS_DIR= ${SCRIPTS_DIR}/init.d OPTIONS= DEBUG "Build a debugging image" off \ LOGGING "Enable additional log messages" off \ @@ -145,6 +149,12 @@ post-patch: s|%%X11BASE%%|${X11BASE}|g' \ < ${FILESDIR}/${ii} > ${WRKDIR}/${ii} .endfor +.for ii in ${MOZ_PIS_SCRIPTS} + @${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \ + s|%%PREFIX%%|${PREFIX}|g ; \ + s|%%X11BASE%%|${X11BASE}|g' \ + < ${FILESDIR}/moz_pis_${ii} > ${WRKDIR}/moz_pis_${ii} +.endfor @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ ${WRKSRC}/build/unix/run-mozilla.sh @${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \ @@ -177,6 +187,8 @@ pre-install: @${RM} -rf ${FAKEDIR} ${PLIST} @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \ Makefile ${MAKE_ARGS} install + @${MKDIR} ${SCRIPTS_DIR} + @${MKDIR} ${MOZ_PIS_DIR} ${ECHO_CMD} 'share/gnome/pixmaps/${FIREFOX_ICON}' >> ${PLIST} ${ECHO_CMD} 'share/gnome/applications/firefox.desktop' >> ${PLIST} ${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g; \ @@ -188,6 +200,9 @@ pre-install: done ${ECHO_CMD} bin/firefox >> ${PLIST} ${ECHO_CMD} bin/firefox-config >> ${PLIST} +.for ii in ${MOZ_PIS_SCRIPTS} + ${INSTALL_SCRIPT} ${WRKDIR}/moz_pis_${ii} ${MOZ_PIS_DIR}/${ii} +.endfor .if !defined(WITHOUT_NEWTAB) ${ECHO_CMD} >> ${SYSTEM_PREFS} ${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS} diff --git a/www/firefox36/files/moz_pis_S50cleanhome b/www/firefox36/files/moz_pis_S50cleanhome new file mode 100644 index 000000000000..3de5565e39f2 --- /dev/null +++ b/www/firefox36/files/moz_pis_S50cleanhome @@ -0,0 +1,31 @@ +#!/bin/sh +# + +# S50cleanhome +# a script to clean up users' Mozilla home directories to make upgrading +# less painful. + +# We run in our own subshell + +# First, verify protocol +[ "$1" != "start" ] && exit 1 +[ -z "${MOZ_PIS_API}" -o ${MOZ_PIS_API} -ne 2 ] && exit 1 +[ -z "${MOZ_PIS_MOZBINDIR}" -o ! -d "${MOZ_PIS_MOZBINDIR}" ] && exit 1 +[ -z "${HOME}" -o ! -d "${HOME}" ] && exit 1 +[ -z "${MOZ_PIS_USER_DIR}" -o ! -d "${HOME}/${MOZ_PIS_USER_DIR}" ] && exit 1 + +# Try to cleanup ${HOME}/${MOZ_PIS_USER_DIR} + +if [ -f "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" ]; then + sed -e '/Path=/! d' -e "s,Path=,${HOME}/${MOZ_PIS_USER_DIR}/," \ + "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" \ + | while read dir + do + [ ! -d "${dir}" ] && continue + # Debian does this for new builds + # rm -f "${dir}/XUL.mfasl" + # force a rebuild of compreg.dat and xpti.dat for new installations + [ "${dir}/compreg.dat" -ot "${MOZ_PIS_MOZBINDIR}/components.ini" ] && + rm -f "${dir}/compatibility.ini" "${dir}/XUL.mfasl" + done +fi |