# Recipe (MakeRecipe) for Foomatic-DB-Engine by Lucas C. Villa Real, on Mon Feb 26 14:52:22 GMT 2007
# Recipe for version 3.0_Devel by Lucas C. Villa Real, on Mon Feb 26 14:52:22 GMT 2007
compile_version=1.8.2
url="http://www.linuxprinting.org/download/foomatic/foomatic-db-engine-3.0-current.tar.gz"
uncompress=no
dir='foomatic-db-engine-3.0-current'
recipe_type=configure
part_of=Foomatic

install_variables=(
    PERLPREFIX=$target
    LIBDIR=$target/Shared/foomatic
    LIB_CUPS=$target/lib/cups
)

pre_build() {
    # this is the only way to handle tarballs with unstable dirnames after uncompressed
    tar zxf foomatic-db-engine-3.0-current.tar.gz
    mv foomatic-db-*/* .
    rmdir * 2> /dev/null
    rm -f foomatic-db-engine-3.0-current.tar.gz
}

pre_link() {
    mkdir -p $target/share/cups/driver
    Quiet pushd $target/share/cups/driver
    ln -s $target/bin/foomatic-ppdfile foomatic
    Quiet popd
}
