From cc47a7769f9238728cd95c1569d903697137a33b Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Fri, 21 Mar 2008 23:29:07 +0000 Subject: Add simple document with UNIX packaging suggestions svn path=/trunk/netsurf/; revision=4027 --- Docs/PACKAGING-GTK | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Docs/PACKAGING-GTK (limited to 'Docs') diff --git a/Docs/PACKAGING-GTK b/Docs/PACKAGING-GTK new file mode 100644 index 000000000..f82030a2a --- /dev/null +++ b/Docs/PACKAGING-GTK @@ -0,0 +1,55 @@ +-------------------------------------------------------------------------------- + Packaging suggestions for NetSurf 21 March 2008 +-------------------------------------------------------------------------------- + + This document lays out some suggestions for people interested in packaging + NetSurf for UNIX-like OSes. + + We consider the Debian (and thus Ubuntu) packages excellent examples to + crib from. It does everything right. + + The GTK port of NetSurf requires access to some resources at run time. + These are stored in gtk/res/ in the source tree. Some of these files are + symlinks into the !NetSurf directory, which is the application container + for the native RISC OS build. None of the other files from the !NetSurf + directory are required - the symlinks are used only as a way of making + checkouts smaller and making sure changes to one set of resources updates + the other. + + The binary that the build system produces is called "nsgtk". There is also + a shell script called "netsurf" that will set up the environment and launch + the nsgtk binary. Do not ship this shell script with your package. It is + included only as a convience for launching NetSurf from the build tree. + Instead, you should move nsgtk to /usr/bin/netsurf (or wherever your + distribution's packaging policy suggests) and copy the contents of + gtk/res/ (dereferencing the symlinks, obviously) to /usr/share/netsurf (or + wherever your packaging policy suggests). + + You will need to tell NetSurf where to find its resources. NetSurf searches + three locations by default when trying to load them, in this order: + + 1. ~/.netsurf/ + 2. $NETSURFRES/ + 3. /usr/share/netsurf/ + + The second one is how the netsurf launcher script controls it. The third + location is controlled by #define RESPATH in gtk/gtk_gui.c, and this is + the recommended way for packagers to change the location it searches, + as this still allows the user some flexibility in changing what NetSurf + uses. + + You may also want to change NetSurf's user agent string to include the + name of your distribution. The user agent string is build by a function + kept in utils/useragent.c - you'll want to change the macro called + NETSURF_UA_FORMAT_STRING. It's processed via sprintf, so keep that in + mind when changing it. The first two printf parameters are major and minor + version numbers, the second two are OS name (uname -s) and architecure + (uname -m). You might want change this to something like: + "NetSurf/%d.%d (%s; %s; Debian GNU/Linux)" + or similar. Please don't be tempted to mention Mozilla or similar - let's + let that lie die. + + If you make significant changes to NetSurf in your package, please ask your + users to report bugs to your but tracker, not ours. We'd also be interested + in seeing the diffs for these changes - we may be able to integrate them + to make your job easier in future. -- cgit v1.2.3