Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > b26d3747694d5d4cfdcb17975313bfaf > files > 7

rpm2html-1.7-1mdk.i586.rpm


	  How does rpm2html works ?
	  =========================

 The input of rpm2html are:
    1/ a list of configuration files
    2/ [optional] a language message file.

 Each configuration file is handled independently as if
if was a new invocation of rpm2html.

 A configuration file represents a list of directories
and a distribution as a whole. All the references between
packages listed in the directories of a single config file
are marked by hyperlinks in the resulting HTML files. Here
is the process leading to the creation of the HTML pages:

  1/ The configuration file is parsed, it sets all the
     default values for rpm2html.
     Then all the directory entries are parsed and a list
     of directories to scan is built.

  2/ For each directory, the RPM are scanned, the HTML
     page describing the package is generated immediately.
     All resources provided and needed by the RPM file
     are stored in a list of resources. A list of parsed
     RPMs is also constructed.

  3/ Once all the RPM for this config file have been scanned
     all resources are dumped in resources files with
     links to the RPM providing them (one could also add the
     RPM needing them but everything needs libc for example).

  4/ The sorted lists of packages are generated by sorting
     the RPM list for various criteria and general front-end
     pages are generated unsing the new list order.

  5/ The main page is generated with links to the various
     front-end pages, statistics and description of the
     packages analyzed.

  6/ All the lists are freed and global variables are reset.

rpm2html is now ready to handle the next configuration file.
     
  A configuration file represent a "distribution" where all
the cross-links makes sense, e.g.:

 -->Dist 
        --> srcs
	--> noarch
	--> i386
	--> sparc
	--> alpha
	--> ppc

 Here is a possible configuration file for such a distribution
where all the HTML files are stored in the same directory:

------------------- config.onedir -----------------
;
; Sample configuration file for rpm2html
; when using a single directory for all HTML output
;

maint=Joe
mail=joe@mydistrib.org
dir=/home/http/html/MyDistrib
url=http://www.mydistrib.org/pub/mydistrib
ftpsrc=ftp://ftp.mydistrib.org/pub/mydistrib/srcs
host=MyDistrib.Org
header=mailto:joe@mydistrib.org Feedback

[/MyDistrib/RPM/srcs]
name=Sources for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/srcs

[/MyDistrib/RPM/noarch]
name=Arch independant packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/noarch

[/MyDistrib/RPM/i386]
name=i386 packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/i386

[/MyDistrib/RPM/alpha]
name=Alpha packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/alpha

[/MyDistrib/RPM/sparc]
name=Sparc packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/sparc

[/MyDistrib/RPM/ppc]
name=PPC packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/ppc

-------------------------------------------------

  In the second example, the front-end HTML
pages are stored in a general directory, as well
as all the resources pages. The HTML pages
are stored in separate directories. To be able
to provide cross linking between HTML pages located
in different directories on the server, the "subdir"
giving the relative URL path for the HTML directories
is needed, e.g. :

----------------- config.multidir ---------------
;
; Sample configuration file for rpm2html
; when using separate directories for the HTML files.
;

maint=Joe
mail=joe@mydistrib.org
dir=/home/http/html/MyDistrib
ftpsrc=ftp://ftp.mydistrib.org/pub/mydistrib/srcs
url=/mydistrib
host=MyDistrib.Org
header=mailto:joe@mydistrib.org Feedback

[/MyDistrib/RPM/srcs]
name=Sources for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/srcs
subdir=srcs

[/MyDistrib/RPM/noarch]
name=Arch independant packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/noarch
ftpsrc=ftp://ftp.mydistrib.org/pub/mydistrib/noarch
subdir=noarch

[/MyDistrib/RPM/i386]
name=i386 packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/i386
subdir=i386

[/MyDistrib/RPM/alpha]
name=Alpha packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/alpha
subdir=alpha

[/MyDistrib/RPM/sparc]
name=Sparc packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/sparc
subdir=sparc

[/MyDistrib/RPM/ppc]
name=PPC packages for MyDistrib
ftp=ftp://ftp.mydistrib.org/pub/mydistrib/ppc
subdir=ppc

-------------------------------------------------

  In that case the HTTP server tree follow closely
the ditribution tree but this is not mandatory.

Daniel.Veillard@apocalypse.org

$Id: PRINCIPLES,v 1.5 1998/04/28 02:25:41 veillard Exp $