summaryrefslogtreecommitdiff
path: root/www/linux-firefox/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'www/linux-firefox/Makefile')
-rw-r--r--www/linux-firefox/Makefile56
1 files changed, 33 insertions, 23 deletions
diff --git a/www/linux-firefox/Makefile b/www/linux-firefox/Makefile
index 08480151d844..962136bc3cc5 100644
--- a/www/linux-firefox/Makefile
+++ b/www/linux-firefox/Makefile
@@ -1,13 +1,12 @@
-# New ports collection makefile for: linux-firefox
-# Date created: 2004-09-17
-# Whom: voisine
+# New ports collection makefile for: linux-firefox
+# Date created: 2004-09-17
+# Whom: voisine
#
# $FreeBSD$
#
PORTNAME= firefox
-PORTVERSION= 1.5
-PORTREVISION= 2
+PORTVERSION= 1.5.0.1
CATEGORIES?= www linux
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR?= firefox/releases/${PORTVERSION}/linux-i686/en-US
@@ -20,27 +19,37 @@ RUN_DEPENDS?= ${LINUXBASE}/usr/lib/libgtk-x11-2.0.so.0:${PORTSDIR}/x11-toolkits/
${LINUXBASE}/usr/lib/libatk-1.0.so.0:${PORTSDIR}/accessibility/linux-atk \
${LINUXBASE}/usr/lib/libpangoxft-1.0.so.0:${PORTSDIR}/x11-toolkits/linux-pango\
${LINUXBASE}/usr/lib/libgobject-2.0.so.0:${PORTSDIR}/devel/linux-glib2 \
- ${LINUXBASE}/usr/lib/libfontconfig.so.1:${PORTSDIR}/x11-fonts/linux-fontconfig
+ ${LINUXBASE}/usr/lib/libfontconfig.so.1:${PORTSDIR}/x11-fonts/linux-fontconfig \
+ ${LINUXBASE}/usr/share/icons/hicolor/index.theme:${PORTSDIR}/x11-themes/linux-hicolor-icon-theme
NO_BUILD= yes
ONLY_FOR_ARCHS= i386 amd64
-FIREFOX_NAME= ${PKGNAMEPREFIX}${PORTNAME}
+BROWSER_NAME= ${UNIQUENAME}
USE_LINUX= yes
USE_X_PREFIX= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
-FDIR= ${PREFIX}/lib/${FIREFOX_NAME}
+FDIR= ${PREFIX}/lib/${BROWSER_NAME}
-PLIST_SUB+= FIREFOX_NAME=${FIREFOX_NAME}
-SUB_LIST+= FIREFOX_NAME=${FIREFOX_NAME}
-SUB_FILES= linkfarm pkg-message
+PLIST_SUB+= BROWSER_NAME=${BROWSER_NAME}
+SUB_LIST+= BROWSER_NAME=${BROWSER_NAME}
+SUB_FILES= linkfarm pkg-message linux-firefox.desktop
PKGMESSAGE= ${WRKDIR}/pkg-message
+PREFS_FILE= ${WRKSRC}/defaults/pref/firefox.js
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+ @${ECHO} 'pref("general.useragent.vendor", "'${OPSYS}'");' >> ${PREFS_FILE}
+ @${ECHO} 'pref("general.useragent.vendorSub", "'${ARCH}'");' >> ${PREFS_FILE}
do-install:
${INSTALL} -d ${FDIR}
- ${CP} -R ${WRKSRC}/ ${FDIR}
- ${LN} -sf ${FDIR}/firefox ${PREFIX}/bin/${FIREFOX_NAME}
- ${LN} -sf ${FDIR}/firefox-bin ${FDIR}/${FIREFOX_NAME}-bin
- ${INSTALL_SCRIPT} ${WRKDIR}/linkfarm ${FDIR}
+ ${MKDIR} ${PREFIX}/share/applications
+ ${INSTALL_DATA} ${WRKDIR}/linux-firefox.desktop ${PREFIX}/share/applications
+ ${CP} -pR ${WRKSRC}/ ${FDIR}/
+ ${INSTALL_SCRIPT} ${WRKDIR}/linkfarm ${FDIR}/
+ ${INSTALL_SCRIPT} ${FILESDIR}/run ${PREFIX}/bin/${BROWSER_NAME}
+ ${ECHO} 'cd ${PREFIX} && exec ${FDIR}/${PORTNAME}' >> ${PREFIX}/bin/${BROWSER_NAME}
post-install:
@${SH} ${FDIR}/linkfarm
@@ -48,15 +57,16 @@ post-install:
# Maintainer section
create-plist:
- ${ECHO_CMD} bin/%%FIREFOX_NAME%% > ${PLIST}
- ${ECHO_CMD} lib/%%FIREFOX_NAME%%/%%FIREFOX_NAME%%-bin >> ${PLIST}
+ ${ECHO_CMD} bin/%%BROWSER_NAME%% > ${PLIST}
+ ${ECHO_CMD} share/applications/%%BROWSER_NAME%%.desktop >> ${PLIST}
cd ${WRKDIR} && ${FIND} ${PORTNAME} -type f -or -type l | \
- ${SED} -e "s#^${PORTNAME}#lib/%%FIREFOX_NAME%%#" | ${SORT} >> ${PLIST}
- ${ECHO_CMD} lib/%%FIREFOX_NAME%%/linkfarm >> ${PLIST}
- ${ECHO_CMD} @exec %%PREFIX%%/lib/%%FIREFOX_NAME%%/linkfarm >> ${PLIST}
- ${ECHO_CMD} @unexec ${FIND} %%PREFIX%%/lib/%%FIREFOX_NAME%%/plugins \
+ ${SED} -e "s#^${PORTNAME}#lib/%%BROWSER_NAME%%#" | ${SORT} >> ${PLIST}
+ ${ECHO_CMD} lib/%%BROWSER_NAME%%/linkfarm >> ${PLIST}
+ ${ECHO_CMD} @exec %%PREFIX%%/lib/%%BROWSER_NAME%%/linkfarm >> ${PLIST}
+ ${ECHO_CMD} @unexec ${FIND} %%PREFIX%%/lib/%%BROWSER_NAME%%/plugins \
-type l -delete >> ${PLIST}
cd ${WRKDIR} && ${FIND} -d ${PORTNAME} -type d | \
- ${SED} -e "s#^${PORTNAME}#@dirrm lib/%%FIREFOX_NAME%%#" >> ${PLIST}
+ ${SED} -e "s#^${PORTNAME}#@dirrm lib/%%BROWSER_NAME%%#" >> ${PLIST}
+ ${ECHO_CMD} @dirrmtry share/applications >> ${PLIST}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>