The file list conversion from OpenPKG   November 17th, 2007

rpmtool:
One idea could be, to download the file from the OpenPKG CVS and save it to /usr/bin/rpmtool; you need to change the first line of that file to #!/bin/bash
Also add at the top of the spec file:

%define l_rpmtool /usr/bin/rpmtool

The other idea is, to install the OpenPKG source rpm of the package concerned:

/kolab/bin/openpkg rpm -i kolab-webadmin-0.4.0-20050318.src.rpm

In the /kolab/RPM/SRC/kolab-webadmin/kolab-webadmin.spec
insert after the l_rpmtool line:
cp files /usr/src/redhat/SOURCES/kolab-webadmin.files

Rebuild the package, which will create the kolab-webadmin.files:
/kolab/libexec/openpkg/rpmbuild -ba /kolab/RPM/SRC/kolab-webadmin/kolab-webadmin.spec

Perhaps need to change the paths, e.g. for perl:
in vi:

:%s/\/kolab\/lib\/perl\/vendor_perl\/5.8.5/\/usr\/lib\/perl5\/vendor_perl\/5.8.3/g

You need to put it into an archive:
cd /usr/src/redhat/SOURCES/
tar cvf kolab-webadmin.files.tar kolab-webadmin.files

In the fedora spec file, /usr/src/redhat/SPECS/kolab-webadmin.spec, you would add in the sources:
Source1: kolab-webadmin.files.tar

In the %prep section, insert:
%setup1 -D -T -b 1 -n kolab-webadmin-%{version}
As the parameter for -n, give the name of a directory that is created for the main tar file anyway.

In the %install section, remove the rpmtool lines; instead, you change the %files line:
%files -f ../kolab-webadmin.files

Tags: , , , ,
Posted in Software Development | Comments Closed

have a look at Building Packages with OpenPKG
See /usr/local/kolabopenpkg/etc/openpkg/rpmmacros to know what the macros (e.g. %l_musr) mean.

To get the spec file, install the OpenPKG source package:

/kolab/bin/openpkg rpm -i kolab-webadmin-0.4.0-20050318.src.rpm

Copy the /kolab/RPM/SRC/kolab-webadmin/kolab-webadmin.spec to /usr/src/redhat/SPECS;
Copy the other files (e.g. .tar.gz archives) to /usr/src/redhat/SOURCES

One special thing is that the required packages in OpenPKG don’t only include the package name and required version number, but often also options that were included when configuring and building the package.
For example, cyrus-sasl::with_ldap would require that the cyrus-sasl::with_ldap is advertised in the Provides: tag in the spec file.
A common approach is not to advertise all compiling options, but to know the packages and test them thoroughly.

Remove the line:
Class: JUNK

To understand some of the macros, in the form %{something}, have a look at /usr/lib/rpm/macros and /usr/local/kolab/etc/openpkg/rpmmacros.

Insert these lines near the top:

%define l_prefix /kolab
%define l_make %{__make}
%define l_mflags -m
# m actually is ignored, compatibility

Replace all occurances of “apache” with “httpd” in your spec file.

It seems, the spaces before the %setup -q are not correct. Remove them!

Lines like %{l_shtool} install: just remove all the %{l_shtool}; install should work fine;
remove also the %{l_value -s -a} (though I am not sure what those characters stand for)

Tags: , , , ,
Posted in Software Development | Comments Closed