2008-03-22 02:29:07 +03:00
|
|
|
--------------------------------------------------------------------------------
|
2008-07-30 16:02:10 +04:00
|
|
|
Packaging suggestions for NetSurf 30 July 2008
|
2008-03-22 02:29:07 +03:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
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
|
2008-03-22 02:47:23 +03:00
|
|
|
crib from. They do everything right.
|
|
|
|
|
|
|
|
|
2008-07-26 22:26:35 +04:00
|
|
|
Building NetSurf
|
|
|
|
==================
|
|
|
|
|
|
|
|
You should change Makefile.config to be specific (rather than rely on AUTO)
|
|
|
|
for the libraries and functionality you want to include. This will help
|
|
|
|
your packages be consistent. Also remember that you can turn off
|
|
|
|
functionality such as PDF export, RISC OS Sprite support, SVG rendering etc.
|
|
|
|
from here should you require a smaller, lighter build.
|
|
|
|
|
2008-07-30 16:02:10 +04:00
|
|
|
|
2008-03-22 02:47:23 +03:00
|
|
|
Launching NetSurf
|
|
|
|
===================
|
2008-03-22 02:29:07 +03:00
|
|
|
|
|
|
|
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
|
2018-04-22 13:15:23 +03:00
|
|
|
symlinks into the top level resources directory. Not all of the files in the
|
2008-03-22 02:29:07 +03:00
|
|
|
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.
|
|
|
|
|
2020-03-10 17:45:23 +03:00
|
|
|
The binary that the build system produces is called "nsgtk3".
|
|
|
|
You should install nsgtk3 to `/usr/bin/netsurf` (or wherever your
|
2008-03-22 02:29:07 +03:00
|
|
|
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).
|
|
|
|
|
2016-10-05 21:44:49 +03:00
|
|
|
You will need to tell NetSurf where to find its run time loaded
|
|
|
|
resources. NetSurf searches three locations by default when trying
|
|
|
|
to load them, in this order:
|
2008-03-22 02:29:07 +03:00
|
|
|
|
|
|
|
1. ~/.netsurf/
|
2016-10-05 21:44:49 +03:00
|
|
|
|
|
|
|
This entry allows the user some flexibility in changing what
|
|
|
|
resources NetSurf uses by placing resources in their home
|
|
|
|
directory.
|
|
|
|
|
2008-03-22 02:29:07 +03:00
|
|
|
2. $NETSURFRES/
|
|
|
|
|
2016-10-05 21:44:49 +03:00
|
|
|
This entry allows the user or packager to control resource
|
|
|
|
aquisition through the environment. This entry is how the
|
|
|
|
developer launcher script controls resource location.
|
|
|
|
|
|
|
|
3. NETSURF_GTK_RES_PATH option
|
2008-03-22 02:29:07 +03:00
|
|
|
|
2016-10-05 21:44:49 +03:00
|
|
|
This location is controlled by the option in Makefile.config
|
|
|
|
(defaulting to ${PREFIX}/share/netsurf/ ). This configuration
|
|
|
|
is the recommended way for packagers to change the location
|
|
|
|
NetSurf finds external resources. The first path element of the
|
|
|
|
NETSURF_GTK_RES_PATH option is used in the install target as
|
|
|
|
the destination for installed resources.
|
2008-03-22 02:47:23 +03:00
|
|
|
|
|
|
|
User agent string
|
|
|
|
===================
|
|
|
|
|
2008-03-22 02:29:07 +03:00
|
|
|
You may also want to change NetSurf's user agent string to include the
|
2022-05-21 18:30:25 +03:00
|
|
|
name of your distribution. The user agent string is built by a function
|
2008-03-22 02:29:07 +03:00
|
|
|
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
|
2022-05-21 18:30:25 +03:00
|
|
|
mind when changing it. The first format parameter is the OS name (uname -s)
|
|
|
|
and the remainder are major and minor version numbers. You might want
|
|
|
|
to change this to something like:
|
2008-03-22 02:47:23 +03:00
|
|
|
|
2022-05-21 18:30:25 +03:00
|
|
|
"Mozilla/5.0 (%s; Debian GNU/Linux) NetSurf/%d.%d"
|
2008-03-22 02:47:23 +03:00
|
|
|
|
2022-05-21 18:30:25 +03:00
|
|
|
or similar.
|
2008-03-22 02:29:07 +03:00
|
|
|
|
2022-05-21 18:30:25 +03:00
|
|
|
Note that the "Mozilla/5.0" prefix is a requirement to enable modern
|
|
|
|
web standards on many websites. It should not be removed or modified.
|
2008-03-22 02:47:23 +03:00
|
|
|
|
|
|
|
Home page URL
|
|
|
|
===============
|
|
|
|
|
|
|
|
If the user hasn't specified a home page URL in their Preferences, NetSurf
|
2012-07-21 16:13:57 +04:00
|
|
|
defaults to a "portal" welcome page at about:netsurf - if you wish to
|
|
|
|
change this, you can do so by overriding the NETSURF_HOMEPAGE URL in
|
2008-07-30 16:02:10 +04:00
|
|
|
Makefile.config.
|
2008-03-22 02:36:00 +03:00
|
|
|
|
2008-03-22 02:47:23 +03:00
|
|
|
|
2008-03-22 02:29:07 +03:00
|
|
|
If you make significant changes to NetSurf in your package, please ask your
|
2008-03-22 02:36:00 +03:00
|
|
|
users to report bugs to your bug tracker, not ours. We'd also be interested
|
2008-03-22 02:29:07 +03:00
|
|
|
in seeing the diffs for these changes - we may be able to integrate them
|
|
|
|
to make your job easier in future.
|
2008-07-29 01:02:20 +04:00
|
|
|
|