| 5 | == Setup configure script == |
| 6 | To setup your test tree with same variable configuration used by rpmbuild, you can use the following configure script wrapper: |
| 7 | {{{ |
| 8 | CONFIG_SHELL=/bin/sh |
| 9 | export CONFIG_SHELL |
| 10 | LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" |
| 11 | export LDFLAGS |
| 12 | LIBS="-lurpo -lmmap -lpthread" |
| 13 | export LIBS |
| 14 | CFLAGS="-O2 -g -march=i386 -mtune=i686 -Wall -W -Wmissing-prototypes -Wmissing-declarations" |
| 15 | export CFLAGS |
| 16 | BASECFLAGS="-O2 -g -march=i386 -mtune=i686" |
| 17 | export BASECFLAGS |
| 18 | CXXFLAGS="-O2 -g -march=i386 -mtune=i686" |
| 19 | export CXXFLAGS |
| 20 | FFLAGS="-O2 -g -march=i386 -mtune=i686" |
| 21 | export FFLAGS |
| 22 | ./configure --host=i386-pc-os2-emx --build=i386-pc-os2-emx --program-prefix= --prefix=/@unixroot/usr \ |
| 23 | --exec-prefix=/@unixroot/usr --bindir=/@unixroot/usr/bin --sbindir=/@unixroot/usr/sbin \ |
| 24 | --sysconfdir=/@unixroot/etc --datadir=/@unixroot/usr/share --includedir=/@unixroot/usr/include \ |
| 25 | --libdir=/@unixroot/usr/lib --libexecdir=/@unixroot/usr/libexec --localstatedir=/@unixroot/var \ |
| 26 | --sharedstatedir=/@unixroot/usr/com --mandir=/@unixroot/usr/share/man --infodir=/@unixroot/usr/share/info \ |
| 27 | --enable-shared --disable-static \ |
| 28 | --disable-milter \ |
| 29 | --disable-rpath \ |
| 30 | --with-dbdir=/@unixroot/var/lib/clamav \ |
| 31 | --enable-languages=c --disable-ltdl-install --disable-fdpassing \ |
| 32 | --enable-check --disable-clamav \ |
| 33 | --disable-check \ |
| 34 | --disable-llvm \ |
| 35 | "--cache-file=F:/rpmbuild/cache/clamav.cache" |
| 36 | }}} |
| 37 | name it 'configure.rpm' and place in same directory of configure script. |
| 38 | 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. |