PATCH_LIST="0000-default-configuration.patch 0001-dont-run-local-exim.patch" FILE_LIST= # note: exim moves older versions randomly, sometimes in their own directory, # sometimes in the middle of others. The path below may have to be manually # crafted over time. SRC_FETCH_METHOD=http SRC_FETCH_PATH=http://exim.mirror.iphh.net/ftp/exim/exim4/old/exim-4.92.3/exim-${PKGVER}.tar.xz MAKEDEPENDS=("openssl-*:::*.so *.so.* *.h" "pcre-*:::*.so *.so.* *.h" "db-4.*:::*.a *.h") function do_config { # note: as of 4.92.3, exim's build system is totally broken, it requires # to manually edit a config file and ignores the values when passed as # make arguments! One can wonder how it went that much backwards. cp src/EDITME Local/Makefile echo "USE_DB=yes" >> Local/Makefile echo "DBMLIB=-ldb -lpthread" >> Local/Makefile sed -i \ -e 's,^BIN_DIRECTORY=.*,BIN_DIRECTORY=/usr/sbin,' \ -e 's,^CONFIGURE_FILE=.*,CONFIGURE_FILE=/etc/exim/exim.conf,' \ -e 's,^EXIM_USER=.*,EXIM_USER=ref:exim,' \ -e 's,^EXIM_MONITOR=,#EXIM_MONITOR=,' \ -e 's,^PCRE_CONFIG=.*,#PCRE_CONFIG=,' \ -e 's,^[# ]*PCRE_LIBS=.*,PCRE_LIBS=-lpcre,' \ Local/Makefile # no idea what this is but it breaks without it #cp exim_monitor/EDITME Local/eximon.conf # Now we must build a number of crappy utilities which are mixed between # the host and the target and randomly built with random errors. We're # trying to make them first with the host's toolchain with hope that # the rest of the build process will not destroy them. echo "Now trying to run make makefile" $FLXMAKE buildname="$FLXHOST" makefile || exit 1 echo "Done." echo "Now trying to run make configure" $FLXMAKE buildname="$FLXHOST" configure || exit 1 echo "Done." echo "Now trying to run make buildconfig" $FLXPMAKE -C "build-$FLXHOST" buildconfig || exit 1 echo "Done." echo "Now trying to run make macro_predef" $FLXPMAKE -C "build-$FLXHOST" macro_predef || exit 1 echo "Done." echo "Now trying to run make os.h" $FLXPMAKE -C "build-$FLXHOST" os.h || exit 1 echo "Done, and very surprizingly nothing failed, but wait for next step before claiming a victory!" } function do_compile_only { # parallel make $FLXPMAKE -C "build-$FLXHOST" buildname="$FLXHOST" FULLECHO= \ CC="$CC" CXX="$CXX" LD="$LD" \ RANLIB="$RANLIB" AR="$AR cq" AS="$AS" NM="$NM" OBJDUMP="$OBJDUMP" \ CFLAGS="$GCC_ARCH_SMALL $GCC_CPU_SMALL $GCC_OPT_SMALL" } function do_prepack { $FLXMAKE install DESTDIR=$ROOTDIR buildname="$FLXHOST" FULLECHO= \ CC="$CC" CXX="$CXX" LD="$LD" \ RANLIB="$RANLIB" AR="$AR cq" AS="$AS" NM="$NM" OBJDUMP="$OBJDUMP" \ CFLAGS="$GCC_ARCH_SMALL $GCC_CPU_SMALL $GCC_OPT_SMALL" || exit 1 mkdir -p $ROOTDIR/usr/share/examples/exim || exit 1 mv $ROOTDIR/etc/aliases $ROOTDIR/usr/share/examples/exim/ || exit 1 mv $ROOTDIR/etc/exim/exim.conf $ROOTDIR/usr/share/examples/exim/ || exit 1 mv $ROOTDIR/usr/sbin/exim-$PKGVER $ROOTDIR/usr/sbin/exim || exit 1 mkdir -p $ROOTDIR/sbin/init.d || exit 1 cp .flxpkg/add-ons/exim.init $ROOTDIR/sbin/init.d/exim || exit 1 chmod 555 $ROOTDIR/sbin/init.d/exim || exit 1 set_default_perm $ROOTDIR }