--- nspluginwrapper-1.3.0.orig/debian/dirs +++ nspluginwrapper-1.3.0/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/lib/nspluginwrapper/plugins +usr/lib/mozilla/plugins --- nspluginwrapper-1.3.0.orig/debian/docs +++ nspluginwrapper-1.3.0/debian/docs @@ -0,0 +1,3 @@ +NEWS +README +TODO --- nspluginwrapper-1.3.0.orig/debian/control +++ nspluginwrapper-1.3.0/debian/control @@ -0,0 +1,17 @@ +Source: nspluginwrapper +Section: contrib/utils +Priority: optional +Maintainer: Rob Andrews +Build-Depends: debhelper (>= 5), quilt, autotools-dev, libc6-dev-i386, libxt-dev, x11proto-core-dev, x11proto-xext-dev, libx11-dev, libatk1.0-dev, libfontconfig1-dev, libgtk2.0-dev, libglib2.0-dev, libpango1.0-dev, ia32-libs, ia32-libs-gtk, gcc-multilib, g++-multilib, libcurl4-gnutls-dev +Standards-Version: 3.7.2 + +Package: nspluginwrapper +Architecture: amd64 +Depends: ${shlibs:Depends}, util-linux (>= 2.13~rc3-7) | linux32, ia32-libs-gtk, debconf +Description: A wrapper to run Netscape plugins on other architectures + nspluginwrapper is an Open Source compatibility plugin for Netscape 4 + (NPAPI) plugins. That is, it enables you to use plugins on platforms + they were not built for. + . + This package is built to run i386 plugins, since there are no known + binary-only plugins built for any other architecture. --- nspluginwrapper-1.3.0.orig/debian/rules +++ nspluginwrapper-1.3.0/debian/rules @@ -0,0 +1,85 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# debian/rules that uses debhelper. + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +# quilty comfort +include /usr/share/quilt/quilt.make + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +# Report all warnings, generate debugging symbols (don't worry, we dh_strip) +CFLAGS = -Wall -g + +# Conditional optimmisation +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: patch configure-stamp +configure-stamp: + dh_testdir + ./configure --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + --with-lib32=lib32 \ + --with-lib64=lib \ + --biarch \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="-Wl,-z,defs" + touch $@ + +build: configure build-stamp +build-stamp: + dh_testdir + $(MAKE) + touch $@ + +clean: clean-patched unpatch +clean-patched: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + -$(MAKE) distclean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) DESTDIR=$(CURDIR)/debian/nspluginwrapper install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdebconf + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_installman debian/nspluginwrapper.1 debian/nspluginplayer.1 + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- nspluginwrapper-1.3.0.orig/debian/watch +++ nspluginwrapper-1.3.0/debian/watch @@ -0,0 +1,8 @@ +# watch control file for uscan +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# +http://gwenole.beauchesne.info/en/projects/nspluginwrapper .*/nspluginwrapper-(.*)\.tar\.bz2 --- nspluginwrapper-1.3.0.orig/debian/shlibs.local +++ nspluginwrapper-1.3.0/debian/shlibs.local @@ -0,0 +1,6 @@ +# Fix FTBFS due to ia32-libs-gtk not shipping a shlibs file (#460737) +libgthread-2.0 0 ia32-libs-gtk +libgobject-2.0 0 ia32-libs-gtk +libgtk-x11-2.0 0 ia32-libs-gtk +libglib-2.0 0 ia32-libs-gtk +libgdk-x11-2.0 0 ia32-libs-gtk --- nspluginwrapper-1.3.0.orig/debian/changelog +++ nspluginwrapper-1.3.0/debian/changelog @@ -0,0 +1,123 @@ +nspluginwrapper (1.3.0-1) unstable; urgency=low + + * New upstream release (package-legacy branch) + * Add warning to README.Debian regarding 32-bit Flash player and curl + * Change libcurl4-dev to libcurl4-gnutls-dev in control + * Incorporate nspluginplayer.1 manual page from Ubuntu package + + -- Rob Andrews Tue, 10 Mar 2009 22:07:21 +0000 + +nspluginwrapper (1.2.2-1) unstable; urgency=low + + * New upstream release (package-legacy branch) + * Add libcurl4-dev to build dependancies + * Reworked 004_system_only_update.diff to apply cleanly + * Drop the firefox and iceweasel directories from the link creation + paths - no longer relevant + + -- Rob Andrews Mon, 09 Mar 2009 22:08:12 +0000 + +nspluginwrapper (1.0.0-1) unstable; urgency=low + + * New upstream release (Closes: #490874) + * Remove 004_fix_threading.diff, it's been fixed upstream + * Rework 000_debian_make_symlinks.diff so it works with 1.0.0's + npw-config.c + * Add debconf questioning - let the user auto-update the loader stubs + on package update + * Rework 003_update_help_info.diff, since I added the -n option in 000 + * Add an option to only auto update the system mozilla plugin dir, + /usr/lib/nspluginwrapper/plugins on Debian systems + + -- Rob Andrews Sun, 24 Aug 2008 20:03:23 +0100 + +nspluginwrapper (0.9.91.5-2) unstable; urgency=low + + * linux32 is now provided by util-linux, so remove runtime dep on + linux32 (no longer installable) + * Fix issues on SMP by initialising and using gthreads in glib + - patch is 004_fix_threading.diff (Closes: #458584) + * Enable 003_update_help_info.diff, which for some reason I forgot to + put into the quilt series file + * Add a shlibs.local file for ia32-libs-gtk dep generation - in the + absence of a ia32-libs-gtk-dev package, this fixes the FTBFS + Thanks to Dan Callahan (Closes: #462198) + + -- Rob Andrews Mon, 28 Jan 2008 23:27:29 +0000 + +nspluginwrapper (0.9.91.5-1) unstable; urgency=low + + * New upstream release + * Remove 003_fix_xembed_grab_keys.diff, as 0.9.91.5 fixes this issue + * Remove manual dependencies on ia32-libs, the build-dep covers this + issue + * Add 003_update_help_info.diff, specify that a plugin is needed when + using -u option, also update manpage accordingly (Closes: #436410) + + -- Rob Andrews Sun, 02 Sep 2007 11:38:43 +0100 + +nspluginwrapper (0.9.91.4-4) unstable; urgency=low + + * Change Priority: extra to "optional" + * Add patch 002_install_to_NSPLUGINDIR.patch from Ubuntu + (thanks Alexander Sack) + * Fix XEmbed issue where plugin was able to grab keystrokes + from other applications when browser had lost focus + - patch is 003_fix_xembed_grab_keys.diff + (Closes: #435912) + + -- Rob Andrews Sun, 19 Aug 2007 20:17:33 +0100 + +nspluginwrapper (0.9.91.4-3) unstable; urgency=low + + * Shift to using quilt, as it helps me revision control the Debian + packaging with git + * Really should be depending on gcc-multilib, not required yet but may + break build in future + * Add manual dependency on ia32-libs for the target package, since it is + not automatically determined + * Inherit "remove bashisms" patch from Ubuntu, to remove bashisms (oddly + enough!) - patch by Anders Kaseorg + * Add a -n option to the nspluginwrapper commandline to skip creation and + destruction of symlinks - this behaviour is more predictable when + packaging plugins for Debian and derivatives + + -- Rob Andrews Fri, 29 Jun 2007 22:06:02 +0100 + +nspluginwrapper (0.9.91.4-2) unstable; urgency=low + + * Add build dependency on g++-multilib + (Closes: #423131, thanks Pär Andersson) + + -- Rob Andrews Thu, 10 May 2007 12:17:09 -0400 + +nspluginwrapper (0.9.91.4-1) unstable; urgency=low + + * New upstream release + * Install into /usr/lib/nspluginwrapper/plugins and symlink to + browser-specific plugin paths (Closes: #417288) + * (to compliment the above) Remove symlinks to plugins on removal + Only operates on symlinks in global directorys, includes: + /usr/lib/firefox/plugins + /usr/lib/iceweasel/plugins + /usr/lib/mozilla/plugins + * Remove ia64 from the architecture list - there isn't a compiler available + to build i386 binaries on the architecture + * Explicitly set --with-lib32, as otherwise it assumes it to be /usr/lib + * Explicitly set --with-lib64, as otherwise it assumes it to be /usr/lib64 + * Not autoconf/automake, so don't need config.sub/config.guess + + -- Rob Andrews Wed, 11 Apr 2007 19:14:03 +0100 + +nspluginwrapper (0.9.91.3-1) unstable; urgency=low + + * New upstream release + + -- Rob Andrews Mon, 5 Mar 2007 14:44:48 +0000 + +nspluginwrapper (0.9.91.2-1) unstable; urgency=low + + * Initial release (Closes: #410061) + + -- Rob Andrews Wed, 14 Feb 2007 00:12:53 +0000 + --- nspluginwrapper-1.3.0.orig/debian/nspluginwrapper.1 +++ nspluginwrapper-1.3.0/debian/nspluginwrapper.1 @@ -0,0 +1,64 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH NSPLUGINWRAPPER 1 "September 2, 2007" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +nspluginwrapper \- tool to manage nspluginwrapper-wrapped plugins +.SH SYNOPSIS +.B nspluginwrapper +.RI [ options ] +.SH DESCRIPTION +This manual page documents briefly the +.B nspluginwrapper +command. +.PP +\fBnspluginwrapper\fP is a compatibility layer to allow the usage of non-native +plugins in a web browser supporting the Netscape 4 plugin API (NPAPI). +.SH OPTIONS +A summary of options is included below. +.TP +.B \-h +Display help and exit +.TP +.B \-i \fInpPLUGIN.so\fP +Install wrapper for npPLUGIN.so into the mozilla plugins directory +.TP +.B \-r \fI/path/to/npwrapper.npPLUGIN.so\fP +Remove the wrapper for npPLUGIN.so +.TP +.B \-u \fInpPLUGIN.so\fP +Update the plugin wrapper for npPLUGIN.so +.TP +.B \-a +Set automatic mode for plugins discovery - overrides \-i and \-u to automatically determine plugins installed +.TP +.B \-s +Update the system mozilla plugin directory only when auto updating +.TP +.B \-l +List plugins currently installed +.TP +.B \-n +Do not create or remove any Debian browser-specific symlinks upon installation +or removal of plugin wrappers. +.TP +.B \-v +Show verbose messages +.SH AUTHOR +nspluginwrapper was written by Gwenole Beauchesne . +.PP +This manual page was written by Rob Andrews , +for the Debian project (but may be used by others). --- nspluginwrapper-1.3.0.orig/debian/postinst +++ nspluginwrapper-1.3.0/debian/postinst @@ -0,0 +1,39 @@ +#!/bin/sh +# postinst for nspluginwrapper + +set -e +. /usr/share/debconf/confmodule + +update_loaders() +{ + # update loaders automatically, be verbose + nspluginwrapper -v -n -s -a -u + if [ "$?" != "0" ]; then + echo "nspluginwrapper failed to update plugin stubs." >&2 + exit 1 + fi +} + +# main postinst processing +case "$1" in + configure) + db_get nspluginwrapper/auto_update + if [ "$RET" = "true" ]; then + update_loaders + else + echo "Not updating nspluginwrapper plugin loaders (dpkg-reconfigure nspluginwrapper to change this behaviour)" >&2 + fi + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# macro code for dh_installdeb + +#DEBHELPER# + +exit 0 --- nspluginwrapper-1.3.0.orig/debian/compat +++ nspluginwrapper-1.3.0/debian/compat @@ -0,0 +1 @@ +5 --- nspluginwrapper-1.3.0.orig/debian/config +++ nspluginwrapper-1.3.0/debian/config @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e +. /usr/share/debconf/confmodule + +# ask questions +db_input medium nspluginwrapper/auto_update || true +db_go || true --- nspluginwrapper-1.3.0.orig/debian/README.Debian +++ nspluginwrapper-1.3.0/debian/README.Debian @@ -0,0 +1,55 @@ +nspluginwrapper for Debian +-------------------------- + +nspluginwrapper is an RPC-based mechanism for running non-native plugins +built for the Netscape 4 plugin API (NPAPI) on architectures they were +not built for. For example, this allows you to use the Flash plugin for +the i386 architecture on an amd64 machine running a native 64-bit browser. + +It is known to work with Firefox, Iceweasel, Mozilla, Iceape and Konqueror. + +nspluginwrapper for Debian is built exclusively for the amd64 architecture +because the ia32-libs and ia32-libs-gtk packages are not available on other +architectures, and a gcc with target i386 is not available for ia64. Were +these available for, e.g. the PowerPC platform, it would be possible to +package nspluginwrapper for that platform. However, cross-compilers for the +i386 architecture would need to be made available, and this is highly +unlikely. + +Since Debian does not package any binary-only plugins, no automated +mechanism for automated nspluginwrapperisation is provided. Instead, +download the plugin and unpack it to a location where it will remain and +run: + + nspluginwrapper -i /path/to/npplugin.so + +To remove a plugin, run: + + nspluginwrapper -r ~/.mozilla/plugins/npwrapper.npplugin.so + +Alternately, install any plugins as normal into your .mozilla/plugins/ +directory and run: + + nspluginwrapper -a -u -v + +To automatically install any compatibility stubs without prompting. + +Flash 10 i386 on amd64 systems +------------------------------ + +Around 10th March 2009, it has been noted that recent versions of Flash 10 +for i386 are refusing to play videos. For those of you unwilling to migrate +to the alpha version of the amd64 plugin, there is a solution. + +After spending some time reading strace output and looking at the output of +`ldd', it seems that libflashplayer.so dynamically loads libcurl during +execution. Whilst it is not explicitly linked into the executable, it DOES +mean that failure to find it will cause the plugin not to function. + +To rectify this issue: + + apt-get install ia32-libs-libcurl3 + +On your system, and retry the page. Flash should play happily now. + + -- Rob Andrews Tue, 10 Mar 2009 22:03:31 +0000 --- nspluginwrapper-1.3.0.orig/debian/copyright +++ nspluginwrapper-1.3.0/debian/copyright @@ -0,0 +1,28 @@ +This package was debianized by Rob Andrews on +Wed, 14 Feb 2007 00:12:53 +0000. + +It was downloaded from http://gwenole.beauchesne.info/en/projects/nspluginwrapper + +Upstream Author: Gwenole Beauchesne + +Copyright: 2006 Gwenole Beauchesne + +License: + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + See /usr/share/common-licenses/GPL-2 on your debian system. + +The Debian packaging is (C) 2007, Rob Andrews and +is licensed under the GPL, see `/usr/share/common-licenses/GPL-2'. --- nspluginwrapper-1.3.0.orig/debian/nspluginplayer.1 +++ nspluginwrapper-1.3.0/debian/nspluginplayer.1 @@ -0,0 +1,65 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH NSPLUGINPLAYER 1 "August 27, 2008" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +nspluginplayer \- tool to play embedded web content +.SH SYNOPSIS +.B nspluginplayer +.RI [ option ]\ [ \-\-plugin ]\ [ name[=value] ] +.SH DESCRIPTION +This manual page documents briefly the +.B nspluginplayer +command. +.PP +\fBnspluginplayer\fP enables playing of embedded web content outside of the +web browser. +.SH USAGE +Common attributes include, which are used in place of +.RI [ name[=value] ] +parameter: +.TP +.B embed +use NP_EMBED mode +.TP +.B full +use NP_FULL mode (default) +.TP +.B src\=URI +location (URL) of the object to load +.TP +.B type\=MIME-TYPE +MIME type of the object +.TP +.B width\=WIDTH +width (in pixels) +.TP +.B height\=HEIGHT +height (in pixels) +.SH OPTIONS +A summary of options is included below. +.TP +.B \-v \-\-verbose +Enable verbose mode +.TP +.B \-f \-\-fullscreen +Start in fullscreen + +.SH AUTHOR +nspluginplayer was written by Gwenole Beauchesne . +.PP +This manual page was written by Sasa Bodiroza , +for the Ubuntu project (but may be used by others). --- nspluginwrapper-1.3.0.orig/debian/templates +++ nspluginwrapper-1.3.0/debian/templates @@ -0,0 +1,9 @@ +Template: nspluginwrapper/auto_update +Type: boolean +Default: true +Description: Automatically update plugin loaders? + Each successive update of nspluginwrapper may bring changes to the plugin loading code. Whilst these loaders are usually compatible with future versions of nspluginwrapper, you may find that plugins become unstable after an update unless the loader is updated. + . + Furthermore, updates to the loader code itself may bring better stability or functionality when updated. + . + It is advised to enable this feature. --- nspluginwrapper-1.3.0.orig/debian/patches/000_debian_make_symlinks.diff +++ nspluginwrapper-1.3.0/debian/patches/000_debian_make_symlinks.diff @@ -0,0 +1,177 @@ +Create the plugin wrapper in a global location and install a symlink into +the browser-specific plugin paths when installing globally. +Also removes the symlinks on uninstallation. + +Commandline option "-n" or "--nosymlink" doesn't perform any operations on +symlinks on installation and removal. + +This patch has been mostly rewritten as of nspluginwrapper 1.0.0 due to +changes in how npw-config.c works. + + -- Rob Andrews Sun, 03 Aug 2008 17:54:42 +0100 + +--- nspluginwrapper/src/npw-config.c.orig 2009-03-09 23:09:53.000000000 +0000 ++++ nspluginwrapper/src/npw-config.c 2009-03-09 23:13:48.000000000 +0000 +@@ -44,6 +44,14 @@ + static bool g_allow_native = false; + static const char NPW_CONFIG[] = "nspluginwrapper"; + ++/* On Debian systems, we install/remove symlinks from these paths. ++ * This information is used twice, so declare globally */ ++static bool g_dosymlink = true; ++static const char *debian_link_dirs[] = { ++ LIBDIR "/mozilla/plugins", ++ NULL, ++}; ++ + static void error(const char *format, ...) + { + va_list args; +@@ -161,7 +169,7 @@ + } + else if (access("/etc/debian_version", F_OK) == 0) { + static const char *debian_dirs[] = { +- "/usr/lib/mozilla/plugins", // XXX how unfortunate ++ LIBDIR "/nspluginwrapper/plugins", + }; + dirs = debian_dirs; + } +@@ -463,7 +471,7 @@ + static bool is_plugin_fd(int fd, NPW_PluginInfo *out_plugin_info) + { + Elf_hdr_base ehdr; +- ++ + if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr)) + return false; + +@@ -811,6 +819,51 @@ + if (g_verbose) + printf(" into %s\n", d_plugin_path); + ++ /* now perform the symlink creation (for debian systems) */ ++ char *system_plugin_path = get_system_mozilla_plugin_dir(); ++ if ((access("/etc/debian_version", F_OK) == 0) && (strcmp(plugin_dir, system_plugin_path) == 0) && (g_dosymlink == true)) ++ { ++ static const char *ldir = NULL; ++ const char **ldirs = NULL; ++ char *lname = NULL; ++ ++ if (g_verbose) ++ printf("System appears to be a Debian (or derivative) system, performing symlink creation.\n"); ++ ++ ldirs = debian_link_dirs; ++ ++ while ((ldir = *ldirs++) != NULL) ++ { ++ if (access(ldir, F_OK) == 0) ++ { ++ if (g_verbose) ++ printf("Creating symlink to plugin in %s: ", ldir); ++ ++ if ((lname = malloc(strlen(ldir) + strlen(NPW_WRAPPER_BASE) + strlen(plugin_base) + 3)) != NULL) ++ { ++ sprintf(lname, "%s/%s.%s", ldir, NPW_WRAPPER_BASE, plugin_base); ++ ++ if (symlink(d_plugin_path, lname) == 0) ++ { ++ if (g_verbose) ++ printf("done.\n"); ++ } ++ else ++ { ++ if (g_verbose) ++ printf("failed!\n"); ++ } ++ ++ free(lname); ++ } ++ else ++ if (g_verbose) ++ printf("*gulp* malloc() failed!\n"); ++ ++ } ++ } ++ } ++ + free(plugin_data); + return 0; + } +@@ -871,6 +924,48 @@ + if (unlink(plugin_path) < 0) + return 1; + ++ /* remove links to the plugin on debian systems */ ++ if ((access("/etc/debian_version", F_OK) == 0) && (g_dosymlink == true)) ++ { ++ static const char *ldir = NULL; ++ const char **ldirs = NULL; ++ char *lname = NULL; ++ char *plugin_base = strrchr(plugin_path, '/'); ++ char *lbuf = NULL; ++ ++ if (plugin_base == NULL) ++ return 1; ++ else ++ plugin_base++; ++ ++ ldirs = debian_link_dirs; ++ ++ while ((ldir = *ldirs++) != NULL) ++ { ++ if ((lname = malloc(strlen(ldir) + strlen(plugin_base) + 2)) == NULL) ++ return 1; ++ ++ sprintf(lname, "%s/%s", ldir, plugin_base); ++ lbuf = malloc(strlen(plugin_path) + 1); ++ ++ if (readlink(lname, lbuf, strlen(plugin_path)) > 0) ++ { ++ /* readlink doesn't null terminate */ ++ *(lbuf + strlen(plugin_path)) = 0; ++ ++ if (strcmp(lbuf, plugin_path) == 0) ++ { ++ unlink(lname); ++ if (g_verbose) ++ printf("Deleted symlink '%s' to this plugin.\n", lname); ++ } ++ } ++ ++ free(lname); ++ free(lbuf); ++ } ++ } ++ + return 0; + } + +@@ -1003,6 +1098,7 @@ + printf(" -a --auto flag: set automatic mode for plugins discovery\n"); + printf(" -n --native flag: allow native plugin(s) to be wrapped\n"); + printf(" -l --list list plugins currently installed\n"); ++ printf(" -n --nosymlinks do not create symlinks to the installed plugin\n"); + printf(" -u --update update plugin(s) currently installed\n"); + printf(" -i --install [FILE(S)] install plugin(s)\n"); + printf(" -r --remove [FILE(S)] remove plugin(s)\n"); +@@ -1122,6 +1218,12 @@ + return 0; + } + ++static int process_nolink(int argc, char *argv[]) ++{ ++ g_dosymlink = false; ++ return 0; ++} ++ + int main(int argc, char *argv[]) + { + char **args; +@@ -1152,6 +1254,7 @@ + { 'a', "auto", process_auto, 0 }, + { 'n', "native", process_native, 0 }, + { 'l', "list", process_list, 1 }, ++ { 'n', "nosymlinks", process_nolink, 0 }, + { 'u', "update", process_update, 1 }, + { 'i', "install", process_install, 1 }, + { 'r', "remove", process_remove, 1 }, --- nspluginwrapper-1.3.0.orig/debian/patches/series +++ nspluginwrapper-1.3.0/debian/patches/series @@ -0,0 +1,5 @@ +000_debian_make_symlinks.diff +001_remove_bashisms.diff +002_install_to_NSPLUGINDIR.diff +003_update_help_info.diff +004_system_only_update.diff --- nspluginwrapper-1.3.0.orig/debian/patches/001_remove_bashisms.diff +++ nspluginwrapper-1.3.0/debian/patches/001_remove_bashisms.diff @@ -0,0 +1,26 @@ +Anti-bashism patch inherited from Ubuntu. +Author: Anders Kaseorg + + -- Rob Andrews Thu, 28 Jun 2007 18:08:54 +0100 + +--- nspluginwrapper-0.9.91.4.orig/utils/mkruntime.sh ++++ nspluginwrapper-0.9.91.4/utils/mkruntime.sh +@@ -12,15 +12,15 @@ + # - Check acroread5, something is missing while loading a PDF + # - Enough for Flash Player & PluginSDK npsimple.so + +-function error() { ++error() { + echo ${1+"$@"} > /dev/stderr + } + +-function status() { ++status() { + echo ${1+"$@"} > /dev/stderr + } + +-function run() { ++run() { + status " " ${1+"$@"} + ${1+"$@"} + } --- nspluginwrapper-1.3.0.orig/debian/patches/002_install_to_NSPLUGINDIR.diff +++ nspluginwrapper-1.3.0/debian/patches/002_install_to_NSPLUGINDIR.diff @@ -0,0 +1,20 @@ +Allow plugins to be installed to a directory specified by environment +variable NSPLUGIN_DIR. + +Patch from Alexander Sack. + + -- Rob Andrews Sat, 14 Jul 2007 18:45:00 +0100 + +--- nspluginwrapper-0.9.91.4.orig/src/npw-config.c 2007-07-06 08:48:43 +0000 ++++ nspluginwrapper-0.9.91.4/src/npw-config.c 2007-07-06 10:15:01 +0000 +@@ -113,6 +113,10 @@ + static const char default_dir[] = LIBDIR "/mozilla/plugins"; + static const char *dir = NULL; + ++ char *plugin_dir = getenv("NSPLUGIN_DIR"); ++ if(plugin_dir) ++ return plugin_dir; ++ + if (dir == NULL) { + const char **dirs = NULL; + --- nspluginwrapper-1.3.0.orig/debian/patches/003_update_help_info.diff +++ nspluginwrapper-1.3.0/debian/patches/003_update_help_info.diff @@ -0,0 +1,15 @@ +Fix the abstract for the '-u' option. + + -- Rob Andrews Sun, 02 Sep 2007 11:58:27 +0100 + +--- nspluginwrapper/src/npw-config.c.orig 2007-09-02 11:32:32.000000000 +0100 ++++ nspluginwrapper/src/npw-config.c 2007-09-02 11:32:50.000000000 +0100 +@@ -921,7 +921,7 @@ + printf(" -a --auto flag: set automatic mode for plugins discovery\n"); + printf(" -l --list list plugins currently installed\n"); + printf(" -n --nosymlinks do not create symlinks to the installed plugin\n"); +- printf(" -u --update update plugin(s) currently installed\n"); ++ printf(" -u --update [FILE(S)] update plugin(s) currently installed\n"); + printf(" -i --install [FILE(S)] install plugin(s)\n"); + printf(" -r --remove [FILE(S)] remove plugin(s)\n"); + printf("\n"); --- nspluginwrapper-1.3.0.orig/debian/patches/004_system_only_update.diff +++ nspluginwrapper-1.3.0/debian/patches/004_system_only_update.diff @@ -0,0 +1,61 @@ +Force npconfig to only update system mozilla plugin dir if requested. + + -- Rob Andrews Mon, 09 Mar 2009 22:59:45 +0000 + +--- nspluginwrapper/src/npw-config.c.orig 2009-03-09 22:55:18.000000000 +0000 ++++ nspluginwrapper/src/npw-config.c 2009-03-09 22:59:48.000000000 +0000 +@@ -42,6 +42,7 @@ + static bool g_auto = false; + static bool g_verbose = false; + static bool g_allow_native = false; ++static bool g_systemonly = false; + static const char NPW_CONFIG[] = "nspluginwrapper"; + + static void error(const char *format, ...) +@@ -1001,6 +1002,7 @@ + printf(" -h --help print this message\n"); + printf(" -v --verbose flag: set verbose mode\n"); + printf(" -a --auto flag: set automatic mode for plugins discovery\n"); ++ printf(" -s --systemonly when auto updating, only process the system plugin directory\n"); + printf(" -n --native flag: allow native plugin(s) to be wrapped\n"); + printf(" -l --list list plugins currently installed\n"); + printf(" -u --update update plugin(s) currently installed\n"); +@@ -1053,9 +1055,16 @@ + { + int i; + +- if (g_auto) ++ if (g_auto && !g_systemonly) + return auto_update_plugins(); + ++ if (g_auto && g_systemonly) ++ { ++ if (g_verbose) ++ printf("Auto-updating system plugin path.\n"); ++ return process_plugin_dir(get_system_mozilla_plugin_dir(), (is_plugin_cb)is_wrapper_plugin_0, (process_plugin_cb)update_plugin); ++ } ++ + if (argc < 1) + error("expected plugin(s) file name to update"); + +@@ -1122,6 +1131,12 @@ + return 0; + } + ++static int process_system_only(int argc, char *argv[]) ++{ ++ g_systemonly = true; ++ return 0; ++} ++ + int main(int argc, char *argv[]) + { + char **args; +@@ -1150,6 +1165,7 @@ + { 'h', "help", process_help, 1 }, + { 'v', "verbose", process_verbose, 0 }, + { 'a', "auto", process_auto, 0 }, ++ { 's', "systemonly", process_system_only, 0 }, + { 'n', "native", process_native, 0 }, + { 'l', "list", process_list, 1 }, + { 'u', "update", process_update, 1 },