Changes between Initial Version and Version 1 of EncapManMkencap


Ignore:
Timestamp:
08/11/06 07:09:19 (15 years ago)
Author:
dclark
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EncapManMkencap

    v1 v1  
     1{{{ 
     2#!html 
     3<H2>NAME</H2> 
     4 
     5mkencap - Encap package creation tool 
     6<A NAME="lbAC">&nbsp;</A> 
     7<H2>SYNOPSIS</H2> 
     8 
     9<B>mkencap [options] -b [-DUPCBIT] \ 
     10<BR> 
     11 
     12<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-m&nbsp;m4_cmd]&nbsp;[-M&nbsp;m4_outfile]&nbsp;\ 
     13<BR> 
     14 
     15<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-d&nbsp;download_dir]&nbsp;[-F&nbsp;environment_file]&nbsp;\ 
     16<BR> 
     17 
     18<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[-O&nbsp;build_tree]&nbsp;[-S&nbsp;src_tree]&nbsp;profile 
     19<P> 
     20mkencap [options] \ 
     21<BR> 
     22 
     23<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;-e&nbsp;[-n]&nbsp;[-a&nbsp;&quot;encapinfo_directive&nbsp;...&quot;]&nbsp;]&nbsp;\ 
     24<BR> 
     25 
     26<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;-c&nbsp;[-o&nbsp;outfile]&nbsp;]&nbsp;pkgspec</B> 
     27<A NAME="lbAD">&nbsp;</A> 
     28<H2>VERSION</H2> 
     29 
     30This man page documents version 2.3 of <B>mkencap</B>. 
     31<A NAME="lbAE">&nbsp;</A> 
     32<H2>DESCRIPTION</H2> 
     33 
     34<B>mkencap</B> is a tool to help create <I>Encap</I> 2.1 packages.  It can 
     35create package directories, generate <I>encapinfo</I> files, and create 
     36package archives. 
     37<A NAME="lbAF">&nbsp;</A> 
     38<H2>MODES</H2> 
     39 
     40Any combination of these modes may be specified when <B>mkencap</B> is 
     41invoked.  Directory initialization is done first, if selected.  Then, 
     42if the <I>encapinfo</I> file is needed, it is created.  Finally, a tar 
     43archive is created if desired. 
     44<DL COMPACT> 
     45<DT><B>-b</B> 
     46 
     47<DD> 
     48Build the package from a profile.  If the <I>-b</I> option is specified, 
     49<I>package</I> should be the path to the file containing the package's 
     50profile.  (See <B>PACKAGE PROFILE OPTIONS</B> below for other related 
     51options.) 
     52<DT><B>-e</B> 
     53 
     54<DD> 
     55Create an <I>encapinfo</I> file in the package directory. 
     56(See <B>ENCAPINFO OPTIONS</B> below for other related options.) 
     57<DT><B>-c</B> 
     58 
     59<DD> 
     60Create archive.  <B>mkencap</B> will create a (optionally compressed) 
     61tar archive of <I>package</I>.  (See <B>ARCHIVE CREATION OPTIONS</B> 
     62below for other related options.) 
     63</DL> 
     64<P> 
     65 
     66If none of these options are selected, <B>mkencap</B> will create an 
     67<I>encapinfo</I> file and a tar archive. 
     68<A NAME="lbAG">&nbsp;</A> 
     69<H2>GENERAL OPTIONS</H2> 
     70 
     71These options may be used in combination with any other options: 
     72<DL COMPACT> 
     73<DT><B>-E encap_format</B> 
     74 
     75<DD> 
     76Specify the Encap package format version of the new package.  The 
     77default is <I>2.1</I>. 
     78<DT><B>-p platform</B> 
     79 
     80<DD> 
     81Set the package's Encap platform name to <I>platform</I>.  If this option 
     82is not specified, the platform name is set to that of the host that 
     83<B>mkencap</B> is running on. 
     84<DT><B>-A platform_suffix</B> 
     85 
     86<DD> 
     87Appends <I>platform_suffix</I> to the package's Encap platform name. 
     88<DT><B>-f</B> 
     89 
     90<DD> 
     91Force <B>mkencap</B> to overwrite an existing <I>encapinfo</I> file. 
     92<DT><B>-q</B> 
     93 
     94<DD> 
     95Quiet mode.  Only error messages are output to stdout. 
     96<DT><B>-s source_dir</B> 
     97 
     98<DD> 
     99Tells <B>mkencap</B> to use <I>source_dir</I> as the <I>Encap</I> source 
     100directory.  If the source is not specified but the target is, 
     101<B>mkencap</B> will assume the relative path from the target to the 
     102source is <I>encap/</I>.  If neither is specified, <B>mkencap</B> will check the 
     103contents of the ENCAP_SOURCE environment variable.  If that is 
     104not set, it will use the default set at compile-time (usually 
     105<I>/usr/local/encap</I>). 
     106<DT><B>-t target_dir</B> 
     107 
     108<DD> 
     109Tells <B>mkencap</B> to use <I>target_dir</I> as the <I>Encap</I> target 
     110directory.  If the target is not specified but the source is, 
     111<B>mkencap</B> will assume the relative path from the source to the 
     112target is <I>../</I>.  If neither is specified, <B>mkencap</B> will check the 
     113contents of the <B>ENCAP_TARGET</B> environment variable.  If that is 
     114not set, it will use the default set at compile-time (usually 
     115<I>/usr/local</I>). 
     116<DT><B>-v</B> 
     117 
     118<DD> 
     119Increase verbosity.  This option can be specified multiple times. 
     120<DT><B>-V</B> 
     121 
     122<DD> 
     123Print <B>mkencap</B> version and compile-time defaults. 
     124</DL> 
     125<A NAME="lbAH">&nbsp;</A> 
     126<H2>PACKAGE PROFILE OPTIONS</H2> 
     127 
     128These options are only meaningful when processing package profiles (see 
     129<I>-b</I> option above): 
     130<DL COMPACT> 
     131<DT><B>-D</B> 
     132 
     133<DD> 
     134Download source distribution if not already present.  The downloaded 
     135file is placed in the common source tree. 
     136<DT><B>-U</B> 
     137 
     138<DD> 
     139Unpack source distribution. 
     140<DT><B>-P</B> 
     141 
     142<DD> 
     143Apply any necessary patches to source distribution. 
     144<DT><B>-C</B> 
     145 
     146<DD> 
     147Configure source distribution. 
     148<DT><B>-B</B> 
     149 
     150<DD> 
     151Build source distribution. 
     152<DT><B>-I</B> 
     153 
     154<DD> 
     155Install source distribution to create an Encap package. 
     156(This usually needs to be done as <I>root</I>.) 
     157<DT><B>-T</B> 
     158 
     159<DD> 
     160Tidy source distribution. 
     161</DL> 
     162<P> 
     163 
     164If none of the <I>-DUPCBIT</I> options are selected, the default 
     165is <I>-DUPCB</I>. 
     166<DL COMPACT> 
     167<DT><B>-m m4_cmd</B> 
     168 
     169<DD> 
     170Use the command <I>m4_cmd</I> to preprocess the package profile. 
     171If the <I>-m</I> option is not specified, <B>mkencap</B> will check the 
     172<I>MKENCAP_M4_COMMAND</I> environment variable.  If that variable is 
     173unset, <B>mkencap</B> will use the string &quot;m4&quot;, which means that it will 
     174use the first <B>m4</B> binary available in the <I>PATH</I>. 
     175<P> 
     176<B>Note:</B> 
     177 
     178The preprocessing command must point to GNU <B>m4</B>.  If the 
     179first <B>m4</B> binary in your <I>PATH</I> is not GNU <B>m4</B>, you must 
     180use either the <I>MKENCAP_M4_COMMAND</I> environment variable or the 
     181<I>-m</I> option to specify the path to GNU <B>m4</B>. 
     182<P> 
     183This option can be used to simply override which <B>m4</B> binary is 
     184used, as in: 
     185<P> 
     186<BR>&nbsp;&nbsp;mkencap&nbsp;-m&nbsp;/usr/local/bin/m4&nbsp;-b&nbsp;pkgspec.ep 
     187<P> 
     188However, it can also be used to add options to be passed to the <B>m4</B> 
     189command, as in: 
     190<P> 
     191<BR>&nbsp;&nbsp;mkencap&nbsp;-m&nbsp;&quot;m4&nbsp;-Dmacro=value&quot;&nbsp;-b&nbsp;pkgspec.ep 
     192<DT><B>-d download_dir</B> 
     193 
     194<DD> 
     195Tells <B>mkencap</B> where to put source files as they are downloaded. 
     196If the <I>-d</I> option is not specified, <B>mkencap</B> will check the 
     197<I>MKENCAP_DOWNLOAD_DIR</I> environment variable.  If that variable is 
     198unset, <B>mkencap</B> will use the default set at compile-time (usually 
     199<I>/usr/local/src</I>). 
     200<DT><B>-F environment_file</B> 
     201 
     202<DD> 
     203Tells <B>mkencap</B> to read environment variable settings from 
     204<I>environment_file</I>.  If the <I>-F</I> option is not specified, 
     205<B>mkencap</B> will use the default set at compile-time (usually 
     206<I>/usr/local/etc/mkencap_environment</I>). 
     207<DT><B>-S src_tree</B> 
     208 
     209<DD> 
     210Tells <B>mkencap</B> where the common source tree is located.  For 
     211packages that can be built in a seperate directory from where the source 
     212code is located, the source code will be stored in the common source 
     213tree.  If the <I>-S</I> option is not specified, <B>mkencap</B> will check 
     214the <I>MKENCAP_SRC_TREE</I> environment variable.  If that variable is 
     215unset, <B>mkencap</B> will store the source code in the build tree. 
     216<DT><B>-O build_tree</B> 
     217 
     218<DD> 
     219Tells <B>mkencap</B> where the build tree is located.  The build tree is 
     220used for building packages from source code.  If the <I>-O</I> option is 
     221not specified, <B>mkencap</B> will check the <I>MKENCAP_BUILD_TREE</I> 
     222environment variable.  If that variable is unset, <B>mkencap</B> will 
     223use the default set at compile-time (usually <I>/usr/local/src</I>). 
     224<P> 
     225If the build tree path contains the string &quot;%p&quot;, it will be replaced 
     226with the platform name. 
     227<DT><B>-M m4_outfile</B> 
     228 
     229<DD> 
     230Tells <B>mkencap</B> to write the output of <B>m4</B> to the file 
     231<I>m4_outfile</I>.  If <I>m4_outfile</I> is &quot;-&quot;, the output will be 
     232written to <I>stdout</I>. 
     233<P> 
     234This option is useful for debugging problems caused by <B>m4</B> 
     235preprocessing. 
     236</DL> 
     237<A NAME="lbAI">&nbsp;</A> 
     238<H2>ENCAPINFO OPTIONS</H2> 
     239 
     240These options are only meaningful when creating an <I>encapinfo</I> file 
     241(see <I>-e</I> option above): 
     242<DL COMPACT> 
     243<DT><B>-n</B> 
     244 
     245<DD> 
     246Do not add default <I>contact</I>, <I>date</I>, and <I>platform</I> fields to 
     247the <I>encapinfo</I> file. 
     248<P> 
     249When adding the <I>contact</I> field, <B>mkencap</B> will first check the 
     250environment variable <I>ENCAP_CONTACT</I>.  If unset, it will use the 
     251username of the invoking user and the hostname of the host it was run on. 
     252<DT><B>-a encapinfo_directive ...</B> 
     253 
     254<DD> 
     255Adds the specified directive to the <I>encapinfo</I> file.  Syntax checking 
     256is done to ensure that the line is parsable. 
     257</DL> 
     258<A NAME="lbAJ">&nbsp;</A> 
     259<H2>ARCHIVE CREATION OPTIONS</H2> 
     260 
     261This option is only meaningful when creating an archive file (see 
     262<I>-c</I> option above): 
     263<DL COMPACT> 
     264<DT><B>-o outfile</B> 
     265 
     266<DD> 
     267Specify the output filename when creating an archive.  If the filename ends 
     268in <I>.tgz</I> or <I>.gz</I>, it is compressed using <B><A HREF="http://www.gzip.org/">gzip</A></B>(1).  If the 
     269filename ends in <I>.Z</I>, it is compressed using <B><A HREF="http://en.wikipedia.org/wiki/Compress">compress</A></B>(1).  If 
     270the filename ends in <I>.bz2</I>, it is compressed using <B><A HREF="http://www.bzip.org/">bzip2</A></B>(1). 
     271<P> 
     272For Encap 2.0 packages, the default is <I>pkgspec.tar.gz</I>. 
     273<P> 
     274For Encap 2.1 packages, the default is 
     275<I>pkgspec-encap-platform.tar.gz</I>.  The <I>platform</I> string will be 
     276read from the <I>encapinfo</I> file. 
     277</DL> 
     278<A NAME="lbAK">&nbsp;</A> 
     279<H2>EXAMPLES</H2> 
     280 
     281To create an <I>encapinfo</I> file for the package &quot;pkg-2.1&quot; with the 
     282directives &quot;linkname bin/foo quux&quot; and &quot;linkname man/man1/foo.1 quux.1&quot;: 
     283<P> 
     284<DL COMPACT><DT><DD> 
     285mkencap -ea &quot;linkname bin/foo quux&quot; \ 
     286<BR> 
     287 
     288<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-a&nbsp;&quot;linkname&nbsp;man/man1/foo.1&nbsp;quux.1&quot;&nbsp;pkg-2.1 
     289</DL> 
     290 
     291<P> 
     292To create an <I>encapinfo</I> file for the package &quot;pkg-3.0&quot; containing 
     293the directives &quot;exclude bin/burfle&quot; and &quot;linkdir lib/pkg&quot;, and create 
     294an archive of the package in your home directory: 
     295<P> 
     296<DL COMPACT><DT><DD> 
     297mkencap -a &quot;exclude bin/burfle&quot; -a &quot;linkname lib/pkg&quot; \ 
     298<BR> 
     299 
     300<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-o&nbsp;~/pkg-3.0-encap-share.tgz&nbsp;pkg-3.0 
     301</DL> 
     302 
     303<A NAME="lbAL">&nbsp;</A> 
     304<H2>ENVIRONMENT VARIABLES</H2> 
     305 
     306<B>ENCAP_SOURCE</B> 
     307 
     308<BR> 
     309 
     310<B>ENCAP_TARGET</B> 
     311 
     312<BR> 
     313 
     314<B>ENCAP_CONTACT</B> 
     315 
     316<BR> 
     317 
     318<B>MKENCAP_DOWNLOAD_DIR</B> 
     319 
     320<BR> 
     321 
     322<B>MKENCAP_SRC_TREE</B> 
     323 
     324<BR> 
     325 
     326<B>MKENCAP_BUILD_TREE</B> 
     327 
     328<BR> 
     329 
     330<B>MKENCAP_M4_COMMAND</B> 
     331 
     332<A NAME="lbAM">&nbsp;</A> 
     333<H2>FILES</H2> 
     334 
     335<I>/usr/local/encap/pkgname/encapinfo</I> 
     336 
     337<BR> 
     338 
     339<I>/usr/local/etc/mkencap_environment</I> 
     340 
     341<A NAME="lbAN">&nbsp;</A> 
     342<H2>SEE ALSO</H2> 
     343 
     344<B><A HREF="/projects/bcfg2/wiki/EncapManEpkg">epkg</A></B>(1), 
     345 
     346<B><A HREF="/projects/bcfg2/wiki/EncapManEncapProfile">encap_profile</A></B>(5) 
     347 
     348<BR> 
     349 
     350The Encap Archive (<I><A HREF="http://www.encap.org/">http://www.encap.org/</A></I>) 
     351<A NAME="lbAO">&nbsp;</A> 
     352<H2>AUTHOR</H2> 
     353 
     354Mark D. Roth &lt;<A HREF="mailto:roth@feep.net">roth@feep.net</A>&gt; 
     355</BODY> 
     356}}}