Powered by SmartDoc

ENGLISH JAPANESE

Cmmi README

$Date: 2004/06/25 13:29:02 $
Kiyoka Nishiyama
http://www.netfort.gr.jp/~kiyoka/cmmi

What is Cmmi?

  Cmmi is a free software.
  This software is released under the terms ofGNU General Public License
    (GPL2)
  This software is a installation management software for free software.

Abstract

Cmmi helps you to simplify your installation process from '.tar.gz' source
archives.You can be a package manager of your local site, if you are not an
expert of your OS.Cmmi can make Debian, RedHat, Slackware and cygwin packages
efficiently.

Cmmi manages your installation process by following features

  This program can registory a tarball (an tar.gz archive file) to the ~/cmmi
    directory and manage it
  You can customize your particular installation instruction at the .cmmi
    file.

Platform

  Cmmi can be run on cygwin,Debian and RedHat system
  perl5
  UNIX' sh (bash)
  wget
  checkinstall 1.6.0beta3 or the later version.website

How to install

 1. Do 'make install' (cmmi command will be installed to /usr/local/bin
    directory)
 2. Please make '~/cmmi' Direcotry

    % mkdir ~/cmmi

 3. You will see a following message.

    % cmmi
    cmmi 0.x.x
    usage : cmmi [switch]  [install|clean|make|ARCFILE]
      cmmi ARCFILE .... checkin ARCFILE to ~/cmmi/xxxxx/
      cmmi         .... configure and make
      cmmi install .... install
      cmmi clean   .... cleaning work
    switch :
      -v   verbose mode
      -d   debug   mode
      -n   force unset '$PACKAGE_TYPE'



contents of ~cmmi/

notice: Please assume PACKAGE-NAME is a particular name of any packages.

  ~/cmmi/PACKAGE-NAME
      Root directory for managing 'PACKAGE-NAME' package
  ~/cmmi/PACKAGE-NAME/.cmmi
      A description file how to compile and install
  ~cmmi/PACKAGE-NAME/*.tar.gz or ~cmmi/PACKAGE-NAME/*.tgz
      Source archive files
  ~/cmmi/PACKAGE-NAME/build/
      Work directory for building package
  ~/cmmi/PACKAGE-NAME/tmp/
      Work directory for installation (for cygwin only)
  ~/cmmi/PACKAGE-NAME/.url
      the URL of source archive file

        If .url file is exists, you can remove .tar.gz or .tgz files anytime

  ~/cmmi/PACKAGE-NAME/cmmi.script
      A shell script which generated automatically by cmmi(And this script
        will be executed from cmmi)

How to use

  The beheavior of Cmmi depends on position of current directory

In case of current directory is other than '~/cmmi'

  cmmi xxxx.tar.gz
      An archive will be registed to '~/cmmi/xxxx'. (xxxx directory will be
        created automatically)
      Following is an example of execution.

              arcives : gcc-3.4.0.tar.gz
                  dir : gcc-3.4.0
                 move : gcc-3.4.0.tar.gz -> /home/kiyoka/cmmi/gcc-3.4.0
        # (for Emacs shell-mode, Please return)
        cd /home/kiyoka/cmmi/gcc-3.4.0


  cmmi http://xxxx/xxxxx/xxxx.tar.gz
      The .url file will be registed to '~/cmmi/xxxx'. (xxxx directory will
        be created automatically)
      Following is an example of execution.

        $ cmmi \
            ftp://core.ring.gr.jp/pub/GNU/gcc/gcc-3.4.0/gcc-3.4.0.tar.gz
        register URL : \
            ftp://core.ring.gr.jp/pub/GNU/gcc/gcc-3.4.0/gcc-3.4.0.tar.gz \
            -> /home/kiyoka/cmmi/gcc-3.4.0/.url
                  dir : gcc-3.4.0
        # (for Emacs shell-mode, Please return)
        cd /home/kiyoka/cmmi/gcc-3.4.0


  In case of other commands is executed.
      Cmmi displays an usage message.

In case of current directory is '~/cmmi'

  cmmi clean
      Cmmi cleans working data which generated at compiling time.
  In case of other commands is executed.
      Cmmi displays an usage message.

In case of current directory is '~/cmmi/PACKAGE-NAME/'

  cmmi
      'configure ; make' stage will be executed.
  cmmi install
      The package in current directory will be made and installed.
          caution!: if you specify D,R or S to $PACKAGE_TYPE variable, Cmmi
            does not execute installation process. Cmmi only make the package
            file and save it to $TARGET_DIR.
          You can make package file on ordinary user account with
            checkinstall 1.6.0beta3 or later.
  cmmi clean
      Cmmi cleans working data which generated at compiling time.

How to customize '~/.cmmirc' file

An example of '~/.cmmirc'

  Following sample file is included in cmmi's archive as dot.cmmirc.en

# --------------------------------------------------------------
# --- This is a sample file of ~/.cmmirc (English version)   ---
# --------------------------------------------------------------
#
# --- Root of cmmi
# If you want to change root of cmmi to '~/arcdir', you must remove \
    following comment '#' .
#   if you don't define this variable, Cmmi assumes default is '~/cmmi' .
#$ARCHIVE_DIR = 'arcdir';

#
# --- Package type ( D=debian, R=RPM, S=Slackware, C=Cygwin )
# If you don't define this variable, Cmmi assumes Your system has no \
    package system. ( plain installation )
#$PACKAGE_TYPE= 'D';

#
# --- Package repository
#   If you use Debian system, you can apt-get as follow setting.
#   e.g.)
#     username  : kiyoka
#     hostname  :   hoge
#
#     apt-line is 'deb http://hoge/~kiyoka/debian ./'
#     And you must start apache http server.
#
#$PACKAGE_DIR = '/home/kiyoka/public_html/debian';


#
# --- Target directory of installation
#   This variable will be used for configure option --prefix=XXXX.
#$TARGET_PREFIX = '/opt/local';


#
# This is an example of auto recognition of two OSes.
#
# This example supports both Debian system and cygwin system.
#
if( $ENV{OSTYPE} =~ /linux/ ) {
    # Package type
    $PACKAGE_TYPE= 'D';

    # The directory to pool generated packages
    $PACKAGE_DIR = '/home/kiyoka/public_html/debian';
}
else {
    # Package type
    $PACKAGE_TYPE= 'C';

    # The directory to pool generated packages
    $PACKAGE_DIR = '/home/kiyoka/park/cygwin';

    # installation target directory
    $TARGET_PREFIX = '/opt/local';
}

#
# --- Verbose mode ( for debug )
#$verbose = 1;

In case of '~/.cmmirc' is not existing

  Cmmi assumes as '$ARCHIVE_DIR = "cmmi";'
  Cmmi assumes as $ARCHIVE_TYPE is not defined

.cmmi file

In case of '.cmmi' is not existing

  cmmi
      Cmmi executes 'configure ; make' command.
  cmmi install
      Cmmi executes 'make install' command.

How to customize .cmmi file

Rule and Grammer

  A line begins with white spaces means section.
      section keywords are 'configure,make,install,exclude'
      It can be shorter with abbreviation such as 'conf'
  A line begins with white spaces means command for shell command.
      caution!:sh commands run at 'build/PACKAGE-NAME' as a current
        directory.
      If you want to know the correct sequence, please look at contents of
        cmmi.script.

How to describe particular section

  configure
      Please define a process of configuration step.
  make
      Please define a process of 'make' or 'build'
  install
      Please define a process of 'install'
  exclude
      Please define a particular directory path which you don't want to
        install.
  e.g.
     1. This is the .cmmi contents which acts as same as a .cmmi file is not
        exist.

        conf
          configure
        make
          make
        install
          make install

     2. .cmmi for perl-5.6.0

        conf
           ./Configure -de

        make
           make
           make test


apt-get with cmmi ( for only Debian users )

If you describe a .cmmirc file correctly, you can use apt-xxx command in order
to install/uninstall.

  You can search your packages like this command line 'apt-cache search
    cmmi-'

    (notice: cmmi generates package which was named 'cmmi-xxxx')

  You can install your packages like this command line 'apt-get install
    cmmi-xxxx'

setup.exe with cmmi ( for only cygwin users )

If you describe a .cmmirc file correctly, you can install/uninstall with
setup.exe which is distributed on cygwin site.

  How to install
     1. Please execute setup.exe
     2. Please select 'Install from local Directory' menu item
     3. You will see your package name as an add-on package

