diff --git a/Makefile.am b/Makefile.am
index fff7f22..9e06685 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -681,6 +681,7 @@ VLC.app: vlc $(top_builddir)/src/.libs/libvlccore.dylib $(top_builddir)/src/.lib
 ## Win                                                                    ##
 ############################################################################
 win32_destdir=$(top_builddir)/vlc-$(VERSION)
+win32_xpi_destdir=$(win32_destdir)/vlc-plugin
 win32_debugdir=$(top_builddir)/symbols-$(VERSION)
 npvlc=vlc-$(VERSION)/mozilla/npvlc$(LIBEXT)
 axvlc=vlc-$(VERSION)/activex/axvlc$(LIBEXT)
@@ -749,6 +750,28 @@ endif
 		find $(win32_destdir) -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
 	fi
 
+package-win32-xpi:
+	mkdir -p "$(win32_xpi_destdir)/plugins"
+	cp $(top_builddir)/projects/mozilla/install.rdf "$(win32_xpi_destdir)"
+	cp $(top_builddir)/projects/mozilla/.libs/npvlc$(LIBEXT) \
+		"$(win32_xpi_destdir)/plugins"
+	cp $(top_srcdir)/projects/mozilla/npvlc.dll.manifest \
+		"$(win32_xpi_destdir)/plugins"
+	cp "$(top_srcdir)/extras/package/win32/libvlc.dll.manifest" \
+		"$(win32_xpi_destdir)/plugins"
+	cp "$(top_builddir)/src/.libs/libvlccore$(LIBEXT)" \
+		"$(win32_xpi_destdir)/plugins"
+	cp "$(top_builddir)/src/.libs/libvlc$(LIBEXT)" \
+		"$(win32_xpi_destdir)/plugins"
+
+	mkdir -p "$(win32_xpi_destdir)/plugins/plugins"
+	find "$(top_builddir)/modules/" -name '*_plugin$(LIBEXT)' | \
+	  while read i; do \
+	    if test -n "$$i" ; then \
+	      $(INSTALL) "$$i" "$(win32_xpi_destdir)/plugins/plugins/" ; \
+	    fi ; done
+	cd $(win32_xpi_destdir) && zip -r vlc-$(VERSION).xpi install.rdf plugins
+
 package-win32-base-debug: package-win-common
 # Copy relevant files
 # Script installer
@@ -1169,6 +1192,16 @@ if BUILD_MOZILLA
 	rm -rf "$(top_builddir)/vlc-plugin-$(VERSION)"
 endif
 
+package-macosx-xpi:
+if BUILD_MOZILLA
+	mkdir -p "$(top_builddir)/macosx-xpi/plugins"
+	cp $(top_builddir)/projects/mozilla/install.rdf \
+		"$(top_builddir)/macosx-xpi/"
+	cp -R "$(top_builddir)/projects/mozilla/VLC Plugin.plugin" \
+		"$(top_builddir)/macosx-xpi/plugins"
+	cd "$(top_builddir)/macosx-xpi" && zip -r vlc-$(VERSION).xpi install.rdf plugins
+endif
+
 package-translations:
 	@if test -e "$(srcdir)/vlc-translations-$(VERSION)"; then \
 	  echo "Error: please remove $(srcdir)/vlc-translations-$(VERSION), it is in the way"; \
diff --git a/configure.ac b/configure.ac
index 0ee70dc..5ada549 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4934,6 +4934,7 @@ AC_CONFIG_FILES([
   projects/mozilla/npvlc_rc.rc
   projects/mozilla/vlc.r
   projects/mozilla/install.js
+  projects/mozilla/install.rdf
   share/Makefile
   share/vlc_win32_rc.rc
   share/libvlc_win32_rc.rc
diff --git a/projects/mozilla/install.rdf.in b/projects/mozilla/install.rdf.in
new file mode 100644
index 0000000..4c95bcf
--- /dev/null
+++ b/projects/mozilla/install.rdf.in
@@ -0,0 +1,15 @@
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>vlc-plugin@videolan.org</em:id>
+    <em:name>VideoLAN</em:name>
+    <em:version>@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_REVISION@@VERSION_EXTRA@</em:version>
+    <em:targetApplication>
+      <Description>
+        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+        <em:minVersion>1.5</em:minVersion>
+        <em:maxVersion>3.5.*</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+  </Description>
+</RDF>
+
