# HG changeset patch # User Eric Joseph-Alexandre # Date 1401314432 -7200 # Node ID 72166e2a51e5733eaef47756d2726bb635ac7352 # Parent 393ec0342e424bfa3901eabf04c934e1676e3fcc fpc: improve receipt diff -r 393ec0342e42 -r 72166e2a51e5 fpc/receipt --- a/fpc/receipt Wed May 28 23:59:33 2014 +0200 +++ b/fpc/receipt Thu May 29 00:00:32 2014 +0200 @@ -54,10 +54,25 @@ mkdir -p $fs/usr $fs/etc cp -a $install/usr/bin $fs/usr cp -a $install/usr/lib $fs/usr + # create symlink for compiler ln -s /usr/lib/$PACKAGE/$VERSION/ppc386 $fs/usr/bin + # config file - mkdir -p $fs/etc - cp -a $fs/usr/lib/fpc/$VERSION/samplecfg $fs/etc/fpc.cfg + #mkdir -p $fs/etc + #cp -a $fs/usr/lib/fpc/$VERSION/samplecfg $fs/etc/fpc.cfg } +post_install() +{ + echo"Processing postinstall commands..." + if [ ! -f $1/etc/fpc.cfg ]; then + chroot $1/ fpcmkcfg > /etc/fpc.cfg + fi + + # Fix units search path + sed -i -e 's!^-Fu/units/$fpctarget!-Fu/usr/lib/fpc/2.6.4/units/$fpctarget!' \ + -e 's!^-Fu/units/$fpctarget/*!-Fu/usr/lib/fpc/2.6.4/units/$fpctarget/*!' \ + -e 's!^-Fu/units/$fpctarget/rtl!-Fu/usr/lib/fpc/2.6.4/units/$fpctarget/rtl!' $1/etc/fpc.cfg + +}