# Recipe for version 2.3.1 by Lucas C. Villa Real , on Wed 12 Feb 2020 03:10:23 PM BRST compile_version=1.12.4 url="https://github.com/apple/cups/releases/download/v2.3.1/cups-2.3.1-source.tar.gz" file_size=8135891 file_md5=8ad8897c97cf4d90f20dac4318f47421 dir='cups-2.3.1' recipe_type=configure configure_options=( --with-libdir="$target/lib" --with-rcdir="$target/cupsinit" --with-docdir="$target/doc" --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 --disable-systemd ) environment=( LIBTOOL= ) make_variables=( LIBTOOL= ) # TODO: the following array has been tested with $goboIndex only. install_variables=( BUILDROOT="$target" MENUDIR="/share/applications" DBUSDIR="/../Settings/dbus-1" PAMDIR="/../Settings/pam.d" INITDIR="/../Settings/cupsinit" ICONDIR="/share/icons" includedir="/include" libdir="/lib" ) unmanaged_files=( ${goboVariable}/log/cups ${goboVariable}/run/cups/certs ${goboVariable}/cache/cups ${goboVariable}/spool/cups/tmp ) pre_build() { # If xdg-utils is not installed, then we set Firefox as the default browser to access # the Cups web interface Quiet which xdg-open || sed -i 's#@CUPS_HTMLVIEW@#firefox#' desktop/cups.desktop.in # Fixes bogus include sed -i '/stat.h/a #include ' tools/ipptool.c } pre_install() { GrepReplace "(BUILDROOT)$goboSettings" "(BUILDROOT)/../Settings" Makedefs GrepReplace "(BUILDROOT)/usr" "(BUILDROOT)" Makedefs GrepReplace "(BUILDROOT)/Data" "/Data" Makedefs } pre_link() { rm -rf -- $target/cupsinit rm -rf -- $target/share/cups/banners # This is now part of the CUPS Filters package rm -rf -- $target/share/cups/data/testprint # Ditto. Quiet pushd $target/lib mkdir -p cups/driver ln -s ../share/cups . Quiet popd if [ ! -e "$settings_target/cups/client.conf" ] then mkdir -p "$settings_target/cups" echo "ServerName $goboVariable/run/cups/cups.sock" > $settings_target/cups/client.conf fi } post_install() { GrepReplace -B 'user="root"' 'user="0"' "$settings_target/dbus-1/system.d/cups.conf" GrepReplace -B 'user="root"' 'user="0"' "$target/Resources/Defaults/Settings/dbus-1/system.d/cups.conf" GrepReplace "#DocumentRoot /usr/doc" "DocumentRoot /Programs/CUPS/Current/doc" "$settings_target/cups/cups-files.conf" } 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=================================================="