Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.547 diff -u -2 -0 -r1.547 ChangeLog --- xc/ChangeLog 25 Nov 2004 22:42:51 -0000 1.547 +++ xc/ChangeLog 26 Nov 2004 03:22:16 -0000 @@ -1,21 +1,60 @@ 2004-11-25 Roland Mainz + * xc/Imakefile + * xc/config/cf/host.def + * xc/config/cf/xprint_host.def + * xc/doc/Imakefile + * xc/doc/hardcopy/Imakefile + * xc/fonts/Imakefile + * xc/lib/Imakefile + * xc/packager/Imakefile + * xc/packager/mozilla_xpi/Imakefile + * xc/packager/mozilla_xpi/K98xprint_xpi.sh + * xc/packager/mozilla_xpi/S98xprint_xpi.sh + * xc/packager/mozilla_xpi/install.js + * xc/packager/mozilla_xpi/make_mozilla_xpi.sh + * xc/packager/rpm/Imakefile + * xc/packager/rpm/xprint.spec + * xc/packager/rpm/xprint_rpmpackage.patch + * xc/packager/solaris/Imakefile + * xc/packager/solaris/GISWxprint/Imakefile + * xc/packager/solaris/GISWxprint/README + * xc/packager/solaris/GISWxprint/depend + * xc/packager/solaris/GISWxprint/pkginfo + * xc/packager/solaris/GISWxprint/postinstall + * xc/packager/solaris/GISWxprint/preinstall + * xc/packager/solaris/GISWxprintglue/Imakefile + * xc/packager/solaris/GISWxprintglue/README + * xc/packager/solaris/GISWxprintglue/depend + * xc/packager/solaris/GISWxprintglue/make_solaris_pkg.sh + * xc/packager/solaris/GISWxprintglue/pkginfo + * xc/packager/solaris/GISWxprintglue/postinstall + * xc/packager/solaris/GISWxprintglue/preinstall + * xc/packager/tarball/Imakefile + * xc/packager/tarball/README_tarball + * xc/packager/tarball/make_xprint_binary_tarball.sh + * xc/packager/tarball/startxprint.sh + * xc/programs/Imakefile + Bugzilla #1923 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1923): + Testing standalone package system for Xprint server. + +2004-11-25 Roland Mainz * xc/programs/Xserver/Xprint/Imakefile * xc/programs/Xserver/Xprint/Xprt.html * xc/programs/Xserver/Xprint/Xprt.man * xc/programs/Xserver/Xprint/Xprt.sgml Bugzilla #811 (https://freedesktop.org/bugzilla/show_bug.cgi?id=811): Add missing manual page for "Xprt" (DocBook master file (Xprt.sgml) and the generated files (Xprt.html, Xprt.man). 2004-11-25 Roland Mainz * xc/config/cf/xprint_host.def * xc/config/cf/xprint_site.def Bugzilla #1921 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1921): Rename "xc/config/cf/xprint_site.def" to "xc/config/cf/xprint_host.def" to clarify it's purpose. 2004-11-25 Matthieu Herrb * extras/Xpm/lib/Attrib.c: * extras/Xpm/lib/CrBufFrI.c: * extras/Xpm/lib/CrDatFrI.c: Index: xc/Imakefile =================================================================== RCS file: /cvs/xorg/xc/Imakefile,v retrieving revision 1.4 diff -u -2 -0 -r1.4 Imakefile --- xc/Imakefile 15 Nov 2004 15:06:43 -0000 1.4 +++ xc/Imakefile 26 Nov 2004 03:22:16 -0000 @@ -10,41 +10,41 @@ RELEASE = XOrgReleaseString #ifndef OSName #define OSName Unknown Operating System! #endif #if !BuildServersOnly #if BuildFonts FONTSDIR = fonts #endif #ifndef Win32Architecture #if BuildDocs DOCSDIR = doc #endif NLSSUBDIR = nls #endif #endif SUBDIRS = include config lib $(NLSSUBDIR) \ - programs $(FONTSDIR) $(DOCSDIR) + programs $(FONTSDIR) $(DOCSDIR) packager LNINSTALLDIRS = lib #if HasParallelMake #ifdef ParallelDefines TOPPARALLELMFLAGS = TopParallelDefines #endif #endif MakeSubdirs($(SUBDIRS)) MakeLintSubdirs($(LNINSTALLDIRS),install.ln,install.ln) MakeLintSubdirs($(LNINSTALLDIRS),external.ln,lintlib) DependSubdirs($(SUBDIRS)) #define IHaveSpecialMakefileTarget #if !defined(Win32Architecture) || defined(mingwArchitecture) VerifyOS:: Index: xc/config/cf/host.def =================================================================== RCS file: xc/config/cf/host.def diff -N xc/config/cf/host.def --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/config/cf/host.def 26 Nov 2004 03:22:16 -0000 @@ -0,0 +1,4 @@ + +/* lame hack, in theory the build script should symlink the file :-) */ +#include "xprint_host.def" + Index: xc/config/cf/xprint_host.def =================================================================== RCS file: /cvs/xorg/xc/config/cf/xprint_host.def,v retrieving revision 1.1 diff -u -2 -0 -r1.1 xprint_host.def --- xc/config/cf/xprint_host.def 25 Nov 2004 21:46:11 -0000 1.1 +++ xc/config/cf/xprint_host.def 26 Nov 2004 03:22:16 -0000 @@ -139,41 +139,41 @@ #define BuildFontCache NO #define BuildRender NO #define BuildRenderLibrary NO #define BuildRandRLibrary NO #define BuildXcursorLibrary NO #define BuildXcursorgen NO #define SharedLibFontEnc NO #define SharedLibFont NO #define XserverStaticFontLib YES /* Build only Xprint applications */ #ifndef BuildXprintAppsOnly #define BuildXprintAppsOnly YES #endif /* BuildXprintAppsOnly */ /* Set our own XVendorString/XVendorRelease * (and to avoid that xorg.cf sets it's own stuff here) */ #define XVendorString "xprint.mozdev.org" #define XVendorRelease 100000 -#define UseHackLinkAgainstInstalledX11Libs NO +#define UseHackLinkAgainstInstalledX11Libs YES #if UseHackLinkAgainstInstalledX11Libs /* "Hack" to reuse an already installed X11 distribution when linking our * programs (this assumes that the installed X version is at least X11R6.4) */ # ifndef IBMArchitecture # define LdPreLib -L$(USRLIBDIR) -R$(USRLIBDIR) -L$(BUILDLIBDIR) # endif /* !IBMArchitecture */ #endif /* UseHackLinkAgainstInstalledX11Libs */ XCOMM #### Sun/Solaris-specifc stuff ... #### #if defined(SunArchitecture) && (OSMajorVersion > 4) #undef XsunServer #define XsunServer NO XCOMM X11R6.7's sun.cf does not set ProjectRoot to /usr/openwin anymore - why ? #define ProjectRoot /usr/openwin #define ServerConfigDir /usr/openwin/server/etc XCOMM Some build hacks for the GISWxprintglue package #if BuildGISWxprintglue # define ProjectRoot /usr/openwin @@ -256,41 +256,43 @@ #define InstallXF86EncodingFiles NO XCOMM #### NetBSD-specifc stuff ... #### #elif defined(NetBSDArchitecture) #define ProjectRoot /usr/X11R6 #define XPrintDir /etc/X11/xserver #undef XF86SVGAServer #define XF86SVGAServer NO #define HasVarDirectory NO #define HasMotif2 YES #define HasGhostScript YES #define InstallXF86EncodingFiles NO XCOMM #### Linux-specifc stuff ... #### #elif defined(LinuxArchitecture) #define ProjectRoot /usr/X11R6 #define XPrintDir /etc/X11/xserver #undef XF86SVGAServer #define XF86SVGAServer NO #define HasVarDirectory NO +#if 0 #define HasMotif2 YES +#endif #define HasGhostScript YES #define InstallXF86EncodingFiles NO /* Debian Xprint package puts the Xprt config files elsewhere */ #if (LinuxDistribution == LinuxDebian) # define XPrintDir /usr/share/Xprint/xserver #endif #endif /* Do not strip binaries to ensure usefull stacktraces in bug reports * (http://xprint.mozdev.org/bugs/show_bug.cgi?id=2264) */ #define StripInstalledPrograms NO /* Does the X11 installation have the Xfree86 encoding files ? */ #ifndef InstallXF86EncodingFiles #define InstallXF86EncodingFiles YES #endif /* InstallXF86EncodingFiles */ INSTALLXF86ENCODINGFILES = InstallXF86EncodingFiles Index: xc/doc/Imakefile =================================================================== RCS file: /cvs/xorg/xc/doc/Imakefile,v retrieving revision 1.2 diff -u -2 -0 -r1.2 Imakefile --- xc/doc/Imakefile 23 Apr 2004 18:42:01 -0000 1.2 +++ xc/doc/Imakefile 26 Nov 2004 03:22:16 -0000 @@ -3,26 +3,30 @@ XCOMM $XFree86: xc/doc/Imakefile,v 1.3 2000/12/14 18:23:09 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags #if BuildMiscDocs MISCDIR = misc #endif #if BuildSpecsDocs SPECSDIR = specs #endif #if InstallHardcopyDocs HARDCOPYDIR = hardcopy #endif +#if 0 SUBDIRS = man $(MISCDIR) $(SPECSDIR) $(HARDCOPYDIR) +#else +SUBDIRS = $(HARDCOPYDIR) +#endif all:: MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) Index: xc/doc/hardcopy/Imakefile =================================================================== RCS file: /cvs/xorg/xc/doc/hardcopy/Imakefile,v retrieving revision 1.3 diff -u -2 -0 -r1.3 Imakefile --- xc/doc/hardcopy/Imakefile 19 Jul 2004 21:07:32 -0000 1.3 +++ xc/doc/hardcopy/Imakefile 26 Nov 2004 03:22:16 -0000 @@ -1,15 +1,19 @@ XCOMM $XFree86: xc/doc/specs/Imakefile,v 1.3 2000/03/02 17:52:57 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags +#if 0 #if defined(HardcopyDocDirs) && !BuildAllHardcopyDocs SUBDIRS = HardcopyDocDirs #else SUBDIRS = RX XKB XPRINT #endif /* defined(HardcopyDocDirs) && !BuildAllHardcopyDocs */ +#else +SUBDIRS = XPRINT +#endif all:: MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) Index: xc/fonts/Imakefile =================================================================== RCS file: /cvs/xorg/xc/fonts/Imakefile,v retrieving revision 1.2 diff -u -2 -0 -r1.2 Imakefile --- xc/fonts/Imakefile 23 Apr 2004 18:43:00 -0000 1.2 +++ xc/fonts/Imakefile 26 Nov 2004 03:22:19 -0000 @@ -1,27 +1,31 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:42:52 cpqbld Exp $ XCOMM $XFree86: xc/fonts/Imakefile,v 3.10 2003/08/22 02:50:11 dawes Exp $ #define IHaveSubdirs #define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" #if BuildSpeedoFonts || BuildType1Fonts || BuildCIDFonts || BuildTrueTypeFonts SCALEDDIR = scaled #endif ENCODINGDIR = encodings FONTDIRS = bdf $(SCALEDDIR) +#if 0 SUBDIRS = $(ENCODINGDIR) util bdf $(SCALEDDIR) +#else +SUBDIRS = $(ENCODINGDIR) util +#endif #if MakeLocalFontDir MakeDirectories(install,$(FONTDIR)/local) if [ ! -f $(DESTDIR)$(FONTDIR)/local/fonts.dir ]; then \ echo "0" > $(DESTDIR)$(FONTDIR)/local/fonts.dir; fi #endif MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) Index: xc/lib/Imakefile =================================================================== RCS file: /cvs/xorg/xc/lib/Imakefile,v retrieving revision 1.11 diff -u -2 -0 -r1.11 Imakefile --- xc/lib/Imakefile 29 Sep 2004 12:40:28 -0000 1.11 +++ xc/lib/Imakefile 26 Nov 2004 03:22:20 -0000 @@ -205,44 +205,48 @@ #if BuildX11Lib X11LIBDIR = X11 #endif #if BuildXextLib XEXTLIBDIR = Xext #endif #if BuildLibraries OLDXLIBDIR = oldX ICELIBDIR = ICE SMLIBDIR = SM XTLIBDIR = Xt XMULIBDIR = Xmu XMUULIBDIR = Xmuu XPMLIBDIR = Xpm XTSTLIBDIR = Xtst FSLIBDIR = FS #endif - +#if 0 LINTSUBDIRS = $(XAULIBDIR) $(XDMCPLIBDIR) $(X11LIBDIR) \ $(OLDXLIBDIR) $(ICELIBDIR) $(SMLIBDIR) $(XEXTLIBDIR) $(XTLIBDIR) \ $(SSLIBDIR) $(XF86MISCLIBDIR) $(XF86VMLIBDIR) $(XF86DGALIBDIR) \ $(XF86RUSHLIBDIR) $(XMULIBDIR) $(XMUULIBDIR) $(XPMLIBDIR) \ $(XPRINTLIBDIRS) $(XAW6LIBDIR) $(XAW7LIBDIR) $(XAWLIBDIR) \ $(XINPUTLIBDIR) $(XTSTLIBDIR) $(FSLIBDIR) $(XKBLIBDIR) \ $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) $(EXPATBUILDDIR) \ $(XVLIBDIR) $(GLXLIBDIR) $(GLULIBDIR) $(GLWLIBDIR) \ $(DPSLIBDIR) $(PSRESLIBDIR) $(DPSTKLIBDIR) $(XINERAMADIR) \ $(ZLIBDIR) $(REGEXDIR) $(RENDERLIBDIR) $(FREETYPE2BUILDDIR) \ $(FONTCONFIGBUILDDIR) $(XFT1LIBDIR) \ $(XFTLIBDIR) $(XVMCLIBDIR) $(RANDRLIBDIR) $(XTRAPLIBDIR) \ $(XRESLIBDIR) $(XCURSORLIBDIR) $(APPLELIBDIR) $(DMXLIBDIR) \ $(WINDOWSLIBDIR) $(XEVIELIBDIR) $(XFIXESLIBDIR) $(DAMAGELIBDIR) $(COMPOSITELIBDIR) +#else +LINTSUBDIRS = $(XAULIBDIR) $(XDMCPLIBDIR) \ + $(XPRINTLIBDIRS) $(LBXUTILDIR) \ + $(ZLIBDIR) $(REGEXDIR) $(FREETYPE2BUILDDIR) +#endif -SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTENCSUBDIR) \ - $(FONTCACHELIBDIR) +SUBDIRS = $(BERKDIR) xtrans $(LINTSUBDIRS) $(FONTSUBDIR) $(FONTENCSUBDIR) MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) MakeLintLibSubdirs($(LINTSUBDIRS)) MakeLintSubdirs($(LINTSUBDIRS),install.ln,install.ln) Index: xc/packager/Imakefile =================================================================== RCS file: xc/packager/Imakefile diff -N xc/packager/Imakefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/Imakefile 26 Nov 2004 03:22:21 -0000 @@ -0,0 +1,16 @@ +XCOMM $Xorg: Imakefile,v 1.2 2003/01/20 15:05:12 gisburn Exp $ +#define IHaveSubdirs +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" + +# Compatibility for 007 and early 008 releases +make_xprint_tarball:: + cd tarball ; make make_xprint_tarball + +SUBDIRS = \ + tarball \ + rpm \ + solaris \ + mozilla_xpi + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) Index: xc/packager/mozilla_xpi/Imakefile =================================================================== RCS file: xc/packager/mozilla_xpi/Imakefile diff -N xc/packager/mozilla_xpi/Imakefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/mozilla_xpi/Imakefile 26 Nov 2004 03:22:21 -0000 @@ -0,0 +1,11 @@ +XCOMM $Xorg: Imakefile,v 1.1 2003/01/20 19:54:53 gisburn Exp $ + +#if BuildMozillaXprintXPIPackage +make_mozilla_xpi:: + XPRINTDIR=$(XPRINTDIR) XBINDIR=$(BINDIR) XTOP=$(TOP) ; \ + export XPRINTDIR XBINDIR XTOP ; \ + /bin/ksh -e ./make_mozilla_xpi.sh + +clean:: + $(RM) mozilla_xprint_xpi.xpi +#endif /* BuildMozillaXprintXPIPackage */ Index: xc/packager/mozilla_xpi/K98xprint_xpi.sh =================================================================== RCS file: xc/packager/mozilla_xpi/K98xprint_xpi.sh diff -N xc/packager/mozilla_xpi/K98xprint_xpi.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/mozilla_xpi/K98xprint_xpi.sh 26 Nov 2004 03:22:21 -0000 @@ -0,0 +1,22 @@ +echo "# Stopping Xprint server" + +if [ -z "${MOZ_USER_DIR}" ] ; then + echo "Internal error: MOZ_USER_DIR not set." + exit 1 +fi + +# Make sure we pick the right binary - users may share one profile +# between different architectures +uname_os="`uname -s`" +uname_cpu="`uname -p 2>/dev/null`" # uname -p may fail on old Debian +if [ "${uname_cpu}" = "unknown" -o "${uname_cpu}" = "" ] ; then + uname_cpu="`uname -m`" +fi + +MOZXPSTARTSCRIPT="${HOME}/${MOZ_USER_DIR}/xprint_xpi/${uname_os}_${uname_cpu}/run_xprint_from_tarball.sh" + +if [ -f "${MOZXPSTARTSCRIPT}" ] ; then + /bin/sh "${MOZXPSTARTSCRIPT}" stop +fi + +echo "# Done." Index: xc/packager/mozilla_xpi/S98xprint_xpi.sh =================================================================== RCS file: xc/packager/mozilla_xpi/S98xprint_xpi.sh diff -N xc/packager/mozilla_xpi/S98xprint_xpi.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/mozilla_xpi/S98xprint_xpi.sh 26 Nov 2004 03:22:21 -0000 @@ -0,0 +1,39 @@ +echo "# Starting Xprint server" + +if [ -z "${MOZ_USER_DIR}" ] ; then + echo "Internal error: MOZ_USER_DIR not set." + moz_startstop_addon_scripts stop + exit 1 +fi + +# Make sure we pick the right binary - users may share one profile +# between different architectures +uname_os="`uname -s`" +uname_cpu="`uname -p 2>/dev/null`" # uname -p may fail on old Debian +if [ "${uname_cpu}" = "unknown" -o "${uname_cpu}" = "" ] ; then + uname_cpu="`uname -m`" +fi + +MOZXPSTARTSCRIPT="${HOME}/${MOZ_USER_DIR}/xprint_xpi/${uname_os}_${uname_cpu}/run_xprint_from_tarball.sh" + +if [ -f "${MOZXPSTARTSCRIPT}" ] ; then + echo "# Starting Xprint server" + /bin/sh "${MOZXPSTARTSCRIPT}" start + + echo "# Populating XPSERVERLIST" + + XPSERVERLIST="`/bin/sh "${MOZXPSTARTSCRIPT}" get_xpserverlist`" + export XPSERVERLIST + + echo "XPSERVERLIST=${XPSERVERLIST}" + + if [ -z "${XPSERVERLIST}" ] ; then + echo "Fatal error: XPSERVERLIST empty." + moz_startstop_addon_scripts stop + exit 1 + fi +else + echo "# Warning: No Xprint XPI start script found for \"${uname_os}_${uname_cpu}\"." +fi + +echo "# Done." Index: xc/packager/mozilla_xpi/install.js =================================================================== RCS file: xc/packager/mozilla_xpi/install.js diff -N xc/packager/mozilla_xpi/install.js --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/mozilla_xpi/install.js 26 Nov 2004 03:22:21 -0000 @@ -0,0 +1,151 @@ +// Install script for Xprint XPI + +var err; + +var regname="xprint"; +var version="20040214"; + +err = initInstall("XprintXPI v0.0.2", // name for install UI + regname, // registered name + version); // package version + +logComment("initInstall: " + err); + +logComment("# Main start."); +doXpXPIInstall(); +logComment("# Main done."); + +function doXpXPIInstall() +{ + var srDest = 16384; // Disk space required for installation (KB) + + var fProgram = getFolder("Program"); + var fComponents = getFolder("Components"); + var userProfileBaseDir = getUserProfileBaseDir(); + + logComment("# fProgram: '" + fProgram + "'."); + logComment("# fComponents: '" + fComponents + "'."); + logComment("# userProfileBaseDir: '" + userProfileBaseDir + "'."); + + /* Test whether Xprint's client side module was compiled-in (this is the + * default for Mozilla builds, but Red Hat has turned it off... ;-( ) */ + var libgfxxprintPath = getFolder(fComponents, "libgfxxprint.so"); + logComment("# Checking whether '" + libgfxxprintPath + "' exists."); + if (!File.exists(libgfxxprintPath)) { + logComment("# libgfxxprint.so missing"); + alert("It seems that your version of Mozilla was build with --disable-xprint\n" + + "which means the Xprint client support was EXPLICITLY TURNED OFF at build time.\n" + + "Please contact the creator of the Mozilla package to provide a build where this flag was not set."); + cancelInstall(ACCESS_DENIED); + return; + } + + /* Test whether we're running mozilla or something else */ + logComment("# Checking application type exists."); + var is_mozilla = File.exists(getFolder(fProgram, "mozilla-bin")); + var is_firefox = File.exists(getFolder(fProgram, "firefox-bin")) || File.exists(getFolder(fProgram, "firebird-bin")); + var is_thunderbird = File.exists(getFolder(fProgram, "thunderbird-bin")); + if ( (!is_mozilla) && (!is_firefox) && (!is_thunderbird)) { + logComment("# unknown application type"); + alert("This XPI currently only supports Mozilla, FirdBird and ThunderBird.\n" + + "Please contact file a bug at http://xprint.mozdev.org if you see this error."); + cancelInstall(ACCESS_DENIED); + return; + } + + /* Test whether this mozilla supports pluggable shell scripts */ + var init_d_readme_path = getFolder(fProgram, "init.d/README"); + logComment("# Checking whether '" + init_d_readme_path + "' exists."); + if (!File.exists(init_d_readme_path)) { + logComment("# init_d_readme_path missing"); + if (is_firefox) { + alert("Your version of FireFox does not support pluggable shell scripts.\n" + + "You need at least FireFox 0.9 (or later)."); + } + else if (is_thunderbird) { + alert("Your version of ThunderBird does not support pluggable shell scripts.\n" + + "You need at least ThunderBird 0.6 (or later)."); + } + else + { + alert("Your version of Mozilla does not support pluggable shell scripts.\n" + + "You need at least Mozilla 1.7a (or later)."); + } + cancelInstall(ACCESS_DENIED); + return; + } + + /* Verify available disk space */ + if (!verifyDiskSpace(fProgram, srDest)) { + logComment("# verifyDiskSpace failure."); + cancelInstall(INSUFFICIENT_DISK_SPACE); + return; + } + + /* Add the files which should be installed */ + logComment("# addDirectory sequence begin."); + addDirectory(regname, version, "xprint_xpi", userProfileBaseDir, "xprint_xpi", true); + addDirectory(regname, version, "init.d", userProfileBaseDir, "init.d", true); + logComment("# addDirectory sequence end."); + + err = getLastError(); + + if (err == ACCESS_DENIED) { + logComment("# ACCESS_DENIED"); + alert("Unable to write to directory " + userProfileBaseDir + ".\n" + + "You will need to restart the browser with administrator/root " + + "privileges to install this software." + + "After installing as root (or administrator), " + + "you will need to restart the browser one more time to " + + "register the installed software.\n After the second restart, " + + "you can go back to running the browser without privileges!"); + + logComment("# cancelInstall(), ACCESS_DENIED"); + cancelInstall(ACCESS_DENIED); + return; + } + else if (err != SUCCESS) { + logComment("# cancelInstall(), err=" + err); + cancelInstall(err); + return; + } + + logComment("# performInstall()"); + performInstall(); +} + +// this function verifies disk space in kilobytes +function verifyDiskSpace(dirPath, spaceRequired) { + var spaceAvailable; + + // Get the available disk space on the given path + spaceAvailable = fileGetDiskSpaceAvailable(dirPath); + + // Convert the available disk space into kilobytes + spaceAvailable = parseInt(spaceAvailable / 1024); + + // do the verification + if(spaceAvailable < spaceRequired) { + logComment("Insufficient disk space: " + dirPath); + logComment(" required : " + spaceRequired + " K"); + logComment(" available: " + spaceAvailable + " K"); + return false; + } + + return true; +} + +function getUserProfileBaseDir() +{ + var userPofileBaseDir; + + logComment("# getUserProfileBaseDir"); + + userPofileBaseDir = getFolder("Profile", "../.."); + + logComment("# getUserProfileBaseDir='" + userPofileBaseDir + "'"); + + return userPofileBaseDir; +} + +/* EOF. */ Index: xc/packager/mozilla_xpi/make_mozilla_xpi.sh =================================================================== RCS file: xc/packager/mozilla_xpi/make_mozilla_xpi.sh diff -N xc/packager/mozilla_xpi/make_mozilla_xpi.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/mozilla_xpi/make_mozilla_xpi.sh 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,127 @@ +#!/bin/ksh + +# Set search path for commands +export PATH=/usr/xpg4/bin:/usr/sbin:/usr/bin:/bin:/sbin + +set -x +set -e + +#XPRINTDIR=/usr/openwin/server/etc/XpConfig/ +#XBINDIR=/usr/openwin/bin + +PKG_NAME="mozilla_xprint_xpi" + +PKG_FILES="/tmp/tmp_${PKG_NAME}" + + +if [ "${XPRINTDIR}" = "" ] ; then + echo "$0: Error: XPRINTDIR not set" + exit 1 +fi + +if [ "${XBINDIR}" = "" ] ; then + echo "$0: Error: XBINDIR not set" + exit 1 +fi + + +# Do not edit +# REL_* vars are paths relative to '/' +# Thanks to the "wonders" of some /bin/sh I cannot use ... +# REL_XPRINTDIR=${XPRINTDIR#*/} +# REL_XBINDIR=${XBINDIR#*/} +# ... ;-( +REL_XPRINTDIR="`echo ${XPRINTDIR} | sed 's/\///'`" +REL_XBINDIR="`echo ${XBINDIR} | sed 's/\///'`" + + +#### Main + +# Create and test tarball of files which should be in the final RPM... +if true ; then +echo "###### Fetching files from build dir..." +( + # Go to xc/packager/tarball + cd ../tarball + # ${XPDESTTARFILE} is used by "make make_xprint_tarball" + export XPDESTTARFILE="/tmp/xprint_pkg_`date +%y%m%d%H%M%S`.tar.gz" + make make_xprint_tarball + + # Check if the temp. tarball was being build + if [ ! -f "${XPDESTTARFILE}" ] ; then + echo "# temp. tarball missing." + exit 1 + fi + + # ... and then unpack the temp. tarball in the ${PKG_FILES} dir + [ -d "${PKG_FILES}" ] && rm -Rf "${PKG_FILES}" + mkdir "${PKG_FILES}" + cd "${PKG_FILES}" + gunzip -c ${XPDESTTARFILE} | tar -xf - + rm -f ${XPDESTTARFILE} + + cd xprint/install + + # Remove old ReadMe + rm -f ${REL_XPRINTDIR}/README + # Remove docs we do not need in the XPI + rm -Rf usr/X11R6/man +) +fi + +echo "###### Building pkgproto file..." + + +# Make sure we pick the right binary - users may share one profile +# between different architectures +uname_os="`uname -s`" +uname_cpu="`uname -p 2>/dev/null`" # uname -p may fail on old Debian +if [ "${uname_cpu}" = "unknown" -o "${uname_cpu}" = "" ] ; then + uname_cpu="`uname -m`" +fi + +XPIDIR="${PKG_FILES}/xpi" +echo "XPIDIR=${XPIDIR}." + +mkdir -p "${XPIDIR}/xprint_xpi" +mkdir -p "${XPIDIR}/xprint_xpi/${uname_os}_${uname_cpu}" +( + cd "${XPIDIR}/xprint_xpi" + # FixME: Need softlinks for all compatible |uname_cpu| types + case "${uname_cpu}" in + "i386" | "i486" | "i586" | "i686" | "x86_64" | "athlon" | "Athlon") + [ ! -d "${uname_os}_i386" ] && ln -s "${uname_os}_${uname_cpu}" "${uname_os}_i386" + [ ! -d "${uname_os}_i486" ] && ln -s "${uname_os}_${uname_cpu}" "${uname_os}_i486" + [ ! -d "${uname_os}_i586" ] && ln -s "${uname_os}_${uname_cpu}" "${uname_os}_i586" + [ ! -d "${uname_os}_i686" ] && ln -s "${uname_os}_${uname_cpu}" "${uname_os}_i686" + [ ! -d "${uname_os}_x86_64" ] && ln -s "${uname_os}_${uname_cpu}" "${uname_os}_x86_64" + [ ! -d "${uname_os}_athlon" ] && ln -s "${uname_os}_${uname_cpu}" "${uname_os}_athlon" + [ ! -d "${uname_os}_Athlon" ] && ln -s "${uname_os}_${uname_cpu}" "${uname_os}_Athlon" + ;; + esac +) +mkdir -p "${XPIDIR}/init.d" +mv "${PKG_FILES}/xprint"/* "${XPIDIR}/xprint_xpi/${uname_os}_${uname_cpu}/." +cp "K98xprint_xpi.sh" "${XPIDIR}/init.d/." +cp "S98xprint_xpi.sh" "${XPIDIR}/init.d/." +chmod a+rx "${XPIDIR}/init.d"/*.sh +cp "install.js" "${XPIDIR}/." + +echo "###### Making package..." + +echo "#### zip..." +( + OLDPWD="${PWD}" + cd "${XPIDIR}" + zip -r -y -9 "${OLDPWD}/${PKG_NAME}.xpi" . +) + +#echo "###### Cleaning up..." +rm -rf "${PKG_FILES}" + +echo "###### Package done:" +ls -lad "${PKG_NAME}.xpi" + +echo "###### Done." +exit 0 +# Index: xc/packager/rpm/Imakefile =================================================================== RCS file: xc/packager/rpm/Imakefile diff -N xc/packager/rpm/Imakefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/rpm/Imakefile 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,3 @@ +XCOMM $Xorg: Imakefile,v 1.1 2003/02/10 19:54:53 gisburn Exp $ + +XCOMM dummy for now Index: xc/packager/rpm/xprint.spec =================================================================== RCS file: xc/packager/rpm/xprint.spec diff -N xc/packager/rpm/xprint.spec --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/rpm/xprint.spec 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,206 @@ +%define name xprint +%define version 20041125trunk +%define release 1.0.000 + +Summary: Xprint +Name: %{name} +Version: %{version} +Release: %{release} +Copyright: MIT +Group: X11/Applications +URL: http://xprint.mozdev.org/ +Source: xprint-%{version}.tar.gz +#BuildPrereq: XFree86-devel +BuildRoot: %{_tmppath}/%{name}-%{version} +Prefix: %{_prefix} +Packager: Roland Mainz +Patch0: xprint_rpmpackage.patch + +%description +Xprint provides an advanched print API for X11-based +(incl. CDE, Xt/Motif-, Xt/LessTif-, Xt/Athena-, Qt- and +Mozilla-based) applications. + +%prep + +%setup -q -n xprint +%patch0 -p0 + +%build +cd src/xprint_main/xc/ +make World + +%install +if [ -d ${RPM_BUILD_ROOT} ] ; then + rm -rf ${RPM_BUILD_ROOT} +fi +mkdir -p ${RPM_BUILD_ROOT} + +# Create and test tarball of files which should be in the final RPM... +cd src/xprint_main/xc/packager/ +# ${XPDESTTARFILE} is used by "make make_xprint_tarball" +XPDESTTARFILE="/tmp/xprint_rpm_`date +%y%m%d%H%M%S`.tar.gz" +export XPDESTTARFILE +make make_xprint_tarball + +# Check if the temp. tarball was being build +if [ ! -f "${XPDESTTARFILE}" ] ; then + echo "# temp. tarball missing." + exit 1 +fi + +# ... and then unpack the temp. tarball in the ${RPM_BUILD_ROOT} dir +cd ${RPM_BUILD_ROOT} +gunzip -c ${XPDESTTARFILE} | tar -xvf - +rm -f ${XPDESTTARFILE} + +# the tarball generation script puts the files which should be installed +# in the "install/" subdir. we strip the tarball README and the +# tarball-specific "run_xprint_from_tarball.sh" and then move all stuff +# in install/* to $PWD +rm -f xprint/run_xprint_from_tarball.sh +rm -f xprint/README +mv xprint/install/* . +rmdir xprint/install +rmdir xprint + +# remove obsolete README and SECURITY extension config "SecurityPolicy" +rm -f ${RPM_BUILD_ROOT}/usr/X11R6/lib/X11/xserver/README +rm -f ${RPM_BUILD_ROOT}/usr/X11R6/lib/X11/xserver/SecurityPolicy + +mv ${RPM_BUILD_ROOT}/usr/X11R6/bin/Xprt ${RPM_BUILD_ROOT}/usr/X11R6/bin/Xprt_xprint_org + +if [ ! -f ${RPM_BUILD_ROOT}/usr/X11R6/lib/X11/xserver/C/print/models/PSdefault/model-config ] ; then + echo "# ERROR: ${RPM_BUILD_ROOT}/usr/X11R6/lib/X11/xserver/C/print/models/PSdefault/model-config missing." + exit 1 +fi + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%post +if [ -x /usr/lib/lsb/install_initd ] ; then + # (hopefully) LSB-compliant distribution + /usr/lib/lsb/install_initd /etc/init.d/xprint +else + if [ -f /etc/redhat-release ] ; then + if [ $1 = 1 ]; then + /sbin/chkconfig --add xprint + fi + else + # SuSE(-like) ? + if [ -d /etc/rc.d/rc2.d/ ] ; then + echo "# Detected SuSE(-like) distribution" + echo "# Creating links..." + ln -sf ../xprint /etc/rc.d/rc2.d/K21xprint + ln -sf ../xprint /etc/rc.d/rc2.d/S21xprint + ln -sf ../xprint /etc/rc.d/rc3.d/K21xprint + ln -sf ../xprint /etc/rc.d/rc3.d/S21xprint + + # Older SuSE versions (like SuSE 6.4) do not have /etc/init.d/ + if [ ! -f /etc/rc.d/xprint ] ; then + echo "# Creating old SuSE compatibility link..." + ln -s /etc/init.d/xprint /etc/rc.d/xprint + fi + else + # RedHat(-like) ? + if [ -d "/etc/rc1.d" -a -d "/etc/init.d/" ] ; then + echo "# Detected RedHat(-like) distribution" + echo "# Creating links..." + ln -sf /etc/init.d/xprint /etc/rc.d/rc0.d/K61xprint + ln -sf /etc/init.d/xprint /etc/rc.d/rc1.d/K61xprint + ln -sf /etc/init.d/xprint /etc/rc.d/rc2.d/S61xprint + ln -sf /etc/init.d/xprint /etc/rc.d/rc3.d/S61xprint + ln -sf /etc/init.d/xprint /etc/rc.d/rc4.d/S61xprint + ln -sf /etc/init.d/xprint /etc/rc.d/rc5.d/S61xprint + ln -sf /etc/init.d/xprint /etc/rc.d/rc6.d/K61xprint + else + echo "# Unsupported version of Linux, cannot create links for /etc/init.d/." + exit 1 + fi + fi + fi +fi + +ln -sf /usr/X11R6/bin/Xprt_xprint_org /usr/X11R6/bin/Xprt + +echo "#" +echo "# Notes:" +echo "# 1. You have to start the Xprint servers using % /etc/init.d/xprint start #" +echo "# and relogin (to populate the XPSERVERLIST env variable using" +echo "# /etc/profile.d/xprint) before using any Xprint-based applications." +echo "# 2. Please consult the FAQ (/usr/doc/packages/xprint/Xprint_FAQ.txt)" +echo "# or http://xprint.mozdev.org/ if there are any problems." + +%preun +if [ -x /usr/lib/lsb/remove_initd ] ; then + # (hopefully) LSB-compliant distribution + /usr/lib/lsb/remove_initd /etc/init.d/xprint +else + if [ -f /etc/redhat-release ] ; then + if [ $1 = 0 ]; then + /sbin/service xprint stop >/dev/null 2>&1 + /sbin/chkconfig --del xprint + fi + else + # SuSE(-like) ? + if [ -d /etc/rc.d/rc2.d/ ] ; then + echo "# Detected SuSE(-like) distribution" + echo "# Removing links..." + rm -f /etc/rc.d/rc2.d/K21xprint + rm -f /etc/rc.d/rc2.d/S21xprint + rm -f /etc/rc.d/rc3.d/K21xprint + rm -f /etc/rc.d/rc3.d/S21xprint + + # See comment above about old SuSE versions + if [ -L /etc/rc.d/xprint ] ; then + echo "# Removing old SuSE compatibility link..." + rm -f /etc/rc.d/xprint + fi + else + # RedHat(-like) ? + if [ -d "/etc/rc1.d" -a -d "/etc/init.d/" ] ; then + echo "# Detected RedHat(-like) distribution" + echo "# Removing links..." + rm -f /etc/rc.d/rc0.d/K61xprint + rm -f /etc/rc.d/rc1.d/K61xprint + rm -f /etc/rc.d/rc2.d/S61xprint + rm -f /etc/rc.d/rc3.d/S61xprint + rm -f /etc/rc.d/rc4.d/S61xprint + rm -f /etc/rc.d/rc5.d/S61xprint + rm -f /etc/rc.d/rc6.d/K61xprint + else + echo "# Unsupported version of Linux, cannot remove links for /etc/init.d/." + exit 1 + fi + fi + fi +fi + +%postun +if [ $1 -ge 1 ]; then + /sbin/service xprint condrestart >/dev/null 2>&1 +fi + +%files +%defattr(-,root,root) +%doc src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.html +%doc src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt +%doc src/xprint_main/xc/doc/hardcopy/XPRINT/dtprint_fspec.ps +/etc/init.d/* +/etc/profile.d/* +/etc/X11/Xsession.d/92xprint-xpserverlist.sh +/etc/X11/xinit/xinitrc.d/92xprint-xpserverlist.sh +/usr/X11R6/bin/Xprt_xprint_org +/usr/X11R6/bin/xplsprinters +/usr/X11R6/bin/xprehashprinterlist +/usr/X11R6/bin/xphelloworld +/usr/X11R6/bin/xpxthelloworld +/usr/X11R6/bin/xpsimplehelloworld +/usr/X11R6/bin/pclcomp +/usr/X11R6/bin/xdpr +/usr/X11R6/bin/xpr +/usr/X11R6/lib/X11/xserver/* +/usr/X11R6/man/man1/* +/usr/X11R6/man/man7/* +# EOF. Index: xc/packager/rpm/xprint_rpmpackage.patch =================================================================== RCS file: xc/packager/rpm/xprint_rpmpackage.patch diff -N xc/packager/rpm/xprint_rpmpackage.patch --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/rpm/xprint_rpmpackage.patch 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,14 @@ +Index: src/xprint_main/xc/config/cf/site.def +=================================================================== +RCS file: /cvs/xprint/src/xprint_main/xc/config/cf/site.def,v +retrieving revision 1.23 +diff -u -r1.23 site.def +--- src/xprint_main/xc/config/cf/site.def 27 Jan 2003 00:58:05 -0000 1.23 ++++ src/xprint_main/xc/config/cf/site.def 17 Nov 2003 23:44:55 -0000 +@@ -1,4 +1,6 @@ + ++#define BuildXprintRPMPackage YES ++ + /* Include xprint.org defaults */ + #include "xprint_site.def" + Index: xc/packager/solaris/Imakefile =================================================================== RCS file: xc/packager/solaris/Imakefile diff -N xc/packager/solaris/Imakefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/Imakefile 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,10 @@ +XCOMM $Xorg: Imakefile,v 1.1 2003/01/20 19:54:53 gisburn Exp $ +#define IHaveSubdirs +#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" + +SUBDIRS = \ + GISWxprintglue \ + GISWxprint + +MakeSubdirs($(SUBDIRS)) +DependSubdirs($(SUBDIRS)) Index: xc/packager/solaris/GISWxprint/Imakefile =================================================================== RCS file: xc/packager/solaris/GISWxprint/Imakefile diff -N xc/packager/solaris/GISWxprint/Imakefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprint/Imakefile 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,11 @@ +XCOMM $Xorg: Imakefile,v 1.1 2003/01/20 19:54:53 gisburn Exp $ + +#if BuildGISWxprint +make_GISWxprint:: + XPRINTDIR=$(XPRINTDIR) XBINDIR=$(BINDIR) XTOP=$(TOP) ; \ + export XPRINTDIR XBINDIR XTOP ; \ + /bin/ksh -e ../GISWxprintglue/make_solaris_pkg.sh "GISWxprint" + +clean:: + $(RM) GISWxprint.tar.gz pkgproto.tmp +#endif /* BuildGISWxprint */ Index: xc/packager/solaris/GISWxprint/README =================================================================== RCS file: xc/packager/solaris/GISWxprint/README diff -N xc/packager/solaris/GISWxprint/README --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprint/README 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,91 @@ +README for GISWxprint (=Xprint server for Solaris) package + +This package contains the Xprint server side (e.g. server, startup and +configuration files) which are required to use Xprint-based applications +(like Mozilla, Phoenix, Eclipse, Motif2, Qt etc.) + +For futher information please consult the Xprint FAQ (available under +/opt/GISWxprint/docs/Xprint_FAQ.txt after installation - or see +http://xprint.mozdev.org/ for the newest version) and/or +http://xprint.mozdev.org/ + +Installation requirements: +========================== +The following Solaris patches are REQUIRED to gurantee correct behaviour of +this package: +* Solaris 2.7/SPARC: + 106541-27 SunOS 5.7: Kernel Update Patch + 107443-17 SunOS 5.7: packaging utilities patch + 107650-08 OpenWindows 3.6.1 X11R6.4 Xprint Extension Patch + 107654-10 OpenWindows 3.6.1: X11R6.4 LBX & XRX Extensions Patch + 107656-11 OpenWindows 3.6.1 libXt Patch + 108376-44 OpenWindows 3.6.1: Xsun Patch + 115228-01 CDE 1.3: dtksh patch +* Solaris 2.7/x86: + 106542-27 SunOS 5.7_x86: Kernel Update Patch + 107444-17 SunOS 5.7_x86: packaging utilities patch + 107651-08 OpenWindows 3.6.1_x86: X11R6.4 Xprint Extension Patch + 107655-10 OpenWindows 3.6.1_x86: X11R6.4 LBX & XRX Extensions Patch + 107657-09 OpenWindows 3.6.1_x86: ERC X11R6.4 Extension Patch + 108377-39 OpenWindows 3.6.1_x86: Xsun Patch + +* Solaris 2.8/SPARC: + 108652-74 X11 6.4.1: Xsun patch + 108897-01 X11 6.4.1 Xprint patch + 110934-14 SunOS 5.8: pkgtrans, pkgadd, pkgchk, pkgmk and libpkg.a patch + 114956-02 CDE 1.4: dtksh patch +* Solaris 2.8/x86: + 108653-63 X11 6.4.1_x86: Xsun patch + 110934-14 SunOS 5.8: pkgtrans, pkgadd, pkgchk, pkgmk and libpkg.a patch + +* Solaris 2.9/SPARC: + 112785-26 X11 6.6.1: Xsun patch + 113713-03 SunOS 5.9: pkginstall Patch +* Solaris 2.9/x86: + 112786-15 X11 6.6.1_x86: Xsun patch + 114568-02 SunOS 5.9_x86: usr/sadm/install/bin/pkginstall Patch + + +Installation: +============ +1. Install the package: + % /usr/sbin/pkgadd -d GISWxprint.pkg + +2. Start Xprint server side: + a) reboot + or + b) start the Xprint servers manually using + % /etc/init.d/xprint start + % sleep 30 + and restart your user CDE sessions (e.g. re-login.) + +3. Verification: + After (re-)login into CDE the env variable ${XPSERVERLIST} should be + set and + % /opt/GISWxprint/bin/xplsprinters + should list all available printer queues. + + +Deinstallation: +=============== +1. Stop Xprint servers: + % /etc/init.d/xprint stop + +2. Remove the package + % /usr/sbin/pkgrm GISWxprint + + +Known bugs/issues: +================== +- Not all paper sizes defined in the "PSdefault" printer models may be + available since the Xprint drivers(including the PostScript DDX) within + Xprt will validate those lists against a buildin list and this list may + not have been updated yet in Solaris's version of Xprt. + + +Reporting bugs: +=============== +Please send bug reports/comments/questions to +mailto:roland.mainz@nrubsig.org or +mailto:xprint@mozdev.org + Index: xc/packager/solaris/GISWxprint/depend =================================================================== RCS file: xc/packager/solaris/GISWxprint/depend diff -N xc/packager/solaris/GISWxprint/depend --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprint/depend 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,41 @@ +# Copyright 2003-2004 Roland Mainz +# All Rights Reserved. +# Use is subject to license terms. +# +# $Id: depend,v 1.3 2004/02/13 04:43:47 gisburn Exp $ +# +# This package information file defines software dependencies associated +# with the pkg. You can define three types of pkg dependencies with this file: +# P indicates a prerequisite for installation +# I indicates an incompatible package +# R indicates a reverse dependency +# see pkginfo(4), PKG parameter +# see pkginfo(4), NAME parameter +# see pkginfo(4), VERSION parameter +# see pkginfo(4), ARCH parameter +# +# () +# () +# ... +# +# ... + +P SUNWcsr Core Solaris, (Root) +P SUNWxwplt X Window System platform software +P SUNWpcu SunSoft Print - Client, (usr) +P SUNWxcu4 XCU4 Utilities +P SUNWxwfnt X Window System platform required fonts +P SUNWdtbas CDE application basic runtime environment + +# "GISWxprint" is the full version (incl. Xprt binary; "GISWxprintglue" +# uses Solaris's own /usr/openwin/bin/Xprt instead) of the package +# (which installs it's own /etc/init.d/xprint) +I GISWxprintglue Xprint server glue +# "GISWxprintcommon" may be used in the future for /etc/init.d/xprint and co. +I GISWxprintcommon + +# make sure we don't collide with the blastwave.org versions of these packages +I CSWxprint +I CSWxprintglue +I CSWxprintcommon +# EOF. Index: xc/packager/solaris/GISWxprint/pkginfo =================================================================== RCS file: xc/packager/solaris/GISWxprint/pkginfo diff -N xc/packager/solaris/GISWxprint/pkginfo --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprint/pkginfo 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,23 @@ +# +# Copyright 2003-2004 Roland Mainz +# All Rights Reserved. +# Use is subject to license terms. +# +#ident "$Id: pkginfo,v 1.3 2004/02/13 04:43:47 gisburn Exp $" +# +# This required package information file describes characteristics of the +# package, such as package abbreviation, full package name, package version, +# and package architecture. +# +PKG="GISWxprint" +NAME="Xprint server (full version)" +ARCH="sparc" +VERSION="0.9" +CATEGORY="system" +DESC="Xprint server" +VENDOR="xprint.mozdev.org" +HOTLINE="Please contact your local service provider" +EMAIL="xprint@mozdev.org" +CLASSES="none" +BASEDIR=/ +# EOF. Index: xc/packager/solaris/GISWxprint/postinstall =================================================================== RCS file: xc/packager/solaris/GISWxprint/postinstall diff -N xc/packager/solaris/GISWxprint/postinstall --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprint/postinstall 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Copyright 2003-2004 Roland Mainz +# All Rights Reserved. +# Use is subject to license terms. +# +#ident "$Id: postinstall,v 1.2 2004/02/13 04:43:47 gisburn Exp $" +# +# postinstall for GISWxprint package + +print_package_usage() +{ +cat <<'@EOF' +# To finish the installation please +# a) reboot +# or +# b) start the Xprint servers manually using +# % /etc/init.d/xprint start +# % sleep 30 +# and restart your user CDE sessions (e.g. re-login.) +# +# Verification: +# After login the env variable ${XPSERVERLIST} should be set and +# % /opt/GISWxprint/bin/xplsprinters +# should list all available printer queues. +@EOF +} + +# Print postinstall notice about the steps todo after installation +print_package_usage + +exit 0 +# EOF. Index: xc/packager/solaris/GISWxprint/preinstall =================================================================== RCS file: xc/packager/solaris/GISWxprint/preinstall diff -N xc/packager/solaris/GISWxprint/preinstall --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprint/preinstall 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Copyright 2003-2004 Roland Mainz +# All Rights Reserved. +# Use is subject to license terms. +# +#ident "$Id: preinstall,v 1.2 2004/02/13 04:43:47 gisburn Exp $" +# +# preinstall for GISWxprint package + +# NO-OP for now + +exit 0 +# EOF. Index: xc/packager/solaris/GISWxprintglue/Imakefile =================================================================== RCS file: xc/packager/solaris/GISWxprintglue/Imakefile diff -N xc/packager/solaris/GISWxprintglue/Imakefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprintglue/Imakefile 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,11 @@ +XCOMM $Xorg: Imakefile,v 1.1 2003/01/20 19:54:53 gisburn Exp $ + +#if BuildGISWxprintglue +make_GISWxprintglue:: + XPRINTDIR=$(XPRINTDIR) XBINDIR=$(BINDIR) XTOP=$(TOP) ; \ + export XPRINTDIR XBINDIR XTOP ; \ + /bin/ksh -e ./make_solaris_pkg.sh "GISWxprintglue" + +clean:: + $(RM) GISWxprintglue.tar.gz pkgproto.tmp +#endif /* BuildGISWxprintglue */ Index: xc/packager/solaris/GISWxprintglue/README =================================================================== RCS file: xc/packager/solaris/GISWxprintglue/README diff -N xc/packager/solaris/GISWxprintglue/README --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprintglue/README 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,121 @@ +README for GISWxprintglue (=Xprint glue for Solaris) package + +This package contains the Xprint glue (startup and configuration files) +which are currently missing in Solaris to use Xprint-based applications +(like Mozilla, Phoenix, Eclipse, Motif2, Qt etc.) + +For futher information please consult the Xprint FAQ (available under +/opt/GISWxprintglue/docs/Xprint_FAQ.txt after installation - or see +http://xprint.mozdev.org/ for the newest version) and/or +http://xprint.mozdev.org/ + +Installation requirements: +========================== +The following Solaris patches are REQUIRED to gurantee correct behaviour of +this package: +* Solaris 2.7/SPARC: + 106541-27 SunOS 5.7: Kernel Update Patch + 107443-17 SunOS 5.7: packaging utilities patch + 107650-08 OpenWindows 3.6.1 X11R6.4 Xprint Extension Patch + 107654-10 OpenWindows 3.6.1: X11R6.4 LBX & XRX Extensions Patch + 107656-11 OpenWindows 3.6.1 libXt Patch + 108376-44 OpenWindows 3.6.1: Xsun Patch + 115228-01 CDE 1.3: dtksh patch +* Solaris 2.7/x86: + 106542-27 SunOS 5.7_x86: Kernel Update Patch + 107444-17 SunOS 5.7_x86: packaging utilities patch + 107651-08 OpenWindows 3.6.1_x86: X11R6.4 Xprint Extension Patch + 107655-10 OpenWindows 3.6.1_x86: X11R6.4 LBX & XRX Extensions Patch + 107657-09 OpenWindows 3.6.1_x86: ERC X11R6.4 Extension Patch + 108377-39 OpenWindows 3.6.1_x86: Xsun Patch + +* Solaris 2.8/SPARC: + 108652-74 X11 6.4.1: Xsun patch + 108897-01 X11 6.4.1 Xprint patch + 110934-14 SunOS 5.8: pkgtrans, pkgadd, pkgchk, pkgmk and libpkg.a patch + 114956-02 CDE 1.4: dtksh patch +* Solaris 2.8/x86: + 108653-63 X11 6.4.1_x86: Xsun patch + 110934-14 SunOS 5.8: pkgtrans, pkgadd, pkgchk, pkgmk and libpkg.a patch + +* Solaris 2.9/SPARC: + 112785-26 X11 6.6.1: Xsun patch + 113713-03 SunOS 5.9: pkginstall Patch +* Solaris 2.9/x86: + 112786-15 X11 6.6.1_x86: Xsun patch + 114568-02 SunOS 5.9_x86: usr/sadm/install/bin/pkginstall Patch + + +Installation: +============ +1. Install the package: + % /usr/sbin/pkgadd -d GISWxprintglue.pkg + +2. Start Xprint server side: + a) reboot + or + b) start the Xprint servers manually using + % /etc/init.d/xprint start + % sleep 30 + and restart your user CDE sessions (e.g. re-login.) + +3. Verification: + After (re-)login into CDE the env variable ${XPSERVERLIST} should be + set and + % /opt/GISWxprintglue/bin/xplsprinters + should list all available printer queues. + + +Deinstallation: +=============== +1. Stop Xprint servers: + % /etc/init.d/xprint stop + +2. Remove the package + % /usr/sbin/pkgrm GISWxprintglue + + +Known bugs/issues: +================== +- Printing may remove spaces when monotype fonts (like "-monotype-arial-*") + are being used by the PostScript driver. + This is a bug in the Solaris Xprint server binary (/usr/openwin/bin/Xprt). + + Various bug reports have been filed, see + - SunSolve bugid 4843234 + - http://xprint.mozdev.org/bugs/show_bug.cgi?id=3353 ("Solaris Xprt looses + space when rendering with '-monotype-arial-*'-fonts") + - http://bugzilla.mozilla.org/show_bug.cgi?id=199957 ("Solaris 8 Mozilla + removes spaces for text within ...") + + Solution: + Please apply the patches listed in the section "Installation requirements" + of this document. + + Known workarounds: + - Remove the '-monotype-arial-*' fonts from the font path + - Use an alternate Xprint server like available in the "GISWxprint" package + (this package is identical to the "GISWxprintglue" package except that it + uses a Xprint server build from xprint.mozdev.org sources and not the + /usr/openwin/bin/Xprt binary from Solaris) + - Mozilla-only: Adding + -- snip -- + user_pref("print.xprint.font.rejectfontpattern", + "fname=-dt-.*;scalable=.*;outline_scaled=false;xdisplay=.*;xdpy=.*;ydpy=.*;xdevice=.*|" + + "fname=-monotype-arial.*;scalable=.*;outline_scaled=.*;xdisplay=.*;xdpy=.*;ydpy=.*;xdevice=.*"); + -- snip -- + to prefs.js works around the problem (see + http://bugzilla.mozilla.org/show_bug.cgi?id=199957#c6 , too). + +- Not all paper sizes defined in the "PSdefault" printer models may be + available since the Xprint drivers(including the PostScript DDX) within + Xprt will validate those lists against a buildin list and this list may + not have been updated yet in Solaris's version of Xprt. + + +Reporting bugs: +=============== +Please send bug reports/comments/questions to +mailto:roland.mainz@nrubsig.org or +mailto:xprint@mozdev.org + Index: xc/packager/solaris/GISWxprintglue/depend =================================================================== RCS file: xc/packager/solaris/GISWxprintglue/depend diff -N xc/packager/solaris/GISWxprintglue/depend --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprintglue/depend 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,41 @@ +# Copyright 2003-2004 Roland Mainz +# All Rights Reserved. +# Use is subject to license terms. +# +# $Id: depend,v 1.3 2004/02/13 04:43:47 gisburn Exp $ +# +# This package information file defines software dependencies associated +# with the pkg. You can define three types of pkg dependencies with this file: +# P indicates a prerequisite for installation +# I indicates an incompatible package +# R indicates a reverse dependency +# see pkginfo(4), PKG parameter +# see pkginfo(4), NAME parameter +# see pkginfo(4), VERSION parameter +# see pkginfo(4), ARCH parameter +# +# () +# () +# ... +# +# ... + +P SUNWcsr Core Solaris, (Root) +P SUNWxwplt X Window System platform software +P SUNWpcu SunSoft Print - Client, (usr) +P SUNWxcu4 XCU4 Utilities +P SUNWxwfnt X Window System platform required fonts +P SUNWdtbas CDE application basic runtime environment + +# "GISWxprint" is the full version (incl. Xprt binary; "GISWxprintglue" +# uses Solaris's own /usr/openwin/bin/Xprt instead) of the package +# (which installs it's own /etc/init.d/xprint) +I GISWxprint Xprint server (full version) +# "GISWxprintcommon" may be used in the future for /etc/init.d/xprint and co. +I GISWxprintcommon + +# make sure we don't collide with the blastwave.org versions of these packages +I CSWxprint +I CSWxprintglue +I CSWxprintcommon +# EOF. Index: xc/packager/solaris/GISWxprintglue/make_solaris_pkg.sh =================================================================== RCS file: xc/packager/solaris/GISWxprintglue/make_solaris_pkg.sh diff -N xc/packager/solaris/GISWxprintglue/make_solaris_pkg.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprintglue/make_solaris_pkg.sh 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,184 @@ +#!/bin/ksh + +# Set search path for commands +export PATH=/usr/xpg4/bin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin + +#XPRINTDIR=/usr/openwin/server/etc/XpConfig/ +#XBINDIR=/usr/openwin/bin + +case "$1" in + 'GISWxprintglue') + PKG_NAME="GISWxprintglue" + ;; + 'GISWxprint') + PKG_NAME="GISWxprint" + ;; + *) + echo "## Error illegal target" + exit 1 + ;; +esac + + +PKG_FILES=/tmp/tmp_${PKG_NAME} + + +if [ "${XPRINTDIR}" = "" ] ; then + echo "$0: Error: XPRINTDIR not set" + exit 1 +fi + +if [ "${XBINDIR}" = "" ] ; then + echo "$0: Error: XBINDIR not set" + exit 1 +fi + + +# Do not edit +# REL_* vars are paths relative to '/' +# Thanks to the "wonders" of some /bin/sh I cannot use ... +# REL_XPRINTDIR=${XPRINTDIR#*/} +# REL_XBINDIR=${XBINDIR#*/} +# ... ;-( +REL_XPRINTDIR="`echo ${XPRINTDIR} | sed 's/\///'`" +REL_XBINDIR="`echo ${XBINDIR} | sed 's/\///'`" + +createpkgproto() +{ + pkgproto | + while read i1 i2 i3 i4 i5 ; do + if [ "${i1}" = "f" ] ; then + if [ ! -r "${i3}" ] ; then + echo "${0}: \"${i3}\" not found." >&2 + exit 1 + fi + fi + + if [ "${i1}" = "d" -o -x "${i3}" ] ; then + echo "$i1 $i2 $i3 0755" + else + echo "$i1 $i2 $i3" + fi + done +} + +#### Main + +# Create and test tarball of files which should be in the final RPM... +if true ; then +echo "###### Fetching files from build dir..." +( + # Go to xc/packager/tarball + cd ../../tarball + # ${XPDESTTARFILE} is used by "make make_xprint_tarball" + export XPDESTTARFILE="/tmp/xprint_pkg_`date +%y%m%d%H%M%S`.tar.gz" + make make_xprint_tarball + + # Check if the temp. tarball was being build + if [ ! -f "${XPDESTTARFILE}" ] ; then + echo "# temp. tarball missing." + exit 1 + fi + + # ... and then unpack the temp. tarball in the ${PKG_FILES} dir + [ -d "${PKG_FILES}" ] && rm -Rf "${PKG_FILES}" + mkdir "${PKG_FILES}" + cd "${PKG_FILES}" + gunzip -c ${XPDESTTARFILE} | tar -xf - + rm -f ${XPDESTTARFILE} + + cd xprint/install + + # Remove old ReadMe + rm -f ${REL_XPRINTDIR}/README + + if [ "${PKG_NAME}" = "GISWxprintglue" ] ; then + # Remove our own Xprt binary, Solaris has it's own working version + # under /usr/openwin/bin/Xprt and the GISWxprintglue will use that + # (only the "GISWxprint" package will ship it's own version of Xprt) + rm -f ${REL_XBINDIR}/Xprt + fi +) +fi + +echo "###### Building pkgproto file..." + +rm -f pkgproto.tmp +( + OLD_PWD="${PWD}" + cd "${PKG_FILES}/xprint/install" + + # Add files in /etc but skip any dirs (they are part of SUNWcsr) + # (and treat them all as executable) + echo '!default 755 root bin' + find etc '!' -type d -print | createpkgproto + + # Add entry for package base dir ("/opt/GISWxprintglue" or "/opt/GISWxprint") + echo "opt/${PKG_NAME}" | createpkgproto + + # Add files in opt/${PKG_NAME}/bin (executables) + echo '!default 755 root bin' + find opt/${PKG_NAME}/bin -print | createpkgproto + + # Add CDE/1.x glue + find usr/dt/config/Xsession.d '!' -type d -print | createpkgproto + + # Add config files in opt/${PKG_NAME}/server (all non-executable) + echo '!default 644 root bin' + find opt/${PKG_NAME}/server -print | createpkgproto + + # Add Xfree86 encoding files for GISWxprint + # (GISWxprintglue uses Solaris Xprt which uses the Solaris encoding/ttmap files) + if [ "${PKG_NAME}" = "GISWxprint" ] ; then + find opt/${PKG_NAME}/lib/X11/fonts/encodings -print | createpkgproto + fi + + # Add files in opt/${PKG_NAME}/man (manual pages) + if [ -d opt/${PKG_NAME}/man ] ; then + echo '!default 644 root bin' + find opt/${PKG_NAME}/man -print | createpkgproto + fi + + # Add FAQ, README etc. + echo '!default 644 root bin' + [ ! -d "opt/${PKG_NAME}/docs" ] && mkdirhier "opt/${PKG_NAME}/docs" + cp "${OLD_PWD}/../../../doc/hardcopy/XPRINT/Xprint_FAQ.txt" opt/${PKG_NAME}/docs/. + cp "${OLD_PWD}/README" opt/${PKG_NAME}/docs/. + find opt/${PKG_NAME}/docs -print | createpkgproto + + # List package info files + echo "# packaging files" + echo "i pkginfo" + echo "i depend" + echo "i preinstall=./preinstall" + echo "i postinstall=./postinstall" +) >pkgproto.tmp +ls -l pkgproto.tmp + +echo "###### Making package..." +[ -d "/tmp/${PKG_NAME}" ] && rm -R "/tmp/${PKG_NAME}" + +echo "#### pkgmk..." +pkgmk -f pkgproto.tmp -d /tmp -o -r "${PKG_FILES}/xprint/install" ${PKG_NAME} + +echo "#### pkgtrans..." +pwd +rm -f "./${PKG_NAME}.pkg" +pkgtrans /tmp "${PWD}/${PKG_NAME}.pkg" ${PKG_NAME} + +echo "#### compressing..." +rm -f "${PKG_NAME}.tar.gz" +tar -cvf - "${PKG_NAME}.pkg" README | gzip --best --stdout >"${PKG_NAME}.tar.gz" +rm -f "${PKG_NAME}.pkg" + +echo "###### Cleaning up..." +rm -rf "${PKG_FILES}" +rm -R "/tmp/${PKG_NAME}" +#rm -f pkgproto.tmp + +echo "###### Package done:" +ls -lad "${PKG_NAME}.tar.gz" + +echo "###### Done." +exit 0 +# Index: xc/packager/solaris/GISWxprintglue/pkginfo =================================================================== RCS file: xc/packager/solaris/GISWxprintglue/pkginfo diff -N xc/packager/solaris/GISWxprintglue/pkginfo --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprintglue/pkginfo 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,23 @@ +# +# Copyright 2003-2004 Roland Mainz +# All Rights Reserved. +# Use is subject to license terms. +# +#ident "$Id: pkginfo,v 1.4 2004/02/13 04:43:47 gisburn Exp $" +# +# This required package information file describes characteristics of the +# package, such as package abbreviation, full package name, package version, +# and package architecture. +# +PKG="GISWxprintglue" +NAME="Xprint server glue" +ARCH="sparc" +VERSION="0.9" +CATEGORY="system" +DESC="Runtime glue for Xprint server" +VENDOR="xprint.mozdev.org" +HOTLINE="Please contact your local service provider" +EMAIL="xprint@mozdev.org" +CLASSES="none" +BASEDIR=/ +# EOF. Index: xc/packager/solaris/GISWxprintglue/postinstall =================================================================== RCS file: xc/packager/solaris/GISWxprintglue/postinstall diff -N xc/packager/solaris/GISWxprintglue/postinstall --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprintglue/postinstall 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Copyright 2003-2004 Roland Mainz +# All Rights Reserved. +# Use is subject to license terms. +# +#ident "$Id: postinstall,v 1.2 2004/02/13 04:43:47 gisburn Exp $" +# +# postinstall for GISWxprintglue package + +print_package_usage() +{ +cat <<'@EOF' +# To finish the installation please +# a) reboot +# or +# b) start the Xprint servers manually using +# % /etc/init.d/xprint start +# % sleep 30 +# and restart your user CDE sessions (e.g. re-login.) +# +# Verification: +# After login the env variable ${XPSERVERLIST} should be set and +# % /opt/GISWxprintglue/bin/xplsprinters +# should list all available printer queues. +@EOF +} + +# Print postinstall notice about the steps todo after installation +print_package_usage + +exit 0 +# EOF. Index: xc/packager/solaris/GISWxprintglue/preinstall =================================================================== RCS file: xc/packager/solaris/GISWxprintglue/preinstall diff -N xc/packager/solaris/GISWxprintglue/preinstall --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/solaris/GISWxprintglue/preinstall 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Copyright 2003-2004 Roland Mainz +# All Rights Reserved. +# Use is subject to license terms. +# +#ident "$Id: preinstall,v 1.4 2004/02/13 04:43:47 gisburn Exp $" +# +# preinstall for GISWxprintglue package + +# nothing here + +exit 0 +# EOF. Index: xc/packager/tarball/Imakefile =================================================================== RCS file: xc/packager/tarball/Imakefile diff -N xc/packager/tarball/Imakefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/tarball/Imakefile 26 Nov 2004 03:22:22 -0000 @@ -0,0 +1,15 @@ +XCOMM $Xorg: Imakefile,v 1.1 2003/02/10 19:54:53 gisburn Exp $ + +#if InstallXF86EncodingFiles +INSTALLXF86ENCODINGFILES=1 +#else +INSTALLXF86ENCODINGFILES=0 +#endif /* InstallXF86EncodingFiles */ + +FONT_ENCODINGS_PATH = XF86EncodingsPath +FONT_ENCODINGS_DIRECTORY = $(FONT_ENCODINGS_PATH)/encodings.dir + +make_xprint_tarball:: + XPRINTDIR=$(XPRINTDIR) XBINDIR=$(BINDIR) XTOP=$(TOP) XMANPATH=$(MANPATH) XFONTENCPATH=$(FONT_ENCODINGS_PATH) XINSTALLXF86ENCODINGFILES=$(INSTALLXF86ENCODINGFILES) ; \ + export XPRINTDIR XBINDIR XTOP XMANPATH XFONTENCPATH XINSTALLXF86ENCODINGFILES ; \ + $(SHELL) make_xprint_binary_tarball.sh Index: xc/packager/tarball/README_tarball =================================================================== RCS file: xc/packager/tarball/README_tarball diff -N xc/packager/tarball/README_tarball --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/tarball/README_tarball 26 Nov 2004 03:22:26 -0000 @@ -0,0 +1,121 @@ + +Xprint server for Linux/AIX/IRIX README + +8th release of the Xprt (X11 print server) build from xprint.mozdev.org sources + +Disclaimer: +We do not guarantee that any source code or executable code available from the +in this package is Year 2000 compliant, works in any way or may not eat your +harddisk alive. + +Please read the the Xprint_FAQ.txt how to configure Xprint. + +* Installation and usage + (short version, reading the Xprint_FAQ.txt first is better): +a) For the impatient, the hurry or if you do not have the "root"-password or if + you do not want to try this as "root": + 1. Unpack the tarball to your favourite dir: + % mkdir /tmp/test_xprint + % cd /tmp/test_xprint + % gunzip -c xprint_linux_tarball.tar.gz | tar -xvf - + + 2. Start the Xprint server + ("./run_xprint_from_tarball.sh" is a wrapper script + for the "/etc/init.d/xprint" script which tells that script where the + Xprint server files are currently be located.) + % cd xprint + % ./run_xprint_from_tarball.sh start + + 3. Set the ${XPSERVERLIST} env var (and/or put this into your shell profile, + do not forget to specify the _full_ path to the "run_xprint_from_tarball.sh" + script): + # sh + % XPSERVERLIST="`./run_xprint_from_tarball.sh get_xpserverlist`" + % export XPSERVERLIST + + # ksh/bash syntax + % export XPSERVERLIST="$(./run_xprint_from_tarball.sh get_xpserverlist)" + + 4. Verifying that Xprint is running and working + (this is usually "done" by /usr/X11R6/bin/xplsprinters - but the + "./run_xprint_from_tarball.sh" / "/etc/init.d/xprint" scripts provide + a wrapper for that tool, too): + % ./run_xprint_from_tarball.sh lsprinters + + 5. Run the application you want to use + % /usr/local/bin/bin/mozilla + + * Alternatively you can replace step [3] and [5] with: + % ./run_xprint_from_tarball.sh wrapper /usr/local/bin/bin/mozilla + +a) If you have adminstrator priviledges ("root") on your machine: + # There are binary and source RPMs for Linux, *.deb packages for Debian and + # *.pkg packages for Solaris available at http://xprint.mozdev.org, + # the tarball installation is only for those platforms which are not coverd + # by the list above or for those people who only want to run Xprint per-user + # without installing it permanently <-- + + 1. Make sure that you eliminate any existing Xfree86-based Xprt servers. + All Xprt binares build from Xfree86 sources up to today are broken and + will not work. + Example: + % which Xprt + /usr/X11R6/bin/Xprt + % mv /usr/X11R6/bin/Xprt /usr/X11R6/bin/Xprt_xf86_disabled + + 2. Copy the files in dist/usr into the matching dirs on your hard disk: + Example: + % (cd install; chmod -R og=u,og-w . ; tar -cf - usr etc) | (cd / ; tar -xf -) + + 3. Start X print server: + % /etc/init.d/xprint start + + 4. Make the info available where the applications can find Xprint server(s): + For all users (maybe in /etc/profile): + % XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`" + % export XPSERVERLIST + (this step is optional for systems which support /etc/profile.d/ ; the tarball + comes with /etc/profile.d/xprint.sh and /etc/profile.d/xprint.csh which will + set the XPSERVERLIST env var for all users if the Xprint servers are running) + + # Do not set $DISPLAY to the Xprt server. You still need your normal + # Xserver for your video card(=framebuffer) - Xprt is only for your + # printer(s). + + 5. Verifying that Xprint is running and working + % /usr/X11R6/bin/xplsprinters + OR + % ./run_xprint_from_tarball.sh lsprinters + +* Top two of the issues on Linux (all items from the FAQ): + ("P"=problem, "B"=background, "S"=solution", "W"=Workaround) + 1. P: "Printing works but the printout is covers only 1/4 of the page" + B: This is usually an indicator for a wrong DPI setting. The default + "PSdefault" model config uses 300DPI but some printers use 600DPI. + W: Edit ${XPCONFIGDIR}/C/print/attributes/document and replace the line + "*default-printer-resolution: 300" with + "*default-printer-resolution: 600" + S: Create a model-config for your printer which only contains attributes + supported by your printer (read the docs... :) + + 2. P: "Printing works but I get large borders..." + B: Same issue as issue [2] - wrong DPI + S: Check the DPI value and adjust it as described in [2]. Common DPI + values are 240, 300, 360, 400 and 600 DPI. + +More info will follow when I have time, take a look at the Xprint pages at +http://xprint.mozdev.org/ in the meantime... + +---- + +Bye, +Roland + +-- + __ . . __ + (o.\ \/ /.o) roland.mainz@nrubsig.org + \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer + /O /==\ O\ TEL +49 2426 901568 FAX +49 2426 901569 + (;O/ \/ \O;) + + Index: xc/packager/tarball/make_xprint_binary_tarball.sh =================================================================== RCS file: xc/packager/tarball/make_xprint_binary_tarball.sh diff -N xc/packager/tarball/make_xprint_binary_tarball.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/tarball/make_xprint_binary_tarball.sh 26 Nov 2004 03:22:26 -0000 @@ -0,0 +1,356 @@ +#!/bin/sh +# +# make_xprint_binary_tarball.sh - packager script for Xprint stuff +# +# $Xorg: make_xprint_binary_tarball.sh,v 1.2 2003/02/09 04:41:52 gisburn Exp $ +# +# This script creates a binary tarball for Xprint stuff (Xprt, Xprt config +# files and Xprint helper applications. +# +# Written by Roland Mainz +# + +# These should be provided by Imakefile +#XTOP=.. +#XPRINTDIR=/usr/openwin/lib/X11/xserver +#XBINDIR=/usr/openwin/bin +# +# XPDESTTARFILE may be optionally set as a command line argument to give the +# destination filepath for the tarball, otherwise it will be found in /tmp. +# Note that the tarball is automatically compressed (to .gz, if gzip is +# available, otherwise to .Z); your name for XPDESTTARFILE should reflect this. + +PATH=/usr/bin:/bin:/usr/sbin:/sbin +if [ "`uname -s`" = "SunOS" ] ; then + PATH=/usr/xpg4/bin:/usr/ccs/bin:${PATH} +fi +export PATH + +fatal_error() +{ + echo "${this_script}: ## FATAL ERROR: ${1}" 1>&2 + exit 1 +} + +# Check if mandatory env vars have been set +[ "${XTOP}" = "" ] && fatal_error "XTOP env var not set." +[ "${XPRINTDIR}" = "" ] && fatal_error "XPRINTDIR env var not set." +[ "${XBINDIR}" = "" ] && fatal_error "XBINDIR env var not set." +[ "${XMANPATH}" = "" ] && fatal_error "XMANPATH env var not set." +[ "${XFONTENCPATH}" = "" ] && fatal_error "XFONTENCPATH env var not set." +[ "${XINSTALLXF86ENCODINGFILES}" = "" ] && fatal_error "XINSTALLXF86ENCODINGFILES env var not set." + + +# Do not edit +# REL_* vars are paths relative to '/' +# Thanks to the "wonders" of some /bin/sh I cannot use ... +# REL_XPRINTDIR=${XPRINTDIR#*/} +# REL_XBINDIR=${XBINDIR#*/} +# ... ;-( +REL_XPRINTDIR="`echo ${XPRINTDIR} | sed 's/\///'`" +REL_XBINDIR="`echo ${XBINDIR} | sed 's/\///'`" +REL_XMANPATH="`echo ${XMANPATH} | sed 's/\///'`" +REL_XFONTENCPATH="`echo ${XFONTENCPATH} | sed 's/\///'`" + +XPINSTALL_SESSION="`date +%y%m%d%H%M%S`" +XPINSTALLDIR_BASE=/tmp/xpinstall_${XPINSTALL_SESSION} +XPINSTALLDIR=${XPINSTALLDIR_BASE}/xprint +XPINSTALLDIR_X11=${XPINSTALLDIR}/install +XPLOGFILE=/tmp/xpinstall_${XPINSTALL_SESSION}.log +XPTARFILE=/tmp/xprint_server_${XPINSTALL_SESSION}.tar + +CURR_DIR="`pwd`" + +DO_BUILD=false + +# List of files/dirs which should be put into the tarball +if [ "`uname -s`" = "FreeBSD" ] ; then + REL_XETCDIR="`echo ${XBINDIR} | sed 's/\///' | sed 's/bin/etc/'`" +else + REL_XETCDIR="etc" +fi +BINFILELIST=" \ + xprint/install/${REL_XBINDIR}/Xprt \ + xprint/install/${REL_XBINDIR}/xplsprinters \ + xprint/install/${REL_XBINDIR}/xprehashprinterlist \ + xprint/install/${REL_XBINDIR}/xphelloworld \ + xprint/install/${REL_XBINDIR}/xpxthelloworld \ + xprint/install/${REL_XBINDIR}/xpsimplehelloworld \ + xprint/install/${REL_XBINDIR}/pclcomp \ + xprint/install/${REL_XBINDIR}/xdpr \ + xprint/install/${REL_XBINDIR}/xpr \ + xprint/install/${REL_XETCDIR} \ + xprint/install/${REL_XPRINTDIR} \ + xprint/install/${REL_XPRINTDIR}/C/print/models/PSdefault/fonts/fonts.dir \ + xprint/install/${REL_XPRINTDIR}/C/print/models/PSdefault/fonts/Courier.pmf \ + xprint/install/${REL_XPRINTDIR}/C/print/attributes/document \ + xprint/install/${REL_XPRINTDIR}/en_US/print/attributes/document \ + xprint/install/${REL_XMANPATH} \ + xprint/run_xprint_from_tarball.sh \ + xprint/README" + +# Solaris/CDE1.x || AIX/CDE extra files +if [ "`uname -s`" = "SunOS" -o "`uname -s`" = "AIX" ] ; then + BINFILELIST="${BINFILELIST} \ + xprint/install/usr/dt/config/Xsession.d" +fi + +# Should we install our own copies of the XF86 encoding files ? +if [ ${XINSTALLXF86ENCODINGFILES} -eq 1 ] ; then + BINFILELIST="${BINFILELIST} \ + xprint/install/${REL_XFONTENCPATH}" +fi + +# List of manual page names (suffix is omitted here since it differs +# from platform to platform) +MANPAGELIST=" \ + Xprint. \ + Xprt. \ + xplsprinters. \ + xprehashprinterlist. \ + xphelloworld \ + xpxthelloworld. \ + xpawhelloworld. \ + xpxmhelloworld. \ + xpsimplehelloworld. \ + pclcomp. \ + xdpr. \ + xpr." + +step=0 + +umask 022 + +inc_step_counter() +{ + step=`expr ${step} + 1` +} + +has_gzip() +{ + for i in `echo ${PATH} | tr ":" " "` + do + if [ -x "${i}/gzip" ] ; then + return 0 + fi + done + + return 1 +} + +# Step 1: +# Build xc/ tree... +if ${DO_BUILD} ; then + inc_step_counter + echo "## Step ${step}: Building..." + ( + ( + cd ${XTOP} + if make World 2>&1 | tee -a buildlog.log >&${XPLOGFILE} ; then + echo "Build OK." + else + echo "Build failed:" + echo "-- snip --" + tail ${XPLOGFILE} + echo "-- snip --" + exit 1 + fi + ) + ) + echo "## Build completed DONE." +fi # ${DO_BUILD} + +# Step 2: +# Verification... +inc_step_counter +echo "## Step ${step}: Verifying..." +( + status=true + + if [ ! -x ${XTOP}/programs/Xserver/Xprt ] ; then + echo "error: X print server (${XTOP}/programs/Xserver/Xprt) binary missing." + status=false + fi + + if [ ! -x ${XTOP}/programs/xplsprinters/xplsprinters ] ; then + echo "error: ${XTOP}/programs/xplsprinters/xplsprinters binary missing." + status=false + fi + + if [ ! -x ${XTOP}/programs/xprehashprinterlist/xprehashprinterlist ] ; then + echo "error: ${XTOP}/programs/xprehashprinterlist/xprehashprinterlist binary missing." + status=false + fi + + if [ ! -x ${XTOP}/programs/xphelloworld/xpxthelloworld/xpxthelloworld ] ; then + echo "error: ${XTOP}/programs/xphelloworld/xpxthelloworld/xpxthelloworld binary missing." + status=false + fi + + if [ ! -x ${XTOP}/programs/xphelloworld/xphelloworld/xphelloworld ] ; then + echo "error: ${XTOP}/programs/xphelloworld/xphelloworld/xphelloworld binary missing." + status=false + fi + + if [ ! -x ${XTOP}/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld ] ; then + echo "error: ${XTOP}/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld binary missing." + status=false + fi + + if ${status} ; then + echo "No errors found." + else + fatal_error "Verification failed." + fi +) +[ $? != 0 ] && exit 1; +echo "## Verification DONE." + +# Step 3: +# Install into temp. location +inc_step_counter +echo "## Step ${step}: Install into temporary location..." +( + [ -d ${XPINSTALLDIR} ] && fatal_error "Temp. installation dir ${XPINSTALLDIR} already exists." + mkdir -p ${XPINSTALLDIR} + [ ! -d ${XPINSTALLDIR} ] && fatal_error "Could not create temp. installation dir ${XPINSTALLDIR}." + + mkdir ${XPINSTALLDIR_X11} + [ ! -d ${XPINSTALLDIR_X11} ] && fatal_error "Could not create temp. installation dir ${XPINSTALLDIR_X11}." + + ( + cd ${XTOP} + + # Install binaries, config files etc. + if make install DESTDIR=${XPINSTALLDIR_X11} >>${XPLOGFILE} 2>&1 ; then + echo "Installation (1/3) OK." + else + echo "Installation (1/3) failed:" + echo "-- snip --" + tail ${XPLOGFILE} + echo "-- snip --" + exit 1 + fi + + # Install manual pages... + if make install.man DESTDIR=${XPINSTALLDIR_X11} >>${XPLOGFILE} 2>&1 ; then + echo "Installation (2/3) OK." + else + echo "Installation (2/3) failed:" + echo "-- snip --" + tail ${XPLOGFILE} + echo "-- snip --" + exit 1 + fi + + # Copy tarball startxprint.sh and README_tarball + cp "${CURR_DIR}/README_tarball" "${XPINSTALLDIR}/README" + cp "${CURR_DIR}/startxprint.sh" "${XPINSTALLDIR}/run_xprint_from_tarball.sh" + chmod a+rx "${XPINSTALLDIR}/run_xprint_from_tarball.sh" + echo "Installation (3/3) OK." + + # Search the ${XPINSTALLDIR_X11}/${REL_XMANPATH} dir for manual pages which + # do not occur in the ${MANPAGELIST} list and remove those files + cd ${XPINSTALLDIR_X11}/${REL_XMANPATH} + for i in */*.* ; do + NO_MATCH="true" + + for j in ${MANPAGELIST} ; do + [ "`echo "${i}" | fgrep "${j}"`" != "" ] && NO_MATCH="false" + done + + if ${NO_MATCH} ; then + rm -f "${i}" + fi + done + ) +) +[ $? != 0 ] && exit 1; +echo "## Temp. installation DONE." + +# Step 4: +# Verify installation +inc_step_counter +echo "## Step ${step}: Verifying installation..." +( + # Part 1: Test for missing files + cd ${XPINSTALLDIR_BASE} + status=true + for i in ${BINFILELIST} ; do + if [ ! -r ${i} ] ; then + echo "File ${i} missing." + status=false + fi + done + + # Part 2: Test "PSdefault" printer model + cd ${XPINSTALLDIR_BASE} + x=`cat "xprint/install/${REL_XPRINTDIR}/C/print/models/PSdefault/fonts/fonts.dir" | wc -l` + if [ "$x" -ne 31 ] ; then + echo "PSdefault model fonts.dir misses font entries." + status=false + fi + + if ${status} ; then + echo "No errors found." + else + fatal_error "Verification failed." + fi +) +[ $? != 0 ] && exit 1; +echo "## Verification of installation DONE." + +# Step 5.a: +# Create binary tarball +inc_step_counter +echo "## Step ${step}: Create binary tarball..." +( + cd ${XPINSTALLDIR_BASE} + if has_gzip ; then + tar -cf - ${BINFILELIST} | gzip --best --stdout >${XPTARFILE}.gz + else + tar -cf - ${BINFILELIST} | compress >${XPTARFILE}.Z + fi +) +[ $? != 0 ] && exit 1; +echo "## Binary tarball creation DONE." + +# Step 5.b: +# Copy binary tarball to destination, if required. +if [ "${XPDESTTARFILE}" != "" ] ; then + inc_step_counter + echo "## Step ${step}: Copying binary tarball to destination..." + ( + if has_gzip ; then + mv ${XPTARFILE}.gz ${XPDESTTARFILE} + else + mv ${XPTARFILE}.Z ${XPDESTTARFILE} + fi + ) + echo "## Copying tarball to destination DONE." +fi + +# Step 6: +# Cleaning up +inc_step_counter +echo "## Step ${step}: Cleaning up..." +( + # Be carefull... =:-) + if [ "${XPINSTALLDIR_BASE}" != "/" ] ; then + rm -Rf ${XPINSTALLDIR_BASE} + fi +) +echo "## Cleanup done." + + +# Done. +echo "#### Binary tarball is now available at " +if [ "${XPDESTTARFILE}" != "" ] ; then + ls -l ${XPDESTTARFILE}* +else + ls -l ${XPTARFILE}* +fi +echo "#### All done." + +exit 0 +# EOF. Index: xc/packager/tarball/startxprint.sh =================================================================== RCS file: xc/packager/tarball/startxprint.sh diff -N xc/packager/tarball/startxprint.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xc/packager/tarball/startxprint.sh 26 Nov 2004 03:22:26 -0000 @@ -0,0 +1,85 @@ +#!/bin/sh +# +# Copyright (c) 2003-2004 by Roland Mainz +# All rights reserved. +# +#ident "@(#)startxprint.sh 0.1 2003/02/08 gisburn" +# +# (Hack-like) wrapper script to use /etc/init.d/xprint directly from a +# tarball without the need to be "root" nor to do any special installation +# steps +# +############################################################################ + +# Force use of a POSIX conformant sh +# (Solaris /sbin/sh is plain Bourne shell) +[ "$1" != "posix_sh_forced" -a -x /usr/dt/bin/dtksh ] && exec /usr/dt/bin/dtksh "$0" posix_sh_forced "$@" +[ "$1" != "posix_sh_forced" -a -x /bin/ksh93 ] && exec /bin/ksh93 "$0" posix_sh_forced "$@" +[ "$1" != "posix_sh_forced" -a -x /bin/ksh ] && exec /bin/ksh "$0" posix_sh_forced "$@" +[ "$1" != "posix_sh_forced" -a -x /bin/bash ] && exec /bin/bash "$0" posix_sh_forced "$@" +[ "$1" != "posix_sh_forced" -a -x /usr/local/bin/ksh93 ] && exec /usr/local/bin/ksh93 "$0" posix_sh_forced "$@" +[ "$1" != "posix_sh_forced" -a -x /usr/local/bin/ksh ] && exec /usr/local/bin/ksh "$0" posix_sh_forced "$@" +[ "$1" != "posix_sh_forced" -a -x /usr/local/bin/bash ] && exec /usr/local/bin/bash "$0" posix_sh_forced "$@" +if [ "$1" != "posix_sh_forced" ] ; then + echo "${0}: ## FATAL ERROR: No POSIX-shell found." 1>&2 + exit 1 +fi + + +shift # Drop "posix_sh_forced" + +PATH=/usr/sbin:/usr/bin:/sbin:/bin +export PATH + +fatal_error() +{ + echo "${this_script}: ## FATAL ERROR: ${1}" 1>&2 + exit 1 +} + +relpath2abspath() +{ + ( + dirpart="`dirname "${1}"`" + basepart="`basename "${1}"`" + + echo "`cd "${dirpart}" ; pwd`/${basepart}" + ) + return 0 +} + +##### main +this_script="$(relpath2abspath "${0}")" +unpackdir="$(dirname "${this_script}")/install" +if [ -d ${unpackdir}/usr/X11R6/etc/rc.d ]; then +xinitdir="usr/X11R6/etc/rc.d" +else +xinitdir="etc/init.d" +fi + +## prechecks +[ ! -d "${unpackdir}/usr" ] && fatal_error "${unpackdir}/usr not found" +[ ! -r "${unpackdir}/${xinitdir}/xprint" ] && fatal_error "${unpackdir}/${xinitdir}/xprint not found" + +xprt_path="$(find "${unpackdir}" -name Xprt -print)" +xplsprinters_path="$(find "${unpackdir}" -name xplsprinters -print)" +psdefault_path="$(find "${unpackdir}" -name PSdefault -print)" +xf86encodingsdir_path="$(find "${unpackdir}" -name encodings.dir -print)" + +[ "${psdefault_path}" = "" ] && fatal_error "no PSdefault model found in ${unpackdir}" +[ "${xprt_path}" = "" ] && fatal_error "no Xprt binary found in ${unpackdir}" +[ "${xplsprinters_path}" = "" ] && fatal_error "no xplsprinters binary found in ${unpackdir}" +[ ! -r "${psdefault_path}" ] && fatal_error "PSdefault model \"${psdefault_path}\" found in ${unpackdir} not accessible" +[ ! -x "${xprt_path}" ] && fatal_error "Xprt binary \"${xprt_path}\" found in ${unpackdir} not accessible/executable" + +xpconfig_dir="${psdefault_path%*/C/print/models/PSdefault}" + +# run the "/etc/init.d/xprint start" using the binaries/config files/scripts in the tarball +ETC_INITD_XPRINT_XPRT_PATH="${xprt_path}" +ETC_INITD_XPRINT_XPLSPRINTERS_PATH="${xplsprinters_path}" +ETC_INITD_XPRINT_XPCONFIGDIR="${xpconfig_dir}" +ETC_INITD_XPRINT_XF86ENCODINGSDIR="${xf86encodingsdir_path}" +export ETC_INITD_XPRINT_XPRT_PATH ETC_INITD_XPRINT_XPCONFIGDIR ETC_INITD_XPRINT_XPLSPRINTERS_PATH ETC_INITD_XPRINT_XF86ENCODINGSDIR +/bin/sh "${unpackdir}/${xinitdir}/xprint" "$@" + +# EOF. Index: xc/programs/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Imakefile,v retrieving revision 1.11 diff -u -2 -0 -r1.11 Imakefile --- xc/programs/Imakefile 31 Oct 2004 02:14:05 -0000 1.11 +++ xc/programs/Imakefile 26 Nov 2004 03:22:26 -0000 @@ -116,44 +116,26 @@ #if BuildFontconfigLibrary FCDIRS = fc-cache fc-list #endif #if 0 FCLANGDIR = fc-lang #endif #if BuildXDriInfo XDRIINFO = xdriinfo #endif #if BuildXaw XMORE = xmore #endif #if BuildServersOnly || !BuildClients SUBDIRS = $(XSSRCDIR) #else SUBDIRS = \ - appres bdftopcf bitmap \ - $(SCREENSAVESRCDIR) editres $(FCDIRS) $(FCLANGDIR) fslsfonts fstobdf \ - iceauth ico listres luit \ - $(MAKEPSRESDIR) $(DPSCLIENTDIRS) $(DBECLIENTDIRS) \ - $(MKCFMSRCDIR) \ - mkfontdir $(MKFONTSCALEDIR) oclock $(PROXYMGRSRCDIR) \ - $(RGBSRCDIR) $(RSTARTSRCDIR) showfont \ - $(SMPROXYSRCDIR) $(TWMSRCDIR) viewres x11perf xauth xbiff xcalc \ - xclipboard xclock \ - xcmsdb $(XCONSOLESRCDIR) xditview $(XDMSRCDIR) xdpyinfo \ - $(XF86DGASRCDIR) xedit xev xeyes xfd xfontsel $(XFSSRCDIR) xfsinfo \ - $(XFINDPROXYSRCDIR) $(XFWPSRCDIR) $(XGAMMASRCDIR) xgc $(XHOSTSRCDIR) \ - $(XINITSRCDIR) $(XKBSRCDIRS) xkill $(XLOADDIR) xlogo xlsatoms \ - xlsclients xlsfonts xmag xman xmessage xmh xmodmap $(XMORE) xprop \ - xrdb xrefresh $(XRXSRCDIR) xset \ - xsetroot $(XSMSRCDIR) xstdcmap $(XINPUTCLIENTDIRS) \ - $(XTERMSRCDIR) $(XTRAPCLIENTDIRS) $(XVIDTUNESRCDIR) xwd xwininfo xwud \ - $(XPMCLIENTDIRS) $(XVINFOSRCDIR) $(XPRASTERFILTERDIRS) \ - $(XSSRCDIR) $(XASSRCDIR) $(LBXPROXYSRCDIR) $(XPSRCDIRS) $(SCRIPTSDIR) \ - $(GLXCLIENTDIRS) $(XRANDRDIR) $(XCURSORGENDIR) $(XDRIINFO) + mkfontdir $(MKFONTSCALEDIR) $(XPRASTERFILTERDIRS) \ + $(XSSRCDIR) $(XPSRCDIRS) $(SCRIPTSDIR) #endif MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS))