freebsd-ports/www/linux-seamonkey/Makefile.common

112 lines
3.6 KiB
Text
Raw Normal View History

# New ports collection makefile for: mozilla linux binary ports
# Date created: 1 May 2006
# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#
CATEGORIES+= linux
2013-07-24 11:29:58 +02:00
MASTER_SITES?= MOZILLA/${PORTNAME}/releases/${PORTVERSION}esr/linux-i686/en-US
PKGNAMEPREFIX?= linux-
NO_BUILD= yes
ONLY_FOR_ARCHS= i386 amd64
APP_NAME= ${PKGBASE}
2007-12-14 18:55:34 +01:00
BIN_NAME?= ${PORTNAME}
USE_LINUX= yes
USE_LINUX_APPS+= atk fontconfig gtk2 hicontheme pango
2007-12-14 18:55:34 +01:00
WRKSRC?= ${WRKDIR}/${BIN_NAME}
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
2013-07-24 11:29:58 +02:00
PREFS_FILE?= ${WRKSRC}/defaults/pref/browser-prefs.js
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX:M*devel*}
DESKTOP_SUFFIX?= (Linux, devel)
.endif
DESKTOP_SUFFIX?= (Linux)
_A= >> ${TMPPLIST}
_Q= 2>/dev/null || true
.if !target(post-extract)
2007-04-19 13:09:47 +02:00
post-extract:
@${RM} -rf ${WRKSRC}/updates
2013-07-24 11:29:58 +02:00
@${MKDIR} ${WRKSRC}/${APP_SUBDIR}plugins
@${MKDIR} ${WRKSRC}/${APP_SUBDIR}extensions
.endif
2007-04-19 13:09:47 +02:00
.if ${CATEGORIES:Mwww}
.if !target(post-patch)
post-patch:
2013-07-24 11:29:58 +02:00
@${MKDIR} ${PREFS_FILE:H}
# no AFMT_FLOAT support in kernel (bug 780531)
${ECHO} 'pref("media.use_cubeb", false);' >> ${PREFS_FILE}
2013-07-24 11:29:58 +02:00
# out-of-process plugins don't work with linuxulator (ports/170402)
${ECHO} 'pref("dom.ipc.plugins.enabled", false);' >> ${PREFS_FILE}
.endif
.endif
.if !target(do-install)
do-install:
@${INSTALL} -d ${FDIR} ${PREFIX}/share/applications
@${INSTALL_DATA} ${WRKDIR}/${APP_NAME}.desktop ${PREFIX}/share/applications/
@${CP} -pR ${WRKSRC}/ ${FDIR}/
@${CHOWN} -R ${BINOWN}:${BINGRP} ${FDIR}/
@${LN} -sf ${FDIR}/${BIN_NAME} ${PREFIX}/bin/${APP_NAME}
@${CP} -R ${LOCALBASE}/lib/npapi/symlinks/${APP_NAME}/ \
2013-07-24 11:29:58 +02:00
${FDIR}/${APP_SUBDIR}plugins/ ${_Q}
@${CP} -R ${LOCALBASE}/lib/xpi/symlinks/${APP_NAME}/ \
2013-07-24 11:29:58 +02:00
${FDIR}/${APP_SUBDIR}extensions/ ${_Q}
.endif
# Keep empty directories with pkg_* tools
.if !target(post-extract-script)
post-extract-script:
@if [ "${PKG_BIN:T}" != "pkg-static" ]; then \
for d in $$(${FIND} ${WRKSRC} -type d -empty); do \
${TOUCH} $$d/.keep_me; \
${ECHO_CMD} lib/${APP_NAME}/$${d#${WRKSRC}/}/.keep_me \
>> ${WRKDIR}/.PLIST.opkg; \
done; \
fi
.endif
.if !target(post-install-script)
post-install-script:
@if [ -f ${WRKDIR}/.PLIST.opkg ]; then \
${CAT} ${TMPPLIST} >> ${WRKDIR}/.PLIST.opkg; \
${MV} ${WRKDIR}/.PLIST.opkg ${TMPPLIST}; \
fi
.endif
# Maintainer section
create-plist: build
${ECHO_CMD} bin/%%APP_NAME%% > ${PLIST}
${ECHO_CMD} share/applications/%%APP_NAME%%.desktop >> ${PLIST}
2006-11-10 11:39:50 +01:00
cd ${WRKSRC} && ${FIND} -s . -type f -or -type l | \
2006-08-03 15:33:43 +02:00
${SED} -e "s#^\.#lib/%%APP_NAME%%#" | ${SORT} >> ${PLIST}
${ECHO_CMD} '@exec ${CP} -R %%LOCALBASE%%/lib/npapi/symlinks/%%APP_NAME%%/ \
2013-07-24 11:29:58 +02:00
%D/lib/%%APP_NAME%%/${APP_SUBDIR}plugins/ ${_Q}' >> ${PLIST}
${ECHO_CMD} '@exec ${CP} -R %%LOCALBASE%%/lib/xpi/symlinks/%%APP_NAME%%/ \
2013-07-24 11:29:58 +02:00
%D/lib/%%APP_NAME%%/${APP_SUBDIR}extensions/ ${_Q}' >> ${PLIST}
${ECHO_CMD} '@unexec ${FIND} %D/lib/%%APP_NAME%%/${APP_SUBDIR}plugins/ \
-depth 1 -type l -delete ${_Q}' >> ${PLIST}
2013-07-24 11:29:58 +02:00
${ECHO_CMD} '@unexec ${FIND} %D/lib/%%APP_NAME%%/${APP_SUBDIR}extensions/ \
-depth 1 -type l -delete ${_Q}' >> ${PLIST}
2006-11-10 11:39:50 +01:00
cd ${WRKSRC} && ${FIND} -sd . -type d | \
2006-08-03 15:33:43 +02:00
${SED} -e "s#^\.#@dirrm lib/%%APP_NAME%%#" >> ${PLIST}
${ECHO_CMD} @dirrmtry share/applications >> ${PLIST}
snatch-desktop:
${SED} -E -e 's/${PORTNAME}/${APP_NAME}/' \
-e 's/^(Name.*=.+)$$/\1 ${DESKTOP_SUFFIX}/' \
-e 's/^(GenericName.*=.+)$$/\1 ${DESKTOP_SUFFIX}/' \
-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