# Recipe for version 1.4.4 by Joshua Sako <jginsu@gmail.com>, on Thu Oct 28 12:30:08 EDT 2010
compile_version=1.12.4
url="ftp://ftp.easysw.com/pub/cups/1.4.4/cups-1.4.4-source.tar.bz2"
file_size=4472741
file_md5=8776403ad60fea9e85eab9c04d88560d
dir='cups-1.4.4'
recipe_type=configure

configure_options=(
   --with-rcdir="$target"
   --with-docdir="$target/doc"
   --with-fontpath="${goboShared}/Fonts/Ghostscript"
   --with-cups-user=lp
   --with-cups-group=lp
   --with-system-groups=lpadmin
   --with-icondir="$target/share/icons"
   --with-menudir="$target/share/applications"
   --with-dbusdir="$settings_target/dbus-1"
   --with-python
   --enable-threads
   --enable-libpaper
)

environment=(
    LIBTOOL=
)

make_variables=(
    LIBTOOL=
)

install_variables=(
   PAMDIR="${settings_target}/pam.d"
   PHPEXTENSIONDIR="${target}/$(php-config --extension-dir | sed 's,.*/\(lib/.*\),\1,')"
   SERVERROOT="${settings_target}/cups"
)

unmanaged_files=(
   ${goboVariable}/log/cups
   ${goboVariable}/run/cups/certs
   ${goboVariable}/cache/cups
   ${goboVariable}/spool/cups/tmp
)

pre_link() {
   Quiet pushd $target/lib
   ln -s ../share/cups .
   Quiet popd
}

pre_install() {
   mkdir -p "$target/$(php-config --extension-dir | sed 's,.*/\(lib/.*\),\1,')"
}

post_install_message="=========================================\n\nNote: when upgrading from CUPS 1.1.20 you may need\n      to recreate your printers because of changes\n      in the ppd uri format for usb printers.\n\n=================================================="
