On Wed, Nov 05, 2003, Anshuman Kanwar wrote:
> 1) I have a bunch of precompiled binaries in /opt/$arch/app abd a few
> config files in /opt/$arch/app/conf.
> 2) The aim is to package these binaries using openpkg and add in
> configuration scripts for the files in /opt/$arch/app/conf.
> 3) I do not want to install the final application under /cw (or whereever
> the openpkg subtree is) but under /opt
[...]
> Questions:
> A) After reading through the docs I am not sure if using Openpkg for the
> above job is a good idea or not.
What are the alternatives? ;-)
> B) Can I provide a --prefix option to openpkg to install the binary in some
> location other than the installroot ?
One of the main concepts of OpenPKG is that you can settle it
down wherever you want. Currently it is not possible to relocate
"sub-components" like binaries but you can choose an arbitrary prefix
for the entire hierarchy at bootstrapping time. The file system layout
under this prefix is always the same and cannot be disintegrated any
furhter. In our docs the prefix (the internal RPM macro is %{l_prefix})
is very often mentioned as /cw/ since it is the default at Cable &
Wireless but, as already said, the prefix could be whatever you like. In
your case something like /opt/sparc64-solaris8/ or /opt/ix86-freebsd4.9/
>From a generic point of view
%{l_prefix}/
|-- README
|-- RPM/
|-- bin/
|-- cgi/
|-- etc/
|-- include/
|-- info/
|-- lib/
|-- libexec/
|-- local/
|-- man/
|-- pub/
|-- sbin/
|-- share/
`-- var/
will become
/opt/
|-- ix86-freebsd4.9/
| |-- README
| |-- RPM/
| |-- bin/
| |-- cgi/
| |-- etc/
| |-- include/
| |-- info/
| |-- lib/
| |-- libexec/
| |-- local/
| |-- man/
| |-- pub/
| |-- sbin/
| |-- share/
| `-- var/
`-- sparc64-solaris8/
|-- README
|-- RPM/
|-- bin/
|-- cgi/
|-- etc/
|-- include/
|-- info/
|-- lib/
|-- libexec/
|-- local/
|-- man/
|-- pub/
|-- sbin/
|-- share/
`-- var/
(assuming two platform specific OpenPKG hierarchies)
That's it. It is not possible to relocate %{l_prefix}/bin/ to
%{l_prefix}/app/ and %{l_prefix}/etc/ to %{l_prefix}/app/conf/
Hope this was your question. On the other hand some symlink might help
to workaround the issue.
Note: Please choose your prefix wisely since it cannot be altered at a
later time. Especially using just /opt/ or /usr/local/ might lead to
conflicts with other software packages (not managed by OpenPKG) like
Solaris third party software or FreeBSD ports. That's why we're used to
our esoteric /cw/ prefix (we are quite sure nobody else uses /cw/ :-)
> C) I don't understand the need for the rc file in case I am able to use the
> --prefix option (and I use the /full/path/to when i run openpkg)
Which specific rc file are you talking about?
-cs
______________________________________________________________________
The OpenPKG Project www.openpkg.org
User Communication List [EMAIL PROTECTED]