Commit be83699c authored by Michael Hanus's avatar Michael Hanus
Browse files

CPM updated

parent 38014d9c
......@@ -43,11 +43,11 @@ but also tools with some binary. In order to install such tools,
one can use the command
%
\begin{curry}
> cpm installbin PACKAGE
> cpm installapp PACKAGE
\end{curry}
%
This command checks out the package in some internal directory
(\code{\$HOME/.cpm/bin_packages})
(\code{\$HOME/.cpm/app_packages})
and installs the binary of the tool provided by the package
in \code{\$HOME/.cpm/bin}.
Hence it is recommended to add this directory to your path.
......@@ -58,7 +58,7 @@ can be installed by the following commands:
\begin{curry}
> cpm update
$\ldots$
> cpm installbin cpm
> cpm installapp cpm
$\ldots$ Package 'cpm-xxx' checked out $\ldots$
$\ldots$
INFO Installing executable 'cpm' into '/home/joe/.cpm/bin'
......
......@@ -235,27 +235,28 @@ if \code{\$HOME/.cpm/bin} is in your path
of this default path).
\subsection{Installing Binaries of Packages}
\label{sec:installbin}
\subsection{Installing Applications of Packages}
\label{sec:installapp}
Some packages do not contain only useful libraries
but also tools. In order to install such tools without
but also application programs or tools.
In order to install the executables of such applications without
explicitly using the source code of the package,
one can use the command
\begin{lstlisting}
cpm installbin <package>
cpm installapp <package>
\end{lstlisting}
This command checks out the package in some internal directory
(default: \code{\$HOME/.cpm/bin_packages}, see
(default: \code{\$HOME/.cpm/app_packages}, see
Section~\ref{sec:config})
and installs the binary of the tool provided by the package
and installs the binary of the application provided by the package
in \code{\$HOME/.cpm/bin} (see also Section~\ref{sec:checkout}).
For instance, the most recent version of the web framework Spicey
can be installed by the following command:
%
\begin{lstlisting}
> cpm installbin spicey
> cpm installapp spicey
$\ldots$ Package 'spicey-xxx' checked out $\ldots$
$\ldots$
INFO Installing executable 'spiceup' into '/home/joe/.cpm/bin'
......@@ -507,10 +508,10 @@ Hence, in order to use such applications, one should have this path
in the personal load path (environment variable \code{PATH}).
Default value: \code{\$HOME/.cpm/bin}
\item[\fbox{\code{bin_package_path}}]
\item[\fbox{\code{app_package_path}}]
The path to the package cache where packages are checked out if only
their binaries are installed (see Section~\ref{sec:installbin}).
Default value: \code{\$HOME/.cpm/bin_packages}.
their binaries are installed (see Section~\ref{sec:installapp}).
Default value: \code{\$HOME/.cpm/app_packages}.
\item[\fbox{\code{curry_bin}}]
The name of the executable of the Curry system used
......@@ -525,7 +526,7 @@ For instance, to install the binary
of the package \code{spicey} in the directory \code{\$HOME/bin},
one can execute the command
\begin{lstlisting}
> cpm --define bin_install_path=$\$$HOME/bin installbin spicey
> cpm --define bin_install_path=$\$$HOME/bin installapp spicey
\end{lstlisting}
......@@ -633,17 +634,19 @@ Checks out a specific version of a package
into the local directory \code{$package$}
in order to test its operations or install a binary of the package..
\item[\fbox{\code{installbin $package$ [--$pre$]}}]
Install the binary provided by the newest version
\item[\fbox{\code{installapp $package$ [--$pre$]}}]
Install the application provided by the newest version
(compatible to the current compiler) of a package.
The binary is installed into the directory \code{\$HOME/.cpm/bin}
The binary of the application is installed into the directory
\code{\$HOME/.cpm/bin}
(this location can be changed via the \code{\$HOME/.cpmrc} configuration file
or by the CPM option \code{--define}, see Section~\ref{sec:config}).
\code{--$pre$} enables the installation of pre-release versions.
\item[\fbox{\code{installbin $package$ $version$}}]
Install the binary provided by a specific version of a package.
The binary is installed into the directory \code{\$HOME/.cpm/bin}
\item[\fbox{\code{installapp $package$ $version$}}]
Install the application provided by a specific version of a package.
The binary of the application is installed into the directory
\code{\$HOME/.cpm/bin}
(this location can be changed via the \code{\$HOME/.cpmrc} configuration file
or by the CPM option \code{--define}, see Section~\ref{sec:config}).
......@@ -792,7 +795,7 @@ in all versions.
The compiler compatibility of a package is also relevant when
some version of a package should be examined or installed
(with CPM commands \code{info}, \code{checkout}, \code{install},
\code{installbin}).
\code{installapp}).
If a newest package should be installed, i.e., no specific version
number is provided, then only the newest version
which is compatible to the current Curry compiler
......@@ -859,7 +862,7 @@ For instance, a possible specification could be as follows:
\end{lstlisting}
%
If a package contains an \code{executable} specification,
the command \code{cpm install} compiles the main module
the command \code{cpm install} also compiles the main module
and installs the executable in the \code{bin} install directory of CPM
(see Section~\ref{sec:config} for details).
......
......@@ -6,7 +6,7 @@
module CPM.Config
( Config ( Config, packageInstallDir, binInstallDir, repositoryDir
, binPackageDir, packageIndexRepository, curryExec
, appPackageDir, packageIndexRepository, curryExec
, compilerVersion )
, readConfiguration, readConfigurationWithDefault, defaultConfig
, showCompilerVersion ) where
......@@ -41,8 +41,8 @@ data Config = Config {
, binInstallDir :: String
--- Directory where the package repository is stored
, repositoryDir :: String
--- Directory where the packages with binary installation only are stored
, binPackageDir :: String
--- Directory where the application packages are stored (cmd 'installapp')
, appPackageDir :: String
--- URL to the package index repository
, packageIndexRepository :: String
--- The executable of the Curry system used to compile and check packages
......@@ -58,7 +58,7 @@ defaultConfig = Config
{ packageInstallDir = "$HOME/.cpm/packages"
, binInstallDir = "$HOME/.cpm/bin"
, repositoryDir = "$HOME/.cpm/index"
, binPackageDir = "$HOME/.cpm/bin_packages"
, appPackageDir = "$HOME/.cpm/app_packages"
, packageIndexRepository = packageIndexURI
, curryExec = installDir </> "bin" </> curryCompiler
, compilerVersion = (curryCompiler, curryCompilerMajorVersion,
......@@ -124,7 +124,7 @@ replaceHome cfg = do
packageInstallDir = replaceHome' homeDir (packageInstallDir cfg)
, binInstallDir = replaceHome' homeDir (binInstallDir cfg)
, repositoryDir = replaceHome' homeDir (repositoryDir cfg)
, binPackageDir = replaceHome' homeDir (binPackageDir cfg)
, appPackageDir = replaceHome' homeDir (appPackageDir cfg)
}
where
replaceHome' h s = concat $ intersperse h $ splitOn "$HOME" s
......@@ -134,7 +134,7 @@ createDirectories cfg = do
createDirectoryIfMissing True (packageInstallDir cfg)
createDirectoryIfMissing True (binInstallDir cfg)
createDirectoryIfMissing True (repositoryDir cfg)
createDirectoryIfMissing True (binPackageDir cfg)
createDirectoryIfMissing True (appPackageDir cfg)
--- Merges configuration options from a configuration file or argument options
--- into a configuration record. May return an error using Left.
......@@ -168,7 +168,7 @@ keySetters =
[ ("repository_path" , \v c -> c { repositoryDir = v })
, ("package_install_path", \v c -> c { packageInstallDir = v})
, ("bin_install_path" , \v c -> c { binInstallDir = v})
, ("bin_package_path" , \v c -> c { binPackageDir = v})
, ("app_package_path" , \v c -> c { appPackageDir = v})
, ("curry_bin" , \v c -> c { curryExec = v})
]
......
This diff is collapsed.
......@@ -29,7 +29,7 @@ Thus, to install the newest version of CASS, use the following commands:
%
\begin{curry}
> cpm update
> cpm installbin cass
> cpm installapp cass
\end{curry}
%
This downloads the newest package, compiles it, and places
......
......@@ -29,7 +29,7 @@ Thus, to install the newest version of CASS, use the following commands:
%
\begin{curry}
> cpm update
> cpm installbin cass
> cpm installapp cass
\end{curry}
%
This downloads the newest package, compiles it, and places
......
......@@ -38,7 +38,7 @@ Thus, to install the newest version of CurryVerify, use the following commands:
%
\begin{curry}
> cpm update
> cpm installbin verify
> cpm installapp verify
\end{curry}
%
This downloads the newest package, compiles it, and places
......
......@@ -29,7 +29,7 @@ Thus, to install the newest version of CASS, use the following commands:
%
\begin{curry}
> cpm update
> cpm installbin cass
> cpm installapp cass
\end{curry}
%
This downloads the newest package, compiles it, and places
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment