.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MAKECAT 1p" .TH MAKECAT 1p "2016-08-31" "perl v5.22.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" makecat \- Build an Interchange catalog from a template .SH "SYNOPSIS" .IX Header "SYNOPSIS" makecat [\-\-options] name .SH "VERSION" .IX Header "VERSION" # \f(CW$Id:\fR makecat.PL,v 2.28 2008\-05\-21 03:05:20 jon Exp $ .SH "INTRODUCTION" .IX Header "INTRODUCTION" The makecat program builds a Interchange catalog from a template based on your server configuration. It interrogates for parameters like the directories to use, \s-1URL\s0 to base the catalog in, \s-1HTTP\s0 server definitions, and file ownership. It is self-documenting in that it asks verbose questions and gives relevant examples. .PP On \s-1UNIX,\s0 if you want to check on something during the process you can usually hit <\s-1CTRL\-Z\s0> to suspend the program and do something and then type \f(CW\*(C`fg\*(C'\fR to return to . Also, if your input begins with an exclamation mark (\f(CW\*(C`!\*(C'\fR), it will be interpreted as a shell command. An exclamation mark (\f(CW\*(C`!\*(C'\fR) alone should drop you into a shell. .PP If you have the \f(CW\*(C`Term::ReadLine::Perl\*(C'\fR and \f(CW\*(C`Term::ReadKey\*(C'\fR modules installed, the <\s-1UP\s0> and <\s-1DOWN\s0> arrows will cycle between suggested defaults; and the following features will be in place: .PP .Vb 9 \& TAB Completes file name \& Cycle suggestion up \& Cycle suggestion down \& Cycle suggestion up \& Cycle suggestion down \& Go back one question (if possible) \& Erase line \& Command\-line editing left \& Command\-line editing left .Ve .PP Also, if you make a mistake at some stage of the interrogation, you can often hit the <\s-1CTRL\-B\s0> key to return to the previous query. If you don't have Term::ReadLine installed, then you can enter an at sign (\f(CW\*(C`@\*(C'\fR) by itself on the line. .SH "OPTIONS" .IX Header "OPTIONS" usage: makecat [options] [catalogname] .PP The makecat program can build a catalog based completely on a command line description. An example is in eg/makecat.sh. .PP There are just a few flag-based options: .ie n .IP """\-F""" 4 .el .IP "\f(CW\-F\fR" 4 .IX Item "-F" Force make of catalog with defaults supplied on command line. .ie n .IP """\-c""" 4 .el .IP "\f(CW\-c\fR" 4 .IX Item "-c" Configuration file \*(-- default is makecat.cfg in Interchange Confdir (etc) directory. .ie n .IP """\-l""" 4 .el .IP "\f(CW\-l\fR" 4 .IX Item "-l" File to log to (default makecat.log) .ie n .IP """\-r""" 4 .el .IP "\f(CW\-r\fR" 4 .IX Item "-r" Reconfigure defaults normally set in makecat.cfg; this is done automatically the first time the program is run. .PP The remainder of the options are supplied on the command line as named parameters followed by an \f(CW\*(C`=\*(C'\fR sign, followed by the value, i.e. .PP .Vb 1 \& \-\-parameter=value .Ve .PP Normally, if \f(CW\*(C`makecat\*(C'\fR supplies a default you might guess at that. It is fairly intelligent if you have an Apache server and it has found the httpd.conf file. If you are on a Netscape or other web server, it is less likely to be right. .PP The options set at reconfig time, i.e. the first time the program is run: .IP "\-\-basedir=directory" 4 .IX Item "--basedir=directory" Base directory for catalogs. This defaults to \f(CW\*(C`catalogs\*(C'\fR in the home directory of the catalog user. .IP "\-\-cgibase=url_fragment" 4 .IX Item "--cgibase=url_fragment" Base \s-1URL\s0 for link programs. This is normally either blank (your programs are made with .cgi extension) or \f(CW\*(C`/cgi\-bin\*(C'\fR (you have a \s-1CGI\s0 directory). .IP "\-\-documentroot=directory" 4 .IX Item "--documentroot=directory" The directory where \s-1HTML\s0 is based. This is the root directory of the web server, i.e. DocumentRoot. .IP "\-\-interchangegroup=group" 4 .IX Item "--interchangegroup=group" The default group files should be owned by. .IP "\-\-interchangeuser=username" 4 .IX Item "--interchangeuser=username" The user \s-1ID\s0 which runs Interchange. .IP "\-\-serverconf=filename" 4 .IX Item "--serverconf=filename" Location of httpd.conf; you will be queried otherwise. .IP "\-\-vendroot=filename" 4 .IX Item "--vendroot=filename" Location of Interchange software. .IP "\-\-homedir=directory" 4 .IX Item "--homedir=directory" Use instead of \e$HOME to set defaults .PP These are options which are required to be set for any catalog; the default will often be correct if you have set the above options correctly. .IP "\-\-catroot=directory" 4 .IX Item "--catroot=directory" Directory where Interchange catalog files go. This is the base directory for this catalog. .IP "\-\-cgidir=directory" 4 .IX Item "--cgidir=directory" The directory the \s-1CGI\s0 link should go to. This is the \s-1CGI\s0 directory; if your \s-1CGI\s0 programs all end in \f(CW\*(C`.cgi\*(C'\fR then this would normally be the same as \f(CW\*(C`documentroot\*(C'\fR; if you have a \f(CW\*(C`cgi bin\*(C'\fR directory it should be used. .IP "\-\-servername=server" 4 .IX Item "--servername=server" Name of server (www.whatever.domain). You can supply a port: .Sp .Vb 1 \& www.foo.com:8080 .Ve .Sp or a username: .Sp .Vb 1 \& www.foo.com/~bar .Ve .Sp For testing on your local machine, just use \f(CW\*(C`localhost\*(C'\fR. .IP "\-\-cgiurl=url_fragment" 4 .IX Item "--cgiurl=url_fragment" The path to the \s-1CGI\s0 link (no server name). For a catalog named \&\f(CW\*(C`standard\*(C'\fR, this would normally be one of: .Sp .Vb 1 \& \-\-cgiurl=/cgi\-bin/standard .Ve .Sp or .Sp .Vb 1 \& \-\-cgiurl=/standard.cgi .Ve .IP "\-\-demotype=template" 4 .IX Item "--demotype=template" The template catalog. The default is . .IP "\-\-mailorderto=email" 4 .IX Item "--mailorderto=email" Email address to send orders .IP "\-\-catuser=username" 4 .IX Item "--catuser=username" The user files should be owned by (option only operative if \f(CW\*(C`root\*(C'\fR). .PP The rest of the parameters need not be supplied on the command line as intelligent defaults can be derived from the above parameters. .IP "\-\-samplehtml=directory" 4 .IX Item "--samplehtml=directory" The directory where template \s-1HTML\s0 goes. .IP "\-\-imagedir=directory" 4 .IX Item "--imagedir=directory" The directory where template images go. .IP "\-\-imageurl=url" 4 .IX Item "--imageurl=url" The \s-1URL\s0 to prefix images with. .IP "\-\-sharedir=directory" 4 .IX Item "--sharedir=directory" The directory where shared admin images go. .IP "\-\-shareurl=url" 4 .IX Item "--shareurl=url" The \s-1URL\s0 to prefix shared admin images with. .IP "\-\-nocfg" 4 .IX Item "--nocfg" Don't add to interchange.cfg. .IP "\-\-nocopy" 4 .IX Item "--nocopy" Don't actually copy the files, just test. .IP "\-\-norunning" 4 .IX Item "--norunning" Don't add to running server. .IP "\-\-reference" 4 .IX Item "--reference" Return hash of config as string (sets \f(CW\*(C`\-F\*(C'\fR, no write). This is for passing back to the makecat program in a autobuild environment. .IP "\-\-linkprogram=file" 4 .IX Item "--linkprogram=file" Use file as link program instead of vlink/tlink. .IP "\-\-linkmode=mode" 4 .IX Item "--linkmode=mode" \&\s-1UNIX\s0 or \s-1INET \s0(link program vlink or tlink). .IP "\-\-sampleurl=url" 4 .IX Item "--sampleurl=url" \&\s-1URL\s0 to access \s-1HTML\s0 for catalog. .IP "\-\-noumask" 4 .IX Item "--noumask" Don't set umask to the value implied by mode. .IP "\-\-catalogconf=file" 4 .IX Item "--catalogconf=file" Use file as configuration file for catalog definitions. This option has been designed for the use with Debian installations. .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`makecat\*(C'\fR needs a template catalog to operate on. The \fIFoundation Store\fR demo template is distributed with Interchange. You can also look for additional demo catalogs (mostly for ideas) at http://www.icdevgroup.org/ .PP \&\fB\s-1IMPORTANT NOTE:\s0\fR You only make a catalog once. All further configuration is done by editing the files within the \fIcatalog directory\fR. .PP A catalog template contains an image of a configured catalog. The best way to see what the makecat program does is to configure the 'standard' demo and then run a recursive \f(CW\*(C`diff\*(C'\fR on the template and configured catalog directories: .PP .Vb 1 \& diff \-r interchange/standard catalogs/standard .Ve .PP You will see that the files are mostly the same, except that certain macro strings have been replaced with the answers you gave to the script. For example, if you answered \f(CW\*(C`www.mydomain.com\*(C'\fR at the prompt for server name, then you would see this difference in the catalog.cfg file: .PP .Vb 2 \& # template \& Variable SERVER_NAME _\|_MVC_SERVERNAME_\|_ \& \& # configured catalog \& Variable SERVER_NAME www.mydomain.com .Ve .PP The macro string _\|_MVC_SERVERNAME_\|_ was substituted with the answer to the question about server name. In the same way, other variables are substituted, and include (at least): .PP .Vb 9 \& MVC_BASEDIR MVC_IMAGEDIR \& MVC_CATROOT MVC_IMAGEURL \& MVC_CATUSER MVC_MAILORDERTO \& MVC_CGIBASE MVC_MINIVENDGROUP \& MVC_CGIDIR MVC_MINIVENDUSER \& MVC_CGIURL MVC_SAMPLEHTML \& MVC_DEMOTYPE MVC_SAMPLEURL \& MVC_DOCUMENTROOT MVC_VENDROOT \& MVC_ENCRYPTOR .Ve .PP (Not all of these are present in the standard template, and quite a few more may be defined.) In fact, any environment variable that is set and begins with \s-1MVC_\s0 will be substituted for by the \f(CW\*(C`makecat\*(C'\fR script. So if you wanted to set up a configurable parameter to customize the \s-1COMPANY\s0 variable in catalog.cfg, you could run a pre-qualifying script that set the environment variable \s-1MVC_COMPANY\s0 and then place in the catalog.cfg file: .PP .Vb 1 \& Variable COMPANY _\|_MVC_COMPANY_\|_ .Ve .PP All files within a template directory are substituted for macros, not just the catalog.cfg file. There are two special directories named \f(CW\*(C`html\*(C'\fR and \f(CW\*(C`images\*(C'\fR. These will be recursively copied to the directories defined as SampleHTML and ImageDir. .PP \&\fB\s-1IMPORTANT NOTE:\s0\fR The template directory is located in the Interchange software directory, i.e. where \f(CW\*(C`interchange.cfg\*(C'\fR resides. You normally do not edit files in the template directory. If you want to try creating your own template, it is recommended that you name it something besides standard and copy the \f(CW\*(C`standard\*(C'\fR demo directory to it as a starting point. Templates are normally placed in the Interchange base directory, but can be located anywhere \*(-- the script will prompt you for location if it cannot find a template. .PP In addition to the standard parameters prompted for by Interchange, and the standard catalog creation procedure, you may define four other files in the \f(CW\*(C`config\*(C'\fR directory of the template: .PP .Vb 4 \& additional_fields \-\- file with more parameters for macro substitution \& additional_help \-\- extended description for the additional_fields \& precopy_commands \-\- commands passed to the system prior to catalog copy \& postcopy_commands \-\- commands passed to the system after catalog copy .Ve .PP All files are paragraph-based; in other words, a blank line (with no spaces) terminates the individual setting. .PP The \fIadditional_fields\fR file contains: .PP .Vb 3 \& PARAM \& The prompt. Set PARAM to? \& The default value of PARAM .Ve .PP This would cause a question during makecat: .PP .Vb 1 \& The prompt. Set PARAM to?.....[The default value of PARAM] .Ve .PP If the \fIadditional_help\fR file is present, you can give additional instructions for \s-1PARAM.\s0 .PP .Vb 3 \& PARAM \& These are additional instructions for PARAM, and they \& may span multiple lines up to the first blank line. .Ve .PP The prompt would now be: .PP .Vb 2 \& These are additional instructions for PARAM, and they \& may span multiple lines up to the first blank line. \& \& The prompt. Set PARAM to?.....[The default value of PARAM] .Ve .PP If the file \fIconfig/precopy_commands\fR exists, it will be read as a command followed by the prompt/help value. .PP .Vb 3 \& mysqladmin create _\|_MVC_CATALOGNAME_\|_ \& We need to create an SQL database for your Interchange \& database tables. .Ve .PP This will cause the prompt: .PP .Vb 2 \& We need to create an SQL database for your Interchange \& database tables. \& \& Run command "mysqladmin create test_standard"? .Ve .PP If the response is \*(L"y\*(R" or \*(L"yes\*(R", then the command will be run by passing it through the Perl \fIsystem()\fR function. As with any of the additional configuration files, \s-1MVC_PARAM\s0 macro substitution is done on the command and help. Obviously you must have proper permissions for the command. .PP The file \fIconfig/postcopy_commands\fR is exactly the same as \fIprecopy_commands\fR except you are prompted \fIafter\fR the catalog files are copied and macro substitution is performed on all files. .SH "ABOUT INTERCHANGE IN GENERAL" .IX Header "ABOUT INTERCHANGE IN GENERAL" Interchange has many, many, functions and features; they are too numerous to describe in this venue. Complete information can be found at its web site: .PP .Vb 1 \& http://www.icdevgroup.org/ .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIinterchange\fR\|(1) .SH "LICENSE" .IX Header "LICENSE" Interchange comes with \s-1ABSOLUTELY NO WARRANTY.\s0 This is free software, and you are welcome to redistribute and modify it under the terms of the \&\s-1GNU\s0 General Public License. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2002\-2008 Interchange Development Group. Copyright 1995\-2002, Red Hat, Inc. All rights reserved except as in the license. .SH "AUTHOR" .IX Header "AUTHOR" Mike Heins, . Please do not contact the author for direct help with the system. Use the Interchange mail list: .PP .Vb 1 \& interchange\-users .Ve .PP Information on subscribing to the list, and general information and documentation for Interchange is at: .PP .Vb 1 \& http://www.icdevgroup.org/ .Ve