mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-16 03:24:07 +00:00
86 lines
3.3 KiB
Makefile
86 lines
3.3 KiB
Makefile
# New ports collection makefile for: mozilla linux binary ports
|
|
# Date created: 1 May 2006
|
|
# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
CATEGORIES+= linux
|
|
.ifndef MASTER_SITES
|
|
MASTER_SITES= MOZILLA_EXTENDED
|
|
MASTER_SITE_SUBDIR?= ${PORTNAME}/releases/${PORTVERSION}
|
|
.endif
|
|
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
|
|
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
|
|
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 ${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} ${PREFIX}/share/applications
|
|
@${INSTALL_DATA} ${WRKDIR}/${APP_NAME}.desktop ${PREFIX}/share/applications/
|
|
@${CP} -pR ${WRKSRC}/ ${FDIR}/
|
|
@${CHOWN} -R ${BINOWN}:${BINGRP} ${FDIR}/
|
|
@${ECHO_CMD} '#!/bin/sh' > ${WRKDIR}/${APP_NAME}-run
|
|
@${ECHO_CMD} 'exec ${FDIR}/${PORTNAME} "$$@"' >> ${WRKDIR}/${APP_NAME}-run
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/${APP_NAME}-run ${PREFIX}/bin/${APP_NAME}
|
|
@${CP} -R ${LOCALBASE}/lib/npapi/symlinks/${APP_NAME}/ \
|
|
${FDIR}/plugins/ ${_Q}
|
|
@${CP} -R ${LOCALBASE}/lib/xpi/symlinks/${APP_NAME}/ \
|
|
${FDIR}/extensions/ ${_Q}
|
|
|
|
# Maintainer section
|
|
create-plist: build
|
|
${ECHO_CMD} bin/%%APP_NAME%% > ${PLIST}
|
|
${ECHO_CMD} share/applications/%%APP_NAME%%.desktop >> ${PLIST}
|
|
cd ${WRKSRC} && ${FIND} . -type f -or -type l | \
|
|
${SED} -e "s#^\.#lib/%%APP_NAME%%#" | ${SORT} >> ${PLIST}
|
|
${ECHO_CMD} '@exec ${CP} -R %%LOCALBASE%%/lib/npapi/symlinks/%%APP_NAME%%/ \
|
|
%D/lib/%%APP_NAME%%/plugins/ ${_Q}' >> ${PLIST}
|
|
${ECHO_CMD} '@exec ${CP} -R %%LOCALBASE%%/lib/xpi/symlinks/%%APP_NAME%%/ \
|
|
%D/lib/%%APP_NAME%%/extensions/ ${_Q}' >> ${PLIST}
|
|
${ECHO_CMD} '@unexec ${FIND} %D/lib/%%APP_NAME%%/plugins/ \
|
|
-depth 1 -type l -delete ${_Q}' >> ${PLIST}
|
|
${ECHO_CMD} '@unexec ${FIND} %D/lib/%%APP_NAME%%/extensions/ \
|
|
-depth 1 -type l -delete ${_Q}' >> ${PLIST}
|
|
cd ${WRKSRC} && ${FIND} -d . -type d | \
|
|
${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
|