Version 4 (modified by 13 years ago) ( diff ) | ,
---|
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.
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
Your CONFIG.SYS will be updated to allow gcc parser to use the new tools.
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.