Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / devel / xulrunner10 / xpi.mk
blobc93af2429e9ff79c147123fff435d6072325e59a
1 # $NetBSD: xpi.mk,v 1.2 2012/03/19 20:34:03 ryoon Exp $
3 # common logic for repackaging mozilla extensions (.xpi files)
4 # Used by the {firefox,seamonkey,thunderbird}10-l10n packages.
6 USE_TOOLS+= unzip pax
8 post-extract: extract-xpi
10 .PHONY: extract-xpi
11 extract-xpi:
12 .for f in ${XPI_FILES}
13 @${MKDIR} ${WRKDIR}/${f:S/.xpi//} && cd ${WRKDIR}/${f:S/.xpi//} && ${UNZIP_CMD} -aqo "${WRKDIR}/${f}"
14 .endfor
16 do-install: install-xpi
18 .PHONY: install-xpi
19 install-xpi:
20 .for f in ${XPI_FILES}
21 id=$$(${AWK} '/em:id=/ {sub("^.*em:id=\"", "");sub("\".*$$","");print $$0}' < ${WRKDIR}/${f:S/.xpi//}/install.rdf); \
22 ${MKDIR} ${DESTDIR}${EXTENSIONS_DIR}/$${id} && \
23 cd ${WRKDIR}/${f:S/.xpi//} && \
24 pax -rw . ${DESTDIR}${EXTENSIONS_DIR}/$${id}
25 .endfor