Index: xpi-adblock/Makefile.xpi =================================================================== RCS file: /home/pcvs/ports/www/xpi-adblock/Makefile.xpi,v retrieving revision 1.3 diff -u -r1.3 Makefile.xpi --- xpi-adblock/Makefile.xpi 8 May 2006 21:41:09 -0000 1.3 +++ xpi-adblock/Makefile.xpi 9 May 2006 09:26:11 -0000 @@ -1,3 +1,6 @@ +#-*- mode: makefile; tab-width: 4; -* +# ex:ts=4 +# # New ports collection makefile for: xpi infrastructure # Date created: 28 March 2006 # Whom: Andrew Pantyukhin @@ -5,44 +8,58 @@ # $FreeBSD: ports/www/xpi-adblock/Makefile.xpi,v 1.3 2006/05/08 21:41:09 sat Exp $ # -# This Makefile is an alpha-version of a new xpi infrastructure. -# It currently supports Gecko 1.8+ (Firefox 1.5+). Support for -# Gecko 1.7x (and Seamonkey 1.0) may be merged later from -# Thierry Thomas works (but I doubt it is worthwhile). -# -# A new xpi will require a PORTNAME, PORTVERSION, DISTVERSION- -# SUFFIX and CATEGORIES. In case it is not published on the -# mozilla.org sites, MASTER_SITES can be redefined. XPI_* vars -# will also need to be defined manually, which helps keep the -# infrastructure simpler. -# -# Gecko 1.8 xpi engine tries to detect various compatibility -# issues all by itself. Thus, xpi's are installed into -# $LOCALBASE/xpi/$XPI_ID by default and links are made to all -# apps which have the engine (firefox, thunderbird and flock -# at the moment). relink and relink-all targets can be invoked -# to refarm the links of a single extensions or all installed -# extensions accordingly. -# -# In case an xpi does not have chrome.manifest, it should be -# generated manually by a maintainer and placed in files, where -# it will be noticed. - -# xpi ports do not depend on their master applications. You -# can install an extension before the app and run relink when -# the app is present. +# XPI_ID - Extension id, might be in {12345-...} or dev@org format +# XPI_FILES - List of files in xpi archive. This is used to produce +# PLIST_FILES. XPI_FILES can be generated by xpi-gen, but be +# sure to put chrome.manifest in ${FILESDIR} before that if you +# need it. +# XPI_DIRS - List of directories in xpi archive. This is used to produce +# PLIST_DIRS. +# XPI_DISTNAME - The name of distribution +# Default: ${PORTNAME} +# PORTNAME, PORTVERSION, DISTVERSIONSUFFIX, CATEGORIES, MAINTAINER, COMMENT +# - These should all be set manually for port to be functional. See +# ${PORTSDIR}/Mk/bsd.port.mk for details. +# MASTER_SITES - This should be set if port is unavailable at the default site. +# Default: ${MASTER_SITE_MOZILLA} +# MASTER_SITE_SUBDIR +# - Default: extensions/${PORTNAME} +# LATEST_LINK - Default: ${PKGBASE:S/_//g} +# +# This Makefile is an alpha-version of the new xpi infrastructure. It currently +# supports Gecko 1.8+ (Firefox 1.5+). Support for Gecko 1.7x (and Seamonkey 1.0) +# may be merged later from Thierry Thomas works. +# +# A new xpi will require a PORTNAME, PORTVERSION, DISTVERSIONSUFFIX and +# CATEGORIES. In case it is not published on the mozilla.org sites, MASTER_SITES +# can be redefined. XPI_* vars will also need to be defined manually, which helps +# keep the infrastructure simpler. +# +# Gecko 1.8 xpi engine tries to detect various compatibility issues all by itself. +# Thus, xpi's are installed into ${LOCALBASE}/lib/xpi/${XPI_ID} by default and +# links are made to all apps which have the engine (firefox, thunderbird and flock +# at the moment). relink and relink-all targets can be invoked to refarm the links +# of a single extensions or all installed extensions accordingly. +# +# In case an xpi does not have chrome.manifest, it should be generated manually by +# a maintainer and placed in files, where it will be noticed. +# +# xpi ports do not depend on their master applications. You can install an +# extension before the app and run relink when the app is present. MASTER_SITES?= ${MASTER_SITE_MOZILLA} -MASTER_SITE_SUBDIR?= extensions/${PORTNAME} +MASTER_SITE_SUBDIR?= extensions/${XPI_DISTNAME} PKGNAMEPREFIX?= xpi- EXTRACT_SUFX?= .xpi +DISTNAME?= ${XPI_DISTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} DIST_SUBDIR?= xpi -LATEST_LINK?= ${PKGNAMEPREFIX}${PORTNAME:S/_//g}${PKGNAMESUFFIX} +LATEST_LINK?= ${PKGBASE:S/_//g} NO_BUILD= yes USE_ZIP= yes EXTRACT_AFTER_ARGS= -d ${WRKSRC} +XPI_DISTNAME?= ${PORTNAME} XPI_DIRS?= chrome components defaults/preferences defaults WITH_XPI_APPS?= *firefox* *thunderbird* *flock* XPI_APPS?= ${WITH_XPI_APPS:S.^.${X11BASE}/lib/.:S.$./extensions.} @@ -85,5 +102,3 @@ @${ECHO_CMD} -n 'XPI_DIRS=' @cd ${WRKSRC} && ${FIND} -ds . -not -name . -type d | cut -f2- -d/ | ${TR} '\n' ' ' @${ECHO_CMD} - -