On Thu, Dec 11, 2003, [EMAIL PROTECTED] wrote:
> It expands to a tree under courier-imap-2.2.1, bup instaling source rpms
> normaly seams to install under a directory just for the main name, as also
> does courier-imap-1.5.3 from Bill Campbell. Is this done by the rpm tool
> or do I need to repackage or specify something in .spec ?
>
A tarball (like courier-imap-2.2.1.tar.bz2) is unpackad by RPM using the
%setup macros that you should put in the %prep section of the .spec file.
Something like:

%prep
    %setup -q

should do the job, although you might need to use:

    %setup -q -n courier-imap-%{version}

or some variation with '-c' to create a directory, etcetera. They are all
native RPM features that you can read about in the Maximum RPM book or some
other RPM documentation.

> Reading the developer on-line Install instructions I think that I should
> modify the .spec file and then issue rpm -bb courier-imap.spec
>
Yes that sounds reasonable. And 'rpm -bb' builds the package from just a
.spec file. It is very similar to 'rpm --rebuild', except your source is a
.spec file rather than a full source package. The command 'rpm -bs' will
create a source package (ending with .src.rpm), but does not compile or
build anything. That's what you'll use later to finally make your package.

> This .spec has no Prefix: entry, but has %define _prefix /usr/lib/courier-imap
> Should I change do %define _prefix %{l_prefix}/usr/lib/courier-imap or Just add
> Prefix: %{l_prefix} ?
>
> Also the .spec has
> BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
>
> Should I prefix this definition or substitute it with the  %{l_buildroot} ?
>
Prefix, Buildroot and the other things that I put in the template sent to
you should remain exact. Don't change them or use other non-OpenPKG
constructs like the ones you found in the .spec file distributed with the
Courier sources.

In some cases those non-OpenPKG constructs are simply unconformant to style
or organization rules that we've chosen to enforce (at least in the official
package repository). In other cases, those non-OpenPKG constructs will cause
your build to completely fail.

> Also I think I should set the --with-shellpath configuration option to include
> OpenPKG path. For this I whant to confirm that %{l_prefix} represents the base
> directory where I installed OpenPKG.
>
Yes, %{l_prefix} will always expand to the path name you gave when
bootstrapping OpenPKG like this:

  $ sh openpkg...-src.sh --prefix=/myprefix

If you didn't give a prefix explicitly, then it will be '/cw' by default.

> And now what should I worry about or search in the .spec file to changes
> for use with OpenPKG ?
>
First build the software without even thinking about OpenPKG. Keep notes of
everything you do (./configure, make all, rm unwanted files, make
install...). Then put these steps exactly like that in the .spec file
template I sent you. Compare your final .spec file with the on distributed
with the Courier software. Change a few things that seem necessary. Lastly,
try building with 'rpm -bb courier.spec'.

> PS.: The rpm tree I used to see from RedHat has BUILD RPMS SOURCES SPECS 
> SRPMS, but in OpenPKG ther is only DB PKG SRC TMP. Should I put the
> courier-imap-2.2.1.tar.bz2 file just into SRC or does I need to mkdir
> courier-imap first ?
>
Probably easiest ist to use:

  $ rpm --fetch courier.spec

If you don't like that, then make the directory and copy the tarball:

  $ mkdir /cw/RPM/SRC/courier
  $ cp /someplace/courier-imap-2.2.1.tar.bz2 /cw/RPM/SRC/courier

This directory (which I assume is 'courier') must match exactly the name you
use for your package, as stated in the .spec file after 'Name:'.

Good luck,
Michael

-- 
[EMAIL PROTECTED]
Development Team, Operations Northern Europe
Cable & Wireless Telecommunications Services GmbH

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to