|-F||Force make of catalog with defaults supplied on command line.|
|-c||Configuration file default is makecat.cfg in Interchange Confdir (etc) directory.|
|-l||File to log to (default makecat.log)|
|-r||Reconfigure defaults normally set in makecat.cfg; this is done automatically the first time the program is run.|
Normally, if makecat 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.
The options set at reconfig time, i.e. the first time the program is run:
|--basedir=directory||Base directory for catalogs. This defaults to catalogs in the home directory of the catalog user.|
|--cgibase=url_fragment||Base URL for link programs. This is normally either blank (your programs are made with .cgi extension) or /cgi-bin (you have a CGI directory).|
|--documentroot=directory||The directory where HTML is based. This is the root directory of the web server, i.e. DocumentRoot.|
|--interchangegroup=group||The default group files should be owned by.|
|--interchangeuser=username||The user ID which runs Interchange.|
|--serverconf=filename||Location of httpd.conf; you will be queried otherwise.|
|--vendroot=filename||Location of Interchange software.|
|--homedir=directory||Use instead of \$HOME to set defaults|
|--catroot=directory||Directory where Interchange catalog files go. This is the base directory for this catalog.|
|--cgidir=directory||The directory the CGI link should go to. This is the CGI directory; if your CGI programs all end in .cgi then this would normally be the same as documentroot; if you have a cgi bin directory it should be used.|
Name of server (www.whatever.domain). You can supply a port:
or a username:
For testing on your local machine, just use localhost.
The path to the CGI link (no server name). For a catalog named
standard, this would normally be one of:
|--demotype=template||The template catalog. The default is <standard>.|
|--mailorderto=email||Email address to send orders|
|--catuser=username||The user files should be owned by (option only operative if root).|
|--samplehtml=directory||The directory where template HTML goes.|
|--imagedir=directory||The directory where template images go.|
|--imageurl=url||The URL to prefix images with.|
|--sharedir=directory||The directory where shared admin images go.|
|--shareurl=url||The URL to prefix shared admin images with.|
|--nocfg||Dont add to interchange.cfg.|
|--nocopy||Dont actually copy the files, just test.|
|--norunning||Dont add to running server.|
|--reference||Return hash of config as string (sets -F, no write). This is for passing back to the makecat program in a autobuild environment.|
|--linkprogram=file||Use file as link program instead of vlink/tlink.|
|--linkmode=mode||UNIX or INET (link program vlink or tlink).|
|--sampleurl=url||URL to access HTML for catalog.|
|--noumask||Dont set umask to the value implied by mode.|
|--catalogconf=file||Use file as configuration file for catalog definitions. This option has been designed for the use with Debian installations.|
makecat needs a template catalog to operate on. The Foundation Store demo template is distributed with Interchange. You can also look for additional demo catalogs (mostly for ideas) at http://www.icdevgroup.org/
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 diff on the template and configured catalog directories:
diff -r interchange/standard catalogs/standard
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 www.mydomain.com at the prompt for server name, then you would see this difference in the catalog.cfg file:
# template Variable SERVER_NAME __MVC_SERVERNAME__ # configured catalog Variable SERVER_NAME www.mydomain.com
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):
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
(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 MVC_ will be substituted for by the makecat script. So if you wanted to set up a configurable parameter to customize the COMPANY variable in catalog.cfg, you could run a pre-qualifying script that set the environment variable MVC_COMPANY and then place in the catalog.cfg file:
Variable COMPANY __MVC_COMPANY__
All files within a template directory are substituted for macros, not just the catalog.cfg file. There are two special directories named html and images. These will be recursively copied to the directories defined as SampleHTML and ImageDir.
<B>IMPORTANT NOTE:B> The template directory is located in the Interchange software directory, i.e. where interchange.cfg 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 standard 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.
In addition to the standard parameters prompted for by Interchange, and the standard catalog creation procedure, you may define four other files in the config directory of the template:
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
All files are paragraph-based; in other words, a blank line (with no spaces) terminates the individual setting.
The additional_fields file contains:
PARAM The prompt. Set PARAM to? The default value of PARAM
This would cause a question during makecat:
The prompt. Set PARAM to?.....[The default value of PARAM]
If the additional_help file is present, you can give additional instructions for PARAM.
PARAM These are additional instructions for PARAM, and they may span multiple lines up to the first blank line.
The prompt would now be:
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]
If the file config/precopy_commands exists, it will be read as a command followed by the prompt/help value.
mysqladmin create __MVC_CATALOGNAME__ We need to create an SQL database for your Interchange database tables.
This will cause the prompt:
We need to create an SQL database for your Interchange database tables. Run command "mysqladmin create test_standard"?
If the response is y or yes, then the command will be run by passing it through the Perl system() function. As with any of the additional configuration files, MVC_PARAM macro substitution is done on the command and help. Obviously you must have proper permissions for the command.
The file config/postcopy_commands is exactly the same as precopy_commands except you are prompted after the catalog files are copied and macro substitution is performed on all files.
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:
Interchange requires Perl 5.6.0 or higher; more information on Perl can be seen at:
Interchange comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute and modify it under the terms of the GNU General Public License.
Copyright 2002-2007 Interchange Development Group. Copyright 1995-2002, Red Hat, Inc. All rights reserved except as in the license.
Mike Heins, <email@example.com>. Please do not contact the author for direct help with the system. Use the Interchange mail list:
Information on subscribing to the list, and general information and documentation for Interchange is at:
|perl v5.20.3||MAKECAT (1)||2016-04-04|