aboutsummaryrefslogtreecommitdiff
path: root/www/linux-seamonkey/Makefile.common
diff options
context:
space:
mode:
authorAndrew Pantyukhin <sat@FreeBSD.org>2006-05-07 16:48:52 +0000
committerAndrew Pantyukhin <sat@FreeBSD.org>2006-05-07 16:48:52 +0000
commit55948d035556365cd80842ea55332a4b7491061b (patch)
tree41b3f5ef3260e782e43d8ffe94c4fd05d7ede2ae /www/linux-seamonkey/Makefile.common
parent746dad3bb2e6423adbc998aad57d8c0a0cee2b60 (diff)
downloadports-55948d035556365cd80842ea55332a4b7491061b.tar.gz
ports-55948d035556365cd80842ea55332a4b7491061b.zip
Notes
Diffstat (limited to 'www/linux-seamonkey/Makefile.common')
-rw-r--r--www/linux-seamonkey/Makefile.common96
1 files changed, 96 insertions, 0 deletions
diff --git a/www/linux-seamonkey/Makefile.common b/www/linux-seamonkey/Makefile.common
new file mode 100644
index 000000000000..e2bec99d5522
--- /dev/null
+++ b/www/linux-seamonkey/Makefile.common
@@ -0,0 +1,96 @@
+# New ports collection makefile for: mozilla linux binary ports
+# Date created: 1 May 2006
+# Whom: Andrew Pantyukhin <infofarmer@gmail.com>
+#
+# $FreeBSD$
+#
+
+CATEGORIES+= linux
+MASTER_SITES?= ${MASTER_SITE_MOZILLA}
+MASTER_SITE_SUBDIR?= ${PORTNAME}/releases/${PORTVERSION}
+PKGNAMEPREFIX?= linux-
+
+RUN_DEPENDS?= ${LINUXBASE}/usr/lib/libgtk-x11-2.0.so.0:${PORTSDIR}/x11-toolkits/linux-gtk2 \
+ ${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/share/icons/hicolor/index.theme:${PORTSDIR}/x11-themes/linux-hicolor-icon-theme
+
+NO_BUILD= yes
+ONLY_FOR_ARCHS= i386 amd64
+APP_NAME= ${PKGBASE}
+USE_LINUX= yes
+USE_X_PREFIX= yes
+WRKSRC= ${WRKDIR}/${PORTNAME}
+FDIR= ${PREFIX}/lib/${APP_NAME}
+COMMON_DIR= ${.CURDIR}/../../www/linux-seamonkey
+
+PLIST_SUB+= APP_NAME=${APP_NAME}
+SUB_LIST+= APP_NAME=${APP_NAME}
+SUB_FILES= ${APP_NAME}.desktop
+PKGMESSAGE= ${WRKDIR}/pkg-message
+PREFS_FILE= ${WRKSRC}/defaults/pref/browser-prefs.js
+
+UNAME?= /usr/bin/uname
+
+.if !defined(OPSYS)
+OPSYS!= ${UNAME} -s
+.endif
+
+.if !defined(ARCH)
+ARCH!= ${UNAME} -p
+.endif
+
+.if ${CATEGORIES:Mwww}
+post-patch:
+ @${ECHO} 'pref("general.useragent.vendor", "'${OPSYS}'");' >> ${PREFS_FILE}
+ @${ECHO} 'pref("general.useragent.vendorSub", "'${ARCH}'");' >> ${PREFS_FILE}
+.endif
+
+do-install:
+ ${INSTALL} -d ${FDIR}
+ ${MKDIR} ${PREFIX}/share/applications
+ ${INSTALL_DATA} ${WRKDIR}/${APP_NAME}.desktop ${PREFIX}/share/applications
+ ${CP} -pR ${WRKSRC}/ ${FDIR}/
+ ${CHOWN} -R ${BINOWN}:${BINGRP} ${FDIR}/
+.if ${CATEGORIES:Mwww}
+.for file in linkfarm pkg-message
+ @${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' \
+ ${COMMON_DIR}/files/${file}.in > ${WRKDIR}/${file}
+.endfor
+ ${INSTALL_SCRIPT} ${WRKDIR}/linkfarm ${FDIR}/
+.endif
+ ${ECHO_CMD} '#!/bin/sh' > ${WRKDIR}/${APP_NAME}-run
+ ${ECHO_CMD} 'cd ${PREFIX} && exec ${FDIR}/${PORTNAME} "$$@"' >> ${WRKDIR}/${APP_NAME}-run
+ ${INSTALL_SCRIPT} ${WRKDIR}/${APP_NAME}-run ${PREFIX}/bin/${APP_NAME}
+
+post-install:
+.if ${CATEGORIES:Mwww}
+ @${SH} ${FDIR}/linkfarm
+ @${CAT} ${PKGMESSAGE}
+.endif
+
+# Maintainer section
+create-plist:
+ ${ECHO_CMD} bin/%%APP_NAME%% > ${PLIST}
+ ${ECHO_CMD} share/applications/%%APP_NAME%%.desktop >> ${PLIST}
+ cd ${WRKDIR} && ${FIND} ${PORTNAME} -type f -or -type l | \
+ ${SED} -e "s#^${PORTNAME}#lib/%%APP_NAME%%#" | ${SORT} >> ${PLIST}
+.if ${CATEGORIES:Mwww}
+ ${ECHO_CMD} lib/%%APP_NAME%%/linkfarm >> ${PLIST}
+ ${ECHO_CMD} @exec %%PREFIX%%/lib/%%APP_NAME%%/linkfarm >> ${PLIST}
+ ${ECHO_CMD} @unexec ${FIND} %%PREFIX%%/lib/%%APP_NAME%%/plugins \
+ -type l -delete >> ${PLIST}
+.endif
+ cd ${WRKDIR} && ${FIND} -d ${PORTNAME} -type d | \
+ ${SED} -e "s#^${PORTNAME}#@dirrm lib/%%APP_NAME%%#" >> ${PLIST}
+ ${ECHO_CMD} @dirrmtry share/applications >> ${PLIST}
+
+snatch-desktop:
+ ${SED} -E -e 's/${PORTNAME}/${APP_NAME}/' \
+ -e 's/^(Name.*=.+)$$/\1 (Linux)/' \
+ -e 's/^(GenericName.*=.+)$$/\1 (Linux)/' \
+ -e 's!^Icon=.*$$!Icon=%%PREFIX%%/lib/%%APP_NAME%%/chrome/icons/default/default.xpm!' \
+ ${PORTSDIR}/${PKGCATEGORY}/${PORTNAME}/files/${PORTNAME}.desktop.in > \
+ ${FILESDIR}/${APP_NAME}.desktop.in