wiki:RpmHowToDevelopers

RPM How-To for developers

Information's for developers: will explain the basic development cycle, from getting the source code, get it running under OS/2, create a diff file suitable for packaging.

General hint

Some rpm's might change your config.sys. So after all is installed we recommend to reboot the system.

Setup compiler

Once your local environment is working ok, to install the current gcc compilers, please install the following packages:

yum install libc-devel
yum install gcc

You should also install watcom linker and resource compiler.

yum install gcc-wlink
yum install gcc-wrc

Make utility

Ports usually only need make. But it doesn't hurt to install kbuild also, as it's used more and more.

yum install kbuild-make (which installs make)
yum install kbuild

Some useful addons

yum install netlabs-exp (installs the experimental repro, as some rpm show up first there)
yum install python-devel (python 2.7.6)
yum install perl (perl 5.16.1)
yum install os2-base-unixtools-path (adds x:\usr\bin before x:\OS2 in the PATH setting of config.sys)

Setup configure script

To setup your test tree with same variable configuration used by rpmbuild, you can use the following configure script wrapper:

CONFIG_SHELL=/bin/sh
export CONFIG_SHELL
LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
export LDFLAGS
LIBS="-lurpo -lmmap -lpthread"
export LIBS
CFLAGS="-O2 -g -march=i386 -mtune=i686 -Wall -W -Wmissing-prototypes -Wmissing-declarations"
export CFLAGS
BASECFLAGS="-O2 -g -march=i386 -mtune=i686"
export BASECFLAGS
CXXFLAGS="-O2 -g -march=i386 -mtune=i686"
export CXXFLAGS
FFLAGS="-O2 -g -march=i386 -mtune=i686"
export FFLAGS
./configure --host=i386-pc-os2-emx --build=i386-pc-os2-emx --program-prefix= --prefix=/@unixroot/usr \
        --exec-prefix=/@unixroot/usr --bindir=/@unixroot/usr/bin --sbindir=/@unixroot/usr/sbin \
        --sysconfdir=/@unixroot/etc --datadir=/@unixroot/usr/share --includedir=/@unixroot/usr/include \
        --libdir=/@unixroot/usr/lib --libexecdir=/@unixroot/usr/libexec --localstatedir=/@unixroot/var \
        --sharedstatedir=/@unixroot/usr/com --mandir=/@unixroot/usr/share/man --infodir=/@unixroot/usr/share/info \
   --enable-shared --disable-static \
   --disable-milter \
   --disable-rpath \
   --with-dbdir=/@unixroot/var/lib/clamav \
   --enable-languages=c --disable-ltdl-install --disable-fdpassing \
   --enable-check --disable-clamav \
   --disable-check \
   --disable-llvm \
   "--cache-file=F:/rpmbuild/cache/clamav.cache"

name it 'configure.rpm' and place in same directory of configure script. The first part of the configure line holds all system variables and must not be changed, the other lines have application specific parameters. This example is taken from ClamAV project.

Last modified 11 years ago Last modified on May 28, 2014, 2:05:24 PM
Note: See TracWiki for help on using the wiki.