On Tue, Dec 09, 2003, [EMAIL PROTECTED] wrote:
> Today I have build courier-imap for RH7.3 based strictly on the source
> downlowded from the developer site. This source comes with a redy .spec
>
> What I don't know is what should be better for me to do:
>
> option a) (simpler) Just run the package I build for RH7.3.
>            Here I  whant to know if it is OK to run this executable that
>            was compiled with RH7.3 versions of ldap, mysql, etc..
>            while now I'm pretending to use the OpenPKG versions of them.
> 
> option b) Make some adjustments (tips are welcome) to adapt the .spec
>           so that it integrates with OpenPKG needs an then rebuild courier
>           as if it where an "oficial" OpenPKG package.
>           Here I'm a litle woried with the complexity of adapting the .spec
>           as I'm no rpm/gcc guru ;-(
>
Okay, now I understand a little better. First of all, either a) or b) will
work technically equally well.

The disadvantage of a) is that you can't use rpm commands (rpm -qi rpm
-qlv...) to review how you built and installed the software in one year when
it is time to upgrade. Also, you won't be able to manipulate the IMAP server
with the OpenPKG run command processor 'rc'.

The disadvantage of b) is that you will have to write a spec file and make a
OpenPKG package.

If you choose b), then let me make it a little easier. Use the template
below, and fill in everything that says 'fillin#'. If you don't know what
goes into a field, then leave it with the word 'fillin#'. Use another
OpenPKG package as reference.

Then type:

  $ rpm --fetch courier.spec
  $ rpm -bb courier.spec

And watch as your package is built. It probably won't succeed the first
time, so you'll have to make modifications to the build flags, make
options, environment, etcetera.

Good luck,
Michael

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

--------

#   package information
Name:         fillin1
Summary:      fillin2
URL:          fillin3
Vendor:       fillin4
Packager:     fillin5
Distribution: fillin6
Group:        fillin7
License:      fillin8
Version:      fillin9
Release:      fillin10

#   list of sources
Source0:      fillin11

#   build information
Prefix:       %{l_prefix}
BuildRoot:    %{l_buildroot}
BuildPreReq:  OpenPKG
PreReq:       OpenPKG
AutoReq:      no
AutoReqProv:  no

%description
    fillin

%prep
    %setup -q -n fillin12-%{V_major}

%build
    CC="%{l_cc}" \
    CXX="%{l_cxx}" \
    CFLAGS="%{l_cflags -O}" \
    CXXFLAGS="%{l_cxxflags -O}" \
    LDFLAGS="%{l_ldflags}" \
    ./configure \
        --prefix=%{l_prefix}
    %{l_make} %{l_mflags -O}

%install
    rm -rf $RPM_BUILD_ROOT
    %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}

%files -f files

%clean
#    comment next line out for debugging a new package
#    rm -rf $RPM_BUILD_ROOT

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to